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

[Xen-changelog] [linux-2.6.18-xen] [IA64] Set memory attribute in inline asm



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1208201377 21600
# Node ID dbe8a35dcaf7c12b816e358c596f7fcc9b926e77
# Parent  ec6e3e18ea314e9520ee6bba898e30228bf3bda4
[IA64] Set memory attribute in inline asm

Some priv_ops need memory attribulte in inline asm.  This avoids
potential issues if the compiler optimizes the functions.

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
---
 include/asm-ia64/xen/privop.h |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff -r ec6e3e18ea31 -r dbe8a35dcaf7 include/asm-ia64/xen/privop.h
--- a/include/asm-ia64/xen/privop.h     Wed Apr 02 10:02:57 2008 -0600
+++ b/include/asm-ia64/xen/privop.h     Mon Apr 14 13:29:37 2008 -0600
@@ -67,8 +67,7 @@
 #endif
 
 #ifndef __ASSEMBLY__
-#define        XEN_HYPER_SSM_I         asm("break %0" : : "i" 
(HYPERPRIVOP_SSM_I))
-#define        XEN_HYPER_GET_IVR       asm("break %0" : : "i" 
(HYPERPRIVOP_GET_IVR))
+#define        XEN_HYPER_SSM_I         asm("break %0" : : "i" 
(HYPERPRIVOP_SSM_I): "memory")
 
 /************************************************/
 /* Instructions paravirtualized for correctness */
@@ -83,7 +82,7 @@ xen_fc(unsigned long addr)
 xen_fc(unsigned long addr)
 {
        register __u64 __addr asm ("r8") = addr;
-       asm volatile ("break %0":: "i"(HYPERPRIVOP_FC), "r"(__addr));
+       asm volatile ("break %0":: "i"(HYPERPRIVOP_FC), "r"(__addr): "memory");
 }
 
 static inline unsigned long
@@ -188,7 +187,7 @@ xen_set_eflag(unsigned long val)
 xen_set_eflag(unsigned long val)
 {
        register __u64 __val asm ("r8") = val;
-       asm volatile ("break %0":: "i"(HYPERPRIVOP_SET_EFLAG), "r"(__val));
+       asm volatile ("break %0":: "i"(HYPERPRIVOP_SET_EFLAG), "r"(__val): 
"memory");
 }
 #else
 extern unsigned long xen_get_eflag(void);      /* see xen_ia64_getreg */
@@ -331,7 +330,7 @@ xen_set_tpr(unsigned long val)
 {
        register __u64 __val asm ("r8") = val;
        asm volatile ("break %0"::
-                     "i"(HYPERPRIVOP_GET_TPR), "r"(__val));
+                     "i"(HYPERPRIVOP_GET_TPR), "r"(__val): "memory");
 }
 
 static inline void
@@ -339,14 +338,14 @@ xen_eoi(unsigned long val)
 {
        register __u64 __val asm ("r8") = val;
        asm volatile ("break %0"::
-                     "i"(HYPERPRIVOP_EOI), "r"(__val));
+                     "i"(HYPERPRIVOP_EOI), "r"(__val): "memory");
 }
 
 static inline void
 xen_set_itm(unsigned long val)
 {
        register __u64 __val asm ("r8") = val;
-       asm volatile ("break %0":: "i"(HYPERPRIVOP_SET_ITM), "r"(__val));
+       asm volatile ("break %0":: "i"(HYPERPRIVOP_SET_ITM), "r"(__val): 
"memory");
 }
 
 static inline void
@@ -355,7 +354,7 @@ xen_ptcga(unsigned long addr, unsigned l
        register __u64 __addr asm ("r8") = addr;
        register __u64 __size asm ("r9") = size;
        asm volatile ("break %0"::
-                     "i"(HYPERPRIVOP_PTC_GA), "r"(__addr), "r"(__size));
+                     "i"(HYPERPRIVOP_PTC_GA), "r"(__addr), "r"(__size): 
"memory");
 }
 
 static inline unsigned long
@@ -375,7 +374,7 @@ xen_set_rr(unsigned long index, unsigned
        register __u64 __index asm ("r8") = index;
        register __u64 __val asm ("r9") = val;
        asm volatile ("break %0"::
-                     "i"(HYPERPRIVOP_SET_RR), "r"(__index), "r"(__val));
+                     "i"(HYPERPRIVOP_SET_RR), "r"(__index), "r"(__val): 
"memory");
 }
 
 static inline void
@@ -390,7 +389,7 @@ xen_set_rr0_to_rr4(unsigned long val0, u
        asm volatile ("break %0" ::
                      "i"(HYPERPRIVOP_SET_RR0_TO_RR4),
                      "r"(__val0), "r"(__val1),
-                     "r"(__val2), "r"(__val3), "r"(__val4));
+                     "r"(__val2), "r"(__val3), "r"(__val4): "memory");
 }
 
 static inline void
@@ -399,7 +398,7 @@ xen_set_kr(unsigned long index, unsigned
        register __u64 __index asm ("r8") = index;
        register __u64 __val asm ("r9") = val;
        asm volatile ("break %0"::
-                     "i"(HYPERPRIVOP_SET_KR), "r"(__index), "r"(__val));
+                     "i"(HYPERPRIVOP_SET_KR), "r"(__index), "r"(__val): 
"memory");
 }
 #endif
 

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