diff mbox

[Xen-devel] xen: arm: correctly write release target in smp_spin_table_cpu_up

Message ID 1389718504-1514-1-git-send-email-ian.campbell@citrix.com
State Accepted
Commit 5f979614eae087042f0283fa03186e97e5e04f70
Headers show

Commit Message

Ian Campbell Jan. 14, 2014, 4:55 p.m. UTC
flush_xen_data_tlb_range_va() is clearly bogus since it flushes the tlb, not
the data cache. Perhaps what was meant was flush_xen_dcache(), but the address
was mapped with ioremap_nocache and hence isn't cached in the first place.
Accesses should be via writeq though, so do that.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/arm64/smpboot.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Julien Grall Jan. 14, 2014, 6:48 p.m. UTC | #1
On 01/14/2014 04:55 PM, Ian Campbell wrote:
> flush_xen_data_tlb_range_va() is clearly bogus since it flushes the tlb, not
> the data cache. Perhaps what was meant was flush_xen_dcache(), but the address
> was mapped with ioremap_nocache and hence isn't cached in the first place.
> Accesses should be via writeq though, so do that.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
> ---
>  xen/arch/arm/arm64/smpboot.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/xen/arch/arm/arm64/smpboot.c b/xen/arch/arm/arm64/smpboot.c
> index 1287c72..9146476 100644
> --- a/xen/arch/arm/arm64/smpboot.c
> +++ b/xen/arch/arm/arm64/smpboot.c
> @@ -32,8 +32,7 @@ static int __init smp_spin_table_cpu_up(int cpu)
>          return -EFAULT;
>      }
>  
> -    release[0] = __pa(init_secondary);
> -    flush_xen_data_tlb_range_va((vaddr_t)release, sizeof(*release));
> +    writeq(__pa(init_secondary), release);
>  
>      iounmap(release);
>  
>
diff mbox

Patch

diff --git a/xen/arch/arm/arm64/smpboot.c b/xen/arch/arm/arm64/smpboot.c
index 1287c72..9146476 100644
--- a/xen/arch/arm/arm64/smpboot.c
+++ b/xen/arch/arm/arm64/smpboot.c
@@ -32,8 +32,7 @@  static int __init smp_spin_table_cpu_up(int cpu)
         return -EFAULT;
     }
 
-    release[0] = __pa(init_secondary);
-    flush_xen_data_tlb_range_va((vaddr_t)release, sizeof(*release));
+    writeq(__pa(init_secondary), release);
 
     iounmap(release);