# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 9394204977b66a7e522b39fcdcbfa64874a699a5
# Parent  f14c5c57785499805f321ad4f7e5f45980691100
[POWERPC][XEN] get_hard_smp_processor_id() must reference the global_cpu_table[]

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 xen/arch/powerpc/powerpc64/ppc970.c |    2 --
 xen/include/asm-powerpc/current.h   |    2 +-
 xen/include/asm-powerpc/smp.h       |    2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff -r f14c5c577854 -r 9394204977b6 xen/arch/powerpc/powerpc64/ppc970.c
--- a/xen/arch/powerpc/powerpc64/ppc970.c       Tue Aug 29 17:28:45 2006 -0400
+++ b/xen/arch/powerpc/powerpc64/ppc970.c       Wed Aug 30 08:51:36 2006 -0400
@@ -32,8 +32,6 @@
 
 #undef SERIALIZE
 
-extern volatile struct processor_area * volatile global_cpu_table[];
-
 struct rma_settings {
     int order;
     int rmlr0;
diff -r f14c5c577854 -r 9394204977b6 xen/include/asm-powerpc/current.h
--- a/xen/include/asm-powerpc/current.h Tue Aug 29 17:28:45 2006 -0400
+++ b/xen/include/asm-powerpc/current.h Wed Aug 30 08:51:36 2006 -0400
@@ -27,8 +27,8 @@
 
 struct vcpu;
 
+extern volatile struct processor_area * volatile global_cpu_table[];
 register volatile struct processor_area *parea asm("r13");
-
 static inline struct vcpu *get_current(void)
 {
     return parea->cur_vcpu;
diff -r f14c5c577854 -r 9394204977b6 xen/include/asm-powerpc/smp.h
--- a/xen/include/asm-powerpc/smp.h     Tue Aug 29 17:28:45 2006 -0400
+++ b/xen/include/asm-powerpc/smp.h     Wed Aug 30 08:51:36 2006 -0400
@@ -27,7 +27,7 @@ extern int smp_num_siblings;
 extern int smp_num_siblings;
 
 /* revisit when we support SMP */
-#define get_hard_smp_processor_id(i) i
+#define get_hard_smp_processor_id(i) (global_cpu_table[i]->whoami)
 #define raw_smp_processor_id() (parea->whoami)
 #define hard_smp_processor_id() raw_smp_processor_id()
 extern cpumask_t cpu_sibling_map[];

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Reply via email to