mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 16:02:57 +00:00
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.
Link: https://lore.kernel.org/r/[email protected]
Fixes: c045213703 ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver")
Signed-off-by: Marek Szyprowski <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Nicolas Saenz Julienne <[email protected]>
Acked-by: Lorenzo Pieralisi <[email protected]>