xen: arm64: percpu variable support.
authorIan Campbell <ian.campbell@citrix.com>
Fri, 22 Feb 2013 08:58:08 +0000 (08:58 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 22 Feb 2013 12:14:54 +0000 (12:14 +0000)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/include/asm-arm/cpregs.h
xen/include/asm-arm/percpu.h

index ccd8335ba61dea6b16970218ffb3dd766ac6ae5e..80768d96659d0009dae61e9a0214ba7d301ad4b6 100644 (file)
 #define ID_PFR0_EL1             ID_PFR0
 #define ID_PFR1_EL1             ID_PFR1
 #define SCTLR_EL2               HSCTLR
+#define TPIDR_EL2               HTPIDR
 #define TTBR0_EL2               HTTBR
 #define VBAR_EL2                HVBAR
 #define VTCR_EL2                VTCR
index 3a2ba11f6d9556dc2ad7fea1b1e042aa0c933252..a0c38cebf43c1df3ac325438046be350ece9e3d0 100644 (file)
@@ -11,18 +11,17 @@ void percpu_init_areas(void);
     __section(".bss.percpu" #suffix)                            \
     __typeof__(type) per_cpu_##name
 
-
 #define per_cpu(var, cpu)  \
     (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]))
 #define __get_cpu_var(var) \
-    (*RELOC_HIDE(&per_cpu__##var, READ_CP32(HTPIDR)))
+    (*RELOC_HIDE(&per_cpu__##var, READ_SYSREG(TPIDR_EL2)))
 
 #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
 
 DECLARE_PER_CPU(unsigned int, cpu_id);
 #define get_processor_id()    (this_cpu(cpu_id))
 #define set_processor_id(id)  do {                      \
-    WRITE_CP32(__per_cpu_offset[id], HTPIDR);           \
+    WRITE_SYSREG(__per_cpu_offset[id], TPIDR_EL2);      \
     this_cpu(cpu_id) = (id);                            \
 } while(0)
 #endif