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

Re: [Xen-devel] [PATCH RFC 5/7] xen: arm: rewrite start of day page table and cpu bring up



On 09/17/2013 02:40 AM, Ian Campbell wrote:
>  void platform_reset(void)
>  {
>      if ( platform && platform->reset )
> diff --git a/xen/arch/arm/platforms/vexpress.c 
> b/xen/arch/arm/platforms/vexpress.c
> index 6f7dc2c..2d8d905 100644
> --- a/xen/arch/arm/platforms/vexpress.c
> +++ b/xen/arch/arm/platforms/vexpress.c
> @@ -21,6 +21,7 @@
>  #include <asm/platform.h>
>  #include <xen/mm.h>
>  #include <xen/vmap.h>
> +#include <asm/gic.h>
>  
>  #define DCC_SHIFT      26
>  #define FUNCTION_SHIFT 20
> @@ -119,6 +120,41 @@ static void vexpress_reset(void)
>      iounmap(sp810);
>  }
>  
> +#ifdef CONFIG_ARM_32
> +static int vexpress_cpu_up(int cpu)
> +{
> +    static int have_set_sysflags = 0;
> +
> +    /* XXX separate init hook? */
> +    if ( !have_set_sysflags )
> +    {
> +        void __iomem *sysflags;
> +
> +        sysflags = ioremap_nocache(V2M_SYS_MMIO_BASE, PAGE_SIZE);

The device should contains a node with compatible "arm,vexpress-sysreg".
Can you use this node instead of hardcoding value?

> +        if ( !sysflags )
> +        {
> +            dprintk(XENLOG_ERR, "Unable to map vexpress MMIO\n");
> +            return -EFAULT;
> +        }
> +
> +        printk("Set SYS_FLAGS to %"PRIpaddr" (%p)\n",
> +               __pa(init_secondary), init_secondary);
> +        iowritel(sysflags + V2M_SYS_FLAGSCLR, ~0);
> +        iowritel(sysflags + V2M_SYS_FLAGSSET,
> +                 __pa(init_secondary));
> +
> +        iounmap(sysflags);
> +
> +        have_set_sysflags  = 1;
> +    }
> +
> +    printk("Waking CPU%d\n", cpu);
> +    send_SGI_mask(cpumask_of(cpu), GIC_SGI_EVENT_CHECK);
> +
> +    return 0;
> +}
> +#endif
> +

-- 
Julien Grall

_______________________________________________
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®.