From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755827AbcB2Pp5 (ORCPT ); Mon, 29 Feb 2016 10:45:57 -0500 Received: from 8bytes.org ([81.169.241.247]:56813 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751285AbcB2Ppu (ORCPT ); Mon, 29 Feb 2016 10:45:50 -0500 Date: Mon, 29 Feb 2016 16:45:47 +0100 From: Joerg Roedel To: Arnd Bergmann Cc: Joerg Roedel , Marek Szyprowski , Kukjin Kim , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu: exynos: pointers are nto physical addresses Message-ID: <20160229154547.GA13711@8bytes.org> References: <1456735568-3886545-1-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1456735568-3886545-1-git-send-email-arnd@arndb.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 29, 2016 at 09:45:59AM +0100, Arnd Bergmann wrote: > The exynos iommu driver changed an incorrect cast from pointer > to 'unsigned int' to an equally incorrect cast to a 'phys_addr_t', > which results in an obvious compile-time error when phys_addr_t > is wider than pointers are: > > drivers/iommu/exynos-iommu.c: In function 'alloc_lv2entry': > drivers/iommu/exynos-iommu.c:918:32: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] > > The code does not actually want the physical address (which would > involve using virt_to_phys()), but just checks the alignment, > so we can change it to use a cast to uintptr_t instead. > > Signed-off-by: Arnd Bergmann > Fixes: 740a01eee9ad ("iommu/exynos: Add support for v5 SYSMMU") > --- > I also see that some incorrect __raw_writel() calls have crept in > around the same time, which breaks running big-endian kernels when > this driver is loaded. > > Please fix and that that as well. > > drivers/iommu/exynos-iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks Arnd.