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

Re: [Xen-devel] [PATCH 09/16] xen: arm: explicitly map 64 bit release address



On Wed, 20 Nov 2013, Ian Campbell wrote:
> In case it is outside visible ram.
> 
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>


>  xen/arch/arm/arm64/smpboot.c |   14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/arm/arm64/smpboot.c b/xen/arch/arm/arm64/smpboot.c
> index 8239590..8696ed6 100644
> --- a/xen/arch/arm/arm64/smpboot.c
> +++ b/xen/arch/arm/arm64/smpboot.c
> @@ -4,6 +4,8 @@
>  #include <xen/errno.h>
>  #include <xen/mm.h>
>  #include <xen/smp.h>
> +#include <xen/vmap.h>
> +#include <asm/io.h>
>  
>  struct smp_enable_ops {
>          int             (*prepare_cpu)(int);
> @@ -14,7 +16,7 @@ static struct smp_enable_ops smp_enable_ops[NR_CPUS];
>  
>  static int __init smp_spin_table_cpu_up(int cpu)
>  {
> -    paddr_t *release;
> +    paddr_t __iomem *release;
>  
>      if (!cpu_release_addr[cpu])
>      {
> @@ -22,12 +24,20 @@ static int __init smp_spin_table_cpu_up(int cpu)
>          return -ENODEV;
>      }
>  
> -    release = __va(cpu_release_addr[cpu]);
> +    release = ioremap_nocache(cpu_release_addr[cpu], 8);
> +    if ( !release )
> +    {
> +        dprintk(XENLOG_ERR, "CPU%d: Unable to map release address\n", cpu);
> +        return -EFAULT;
> +    }
>  
>      release[0] = __pa(init_secondary);
>      flush_xen_data_tlb_range_va((vaddr_t)release, sizeof(*release));
>  
> +    iounmap(release);
> +
>      sev();
> +
>      return 0;
>  }
>  
> -- 
> 1.7.10.4
> 

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