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

[Xen-changelog] [xen-unstable] [IA64] Fix MINSTATE_GET_CURRENT



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID d6b6d3defe81420b3a4f7bec812292e6cc7b2b31
# Parent  446402805fd9d50482c8be15479a682c362b518e
[IA64] Fix MINSTATE_GET_CURRENT

To get virtual curent address in both physcal mode and virtual mode, 
add MINSTATE_GET_CURRENT_VIRT.

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
---
 xen/arch/ia64/linux-xen/minstate.h |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff -r 446402805fd9 -r d6b6d3defe81 xen/arch/ia64/linux-xen/minstate.h
--- a/xen/arch/ia64/linux-xen/minstate.h        Thu Jul 06 10:32:26 2006 -0600
+++ b/xen/arch/ia64/linux-xen/minstate.h        Thu Jul 06 10:42:13 2006 -0600
@@ -89,6 +89,7 @@
 # define MINSTATE_GET_CURRENT(reg)                                     \
                movl reg=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;;      \
                ld8 reg=[reg]
+# define MINSTATE_GET_CURRENT_VIRT(reg)        MINSTATE_GET_CURRENT(reg)
 #else
 # define MINSTATE_GET_CURRENT(reg)     mov reg=IA64_KR(CURRENT)
 #endif
@@ -97,7 +98,19 @@
 #endif
 
 #ifdef MINSTATE_PHYS
+# ifdef XEN
+# define MINSTATE_GET_CURRENT(reg)                                     \
+       movl reg=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;;              \
+       tpa reg=reg;;                                                   \
+       ld8 reg=[reg];;                                                 \
+       tpa reg=reg;;
+# define MINSTATE_GET_CURRENT_VIRT(reg)                                        
\
+       movl reg=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;;              \
+       tpa reg=reg;;                                                   \
+       ld8 reg=[reg];;
+#else
 # define MINSTATE_GET_CURRENT(reg)     mov reg=IA64_KR(CURRENT);; tpa reg=reg
+#endif /* XEN */
 # define MINSTATE_START_SAVE_MIN       MINSTATE_START_SAVE_MIN_PHYS
 # define MINSTATE_END_SAVE_MIN         MINSTATE_END_SAVE_MIN_PHYS
 #endif
@@ -200,8 +213,8 @@
        ;;                                                                      
                \
 .mem.offset 0,0; st8.spill [r16]=r13,16;                                       
                \
 .mem.offset 8,0; st8.spill [r17]=r21,16;       /* save ar.fpsr */              
                \
-       /* XEN mov r13=IA64_KR(CURRENT);*/      /* establish `current' */       
                        \
-       MINSTATE_GET_CURRENT(r13);              /* XEN establish `current' */   
                        \
+       /* XEN mov r13=IA64_KR(CURRENT);*/      /* establish `current' */       
                \
+       MINSTATE_GET_CURRENT_VIRT(r13);         /* XEN establish `current' */   
                \
        ;;                                                                      
                \
 .mem.offset 0,0; st8.spill [r16]=r15,16;                                       
                \
 .mem.offset 8,0; st8.spill [r17]=r14,16;                                       
                \

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.