Re: [PATCH] pci: brcmstb: Fix build on 32bit ARM platforms with older compilers

From: Nicolas Saenz Julienne
Date: Thu Feb 27 2020 - 06:56:36 EST


On Thu, 2020-02-27 at 12:51 +0100, Marek Szyprowski wrote:
> Some older compilers have no implementation for the helper for 64-bit
> unsigned division/modulo, so linking pcie-brcmstb driver causes the
> "undefined reference to `__aeabi_uldivmod'" error.
>
> *rc_bar2_size is always a power of two, because it is calculated as:
> "1ULL << fls64(entry->res->end - entry->res->start)", so the modulo
> operation in the subsequent check can be replaced by a simple logical
> AND with a proper mask.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>

Acked-by: Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx>

Thanks!
Nicolas

Attachment: signature.asc
Description: This is a digitally signed message part