From: Ian Campbell Subject: Re: [PATCH V3 11/41] xen/arm: Introduce ioremap_attr Date: Fri, 10 May 2013 13:07:01 +0100 Message-ID: <1368187621.27857.95.camel@zakaz.uk.xensource.com> References: <1368152307-598-1-git-send-email-julien.grall@linaro.org> <1368152307-598-12-git-send-email-julien.grall@linaro.org> <1368177200.27857.26.camel@zakaz.uk.xensource.com> <518CE155.3000107@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <518CE155.3000107@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Stefano Stabellini , "patches@linaro.org" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Fri, 2013-05-10 at 13:00 +0100, Julien Grall wrote: > On 05/10/2013 10:13 AM, Ian Campbell wrote: > > > On Fri, 2013-05-10 at 03:17 +0100, Julien Grall wrote: > >> Map physical range in virtual memory with a specific mapping attribute. > >> Also add new mapping attributes for ARM: PAGE_HYPERVISOR_NOCACHE > >> and PAGE_HYPERVISOR_WC. > > > > I think it would be useful, e.g. if when we want to reuse Linux SYS MMU > > code, to follow the Linux convention here which is ioremap_(no)cache, > > ioremap_wc etc. > Is macro for those functions is sufficient? If need be that's fine, is there anything which breaks if you use a static inline? > >> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > >> index 29447ef..a667db4 100644 > >> --- a/xen/arch/arm/setup.c > >> +++ b/xen/arch/arm/setup.c > >> @@ -429,6 +429,8 @@ void __init start_xen(unsigned long boot_phys_offset, > >> setup_pagetables(boot_phys_offset, get_xen_paddr()); > >> setup_mm(fdt_paddr, fdt_size); > >> > >> + vm_init(); > >> + > >> #ifdef EARLY_UART_ADDRESS > >> /* TODO Need to get device tree or command line for UART address */ > >> pl011_init(0, FIXMAP_ADDR(FIXMAP_CONSOLE)); > >> @@ -483,8 +485,6 @@ void __init start_xen(unsigned long boot_phys_offset, > >> > >> console_init_postirq(); > >> > >> - vm_init(); > >> - > >> do_presmp_initcalls(); > >> > >> for_each_present_cpu ( i ) > > > > This movement seems to be unrelated to the purpose of this patch? > > vm_init initialize vmap code, which is used by ioremap_attr. The > function was called to late. But this patch doesn't add any callers, I presume that a caller will subsequently be introduce which then requires it to be earlier. I think it would be sufficient to simply mention this upcoming caller in the commit message and refer to the need to init sooner. Ian.