From patchwork Tue Nov 22 14:17:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101478 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp2120177qge; Tue, 22 Nov 2016 06:20:42 -0800 (PST) X-Received: by 10.84.216.28 with SMTP id m28mr118066pli.107.1479824442369; Tue, 22 Nov 2016 06:20:42 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id q28si28687570pfl.44.2016.11.22.06.20.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 06:20:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9Bup-0000Ix-9F; Tue, 22 Nov 2016 14:19:19 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9Bul-0000Di-6B for linux-arm-kernel@lists.infradead.org; Tue, 22 Nov 2016 14:19:16 +0000 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MfHVi-1cP3nx3XvW-00Opbn; Tue, 22 Nov 2016 15:18:48 +0100 From: Arnd Bergmann To: Bjorn Helgaas Subject: [PATCH 1/2] PCI: iproc: fix 32-bit build Date: Tue, 22 Nov 2016 15:17:51 +0100 Message-Id: <20161122141844.1655574-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:fIBc9yMn524ayJ79FISlDZw5moo57kaQOYEtQEVt+eiZO6z43Qp 6evbB2nS/5fbbSz3wcUTlRU5DEm6e2P7ng6WT+5xQg2f4gDaCuVi06C0ORiytWLHLpTtfFf DfgpzFfaJiWoqJ6G23XGsZfeox1xacr3VwYCyMi14ZXFBlRVPjC9P2sZS76kEE3axyEa3iL 8FbvBQo++8JebBRO5x1yQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:QOV7YJlO2ck=:5du6AdY5HwF/h9I91yh/Pn XMMCrruSmVD1WAYcgiShwCBY6omfS2kWiMp4JJethgKwwcX4fKC8aRN7taX4p1hYc2Wy2cjjx 3yvCzL5D+WD5aRoed4KhTWYQBj1OGDC3Qy3xesvjrSRQ7xqCQ8wIPIMlmHafM+8WsIpigpvK2 gOwDGOgp1sbnflq/9rGBBBxNRXWF/yAIdpWZYMdel/Q/2S5ndqfn7ouDd3rpl5/whnw3iuhu6 adYqqGUcqK7WgK6Gzxsy1N8vt2a9h0lj41zgqhuy6PNTOYjnDuuK4dpKeXU/5VsAUuw3mEOr4 6JinB3rIjgRJ1T2vm6It+DN0UVCgiYYQETPCvSUWedWA6KI6JZ7Kp2mRPKtHniQgf62geYqBC dv7n5TQ/emP+HpwTmcDMKFYxqza3kstBThQQW2cgtpNI2fT7PiABduNIFDOmLvrnbr6CHJbcY LpGHw6vW3805m3ZAOx6nvmmJ35B3XBFB/6TSTadxOwfY8+FV2SkNKQ5woI9IFl505cKExcoii lgfGoNA51R2bOxtHcp21rJW3LsP/zZZ/vtz8gI3PZvWNoILfEiilHlppAcqk27XUiAtpe7gV1 CEfBLDS/CEAXiGppNlaU6P4D91vOt/VAoP6XXjoME/3QXWdPKlsmO14vu7gRfxI0yWUAXUri/ MUeIvMo98cMMj9ngqvzCPWoDww5Kqme3kzXZGGWVK9eGWmlqT5RUgO1bJ1QUlzPDcO08= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161122_061915_599565_54ECCC56 X-CRM114-Status: GOOD ( 11.70 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.13 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.13 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Scott Branden , Jon Mason , Ray Jui , linux-kernel@vger.kernel.org, Oza Oza , linux-pci@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org 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 --- drivers/pci/host/pcie-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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;