Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1527542
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] PCI: iproc: fix 32-bit build |
| Date | 2016-11-22 15:30 +0100 |
| Message-ID | <sGkf7-8lc-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
The newly added code to setup the inbound ranges causes a link error
on 32-bit machines from a 32-bit division:
drivers/pci/host/pcie-iproc.o: In function `iproc_pcie_setup_ib':
pcie-iproc.c:(.text.iproc_pcie_setup_ib+0x14c): undefined reference to `__aeabi_uldivmod'
As both sides of the division are always power-of-two numbers and
we already rely on that, we can use a shift instead.
Fixes: 87c240b19bba ("PCI: iproc: Add inbound DMA mapping support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/pci/host/pcie-iproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index d10e6aa32e0d..857ff5198317 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -865,7 +865,7 @@ static int iproc_pcie_ib_write(struct iproc_pcie *pcie, int region_idx,
* Now program the IMAP registers. Each IARR region may have one or
* more IMAP windows.
*/
- size /= nr_windows;
+ size >>= ilog2(nr_windows);
for (window_idx = 0; window_idx < nr_windows; window_idx++) {
val = readl(pcie->base + imap_offset);
val |= lower_32_bits(axi_addr) | IMAP_VALID;
--
2.9.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/2] PCI: iproc: fix 32-bit build Arnd Bergmann <arnd@arndb.de> - 2016-11-22 15:30 +0100
[PATCH 2/2] PCI: iproc: avoid maybe-uninitialized warning Arnd Bergmann <arnd@arndb.de> - 2016-11-22 15:30 +0100
Re: [PATCH 2/2] PCI: iproc: avoid maybe-uninitialized warning Ray Jui <ray.jui@broadcom.com> - 2016-11-22 18:50 +0100
Re: [PATCH 2/2] PCI: iproc: avoid maybe-uninitialized warning Arnd Bergmann <arnd@arndb.de> - 2016-11-22 22:20 +0100
Re: [PATCH 2/2] PCI: iproc: avoid maybe-uninitialized warning Ray Jui <ray.jui@broadcom.com> - 2016-11-23 04:10 +0100
Re: [PATCH 1/2] PCI: iproc: fix 32-bit build Ray Jui <ray.jui@broadcom.com> - 2016-11-22 18:50 +0100
Re: [PATCH 1/2] PCI: iproc: fix 32-bit build Arnd Bergmann <arnd@arndb.de> - 2016-11-22 22:20 +0100
Re: [PATCH 1/2] PCI: iproc: fix 32-bit build Ray Jui <ray.jui@broadcom.com> - 2016-11-23 04:00 +0100
Re: [PATCH 1/2] PCI: iproc: fix 32-bit build Bjorn Helgaas <helgaas@kernel.org> - 2016-11-24 00:00 +0100
csiph-web