Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1345927

Re: [PATCH] iommu: exynos: pointers are nto physical addresses

From Joerg Roedel <joro@8bytes.org>
Newsgroups linux.kernel
Subject Re: [PATCH] iommu: exynos: pointers are nto physical addresses
Date 2016-02-29 16:50 +0100
Message-ID <r7yf9-4UY-31@gated-at.bofh.it> (permalink)
References <r7rGF-Ft-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <arnd@arndb.de>
> 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.

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] iommu: exynos: pointers are nto physical addresses Arnd Bergmann <arnd@arndb.de> - 2016-02-29 09:50 +0100
  Re: [PATCH] iommu: exynos: pointers are nto physical addresses Marek Szyprowski <m.szyprowski@samsung.com> - 2016-02-29 10:40 +0100
    Re: [PATCH] iommu: exynos: pointers are nto physical addresses Arnd Bergmann <arnd@arndb.de> - 2016-02-29 11:00 +0100
  Re: [PATCH] iommu: exynos: pointers are nto physical addresses Joerg Roedel <joro@8bytes.org> - 2016-02-29 16:50 +0100

csiph-web