iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Joerg Roedel <jroedel@suse.de>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	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
Date: Mon, 29 Feb 2016 16:45:47 +0100	[thread overview]
Message-ID: <20160229154547.GA13711@8bytes.org> (raw)
In-Reply-To: <1456735568-3886545-1-git-send-email-arnd@arndb.de>

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.

      parent reply	other threads:[~2016-02-29 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29  8:45 [PATCH] iommu: exynos: pointers are nto physical addresses Arnd Bergmann
     [not found] ` <1456735568-3886545-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-02-29  9:33   ` Marek Szyprowski
2016-02-29  9:54     ` Arnd Bergmann
2016-02-29 15:45 ` Joerg Roedel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160229154547.GA13711@8bytes.org \
    --to=joro@8bytes.org \
    --cc=arnd@arndb.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jroedel@suse.de \
    --cc=k.kozlowski@samsung.com \
    --cc=kgene@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).