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

Re: [Xen-devel] [PATCH V3 11/41] xen/arm: Introduce ioremap_attr



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.


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


 


Rackspace

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