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

From: Arnd Bergmann
Date: Mon Feb 29 2016 - 04:55:38 EST


On Monday 29 February 2016 10:33:59 Marek Szyprowski wrote:
> > ---
> > 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.
>
> Okay, so in the driver code all __raw_writel should be replaced by
> writel(), right?

Yes, writel() is always the safe choice if you don't know what to
use. __raw_writel() should be considered an implementation detail
and not used in drivers at all. There is also writel_relaxed(),
which is faster than writel() because it leaves out all the
barriers (as __raw_writel does too), and you can sometimes use that
in the fast path if you can prove that no barriers are needed.

Arnd