[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 04/15] xen: mm: add ioremap_cache



>>> Julien Grall <julien.grall@xxxxxxx> 07/11/17 10:15 PM >>>
>On 07/09/2017 09:10 AM, Kai Huang wrote:
>> Currently Xen only has non-cacheable version of ioremap. Although EPC is
>> reported as reserved memory in e820 but it can be mapped as cacheable. This
>> patch adds ioremap_cache (cacheable version of ioremap).
>> 
>> Signed-off-by: Kai Huang <kai.huang@xxxxxxxxxxxxxxx>
>> ---
>>   xen/arch/x86/mm.c      | 15 +++++++++++++--
>>   xen/include/xen/vmap.h |  1 +
>
>First of all, this is common code and the "REST" maintainers should have 
>been CCed for this include.
>
>But xen/include/xen/vmap.h is common code and going to break ARM. We 
>already have an inline implementation of ioremap_nocache. You should 
>move the definition in x86 specific headers.

Indeed, plus the ARM implementation actually shows how this would better
be done: Have a function allowing more than just true/false to be passed in,
to eventually also allow having ioremap_wc() and alike as wrappers. As long
as it's x86-specific I'd then also suggest calling the new wrapper function
ioremap_wb() (as "cache" may also mean WT).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.