[PATCH 0/2] ioremap_wc on arm64
Alexander Graf
agraf at suse.de
Mon May 22 04:58:01 PDT 2017
On 05/22/2017 01:53 PM, Jayachandran C wrote:
> On Mon, May 22, 2017 at 09:56:16AM +0100, Catalin Marinas wrote:
>> On Mon, May 22, 2017 at 07:01:45AM +0000, Jayachandran C wrote:
>>> From its definition, the device "gather" attribute seems to be a better
>>> fit for implementing write combining mapping in ioremap_wc(). And on
>>> ThunderX2, Device GRE mapping has optimizations that makes it much faster
>>> than normal uncached mapping.
>>>
>>> I am not sure of the reasoning behind the original decision to make
>>> ioremap_wc use "Normal Non-Cached" attribute, since all the other variants
>>> of ioremap use device attributes, and ioremap_wc looks like an exception.
>> The reason we kept it as Normal NC is that Device_GRE does not allow
>> unaligned accesses.
> There does not to be an expectation to have unaligned access on __iomem
> pointers. I also see that memremap can call ioremap_wc (which is a Normal
> mapping) or ioremap_wt(which is a Device mapping), so that is inconsistent
> as well.
>
> Was this added for a specific use case? Also, do you think this patchset
> is acceptable?
I think the patch description in patch 2/2 needs to be more explicit as
to why mapping device memory as normal is a problem.
Alex
More information about the linux-arm-kernel
mailing list