ia64/linux-2.6.18-xen.hg

changeset 508:dbe8a35dcaf7

[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@jp.fujitsu.com>
author Alex Williamson <alex.williamson@hp.com>
date Mon Apr 14 13:29:37 2008 -0600 (2008-04-14)
parents ec6e3e18ea31
children ae505684a995
files include/asm-ia64/xen/privop.h
line diff
     1.1 --- a/include/asm-ia64/xen/privop.h	Wed Apr 02 10:02:57 2008 -0600
     1.2 +++ b/include/asm-ia64/xen/privop.h	Mon Apr 14 13:29:37 2008 -0600
     1.3 @@ -67,8 +67,7 @@
     1.4  #endif
     1.5  
     1.6  #ifndef __ASSEMBLY__
     1.7 -#define	XEN_HYPER_SSM_I		asm("break %0" : : "i" (HYPERPRIVOP_SSM_I))
     1.8 -#define	XEN_HYPER_GET_IVR	asm("break %0" : : "i" (HYPERPRIVOP_GET_IVR))
     1.9 +#define	XEN_HYPER_SSM_I		asm("break %0" : : "i" (HYPERPRIVOP_SSM_I): "memory")
    1.10  
    1.11  /************************************************/
    1.12  /* Instructions paravirtualized for correctness */
    1.13 @@ -83,7 +82,7 @@ static inline void
    1.14  xen_fc(unsigned long addr)
    1.15  {
    1.16  	register __u64 __addr asm ("r8") = addr;
    1.17 -	asm volatile ("break %0":: "i"(HYPERPRIVOP_FC), "r"(__addr));
    1.18 +	asm volatile ("break %0":: "i"(HYPERPRIVOP_FC), "r"(__addr): "memory");
    1.19  }
    1.20  
    1.21  static inline unsigned long
    1.22 @@ -188,7 +187,7 @@ static inline void
    1.23  xen_set_eflag(unsigned long val)
    1.24  {
    1.25  	register __u64 __val asm ("r8") = val;
    1.26 -	asm volatile ("break %0":: "i"(HYPERPRIVOP_SET_EFLAG), "r"(__val));
    1.27 +	asm volatile ("break %0":: "i"(HYPERPRIVOP_SET_EFLAG), "r"(__val): "memory");
    1.28  }
    1.29  #else
    1.30  extern unsigned long xen_get_eflag(void);	/* see xen_ia64_getreg */
    1.31 @@ -331,7 +330,7 @@ xen_set_tpr(unsigned long val)
    1.32  {
    1.33  	register __u64 __val asm ("r8") = val;
    1.34  	asm volatile ("break %0"::
    1.35 -		      "i"(HYPERPRIVOP_GET_TPR), "r"(__val));
    1.36 +		      "i"(HYPERPRIVOP_GET_TPR), "r"(__val): "memory");
    1.37  }
    1.38  
    1.39  static inline void
    1.40 @@ -339,14 +338,14 @@ xen_eoi(unsigned long val)
    1.41  {
    1.42  	register __u64 __val asm ("r8") = val;
    1.43  	asm volatile ("break %0"::
    1.44 -		      "i"(HYPERPRIVOP_EOI), "r"(__val));
    1.45 +		      "i"(HYPERPRIVOP_EOI), "r"(__val): "memory");
    1.46  }
    1.47  
    1.48  static inline void
    1.49  xen_set_itm(unsigned long val)
    1.50  {
    1.51  	register __u64 __val asm ("r8") = val;
    1.52 -	asm volatile ("break %0":: "i"(HYPERPRIVOP_SET_ITM), "r"(__val));
    1.53 +	asm volatile ("break %0":: "i"(HYPERPRIVOP_SET_ITM), "r"(__val): "memory");
    1.54  }
    1.55  
    1.56  static inline void
    1.57 @@ -355,7 +354,7 @@ xen_ptcga(unsigned long addr, unsigned l
    1.58  	register __u64 __addr asm ("r8") = addr;
    1.59  	register __u64 __size asm ("r9") = size;
    1.60  	asm volatile ("break %0"::
    1.61 -		      "i"(HYPERPRIVOP_PTC_GA), "r"(__addr), "r"(__size));
    1.62 +		      "i"(HYPERPRIVOP_PTC_GA), "r"(__addr), "r"(__size): "memory");
    1.63  }
    1.64  
    1.65  static inline unsigned long
    1.66 @@ -375,7 +374,7 @@ xen_set_rr(unsigned long index, unsigned
    1.67  	register __u64 __index asm ("r8") = index;
    1.68  	register __u64 __val asm ("r9") = val;
    1.69  	asm volatile ("break %0"::
    1.70 -		      "i"(HYPERPRIVOP_SET_RR), "r"(__index), "r"(__val));
    1.71 +		      "i"(HYPERPRIVOP_SET_RR), "r"(__index), "r"(__val): "memory");
    1.72  }
    1.73  
    1.74  static inline void
    1.75 @@ -390,7 +389,7 @@ xen_set_rr0_to_rr4(unsigned long val0, u
    1.76  	asm volatile ("break %0" ::
    1.77  		      "i"(HYPERPRIVOP_SET_RR0_TO_RR4),
    1.78  		      "r"(__val0), "r"(__val1),
    1.79 -		      "r"(__val2), "r"(__val3), "r"(__val4));
    1.80 +		      "r"(__val2), "r"(__val3), "r"(__val4): "memory");
    1.81  }
    1.82  
    1.83  static inline void
    1.84 @@ -399,7 +398,7 @@ xen_set_kr(unsigned long index, unsigned
    1.85  	register __u64 __index asm ("r8") = index;
    1.86  	register __u64 __val asm ("r9") = val;
    1.87  	asm volatile ("break %0"::
    1.88 -		      "i"(HYPERPRIVOP_SET_KR), "r"(__index), "r"(__val));
    1.89 +		      "i"(HYPERPRIVOP_SET_KR), "r"(__index), "r"(__val): "memory");
    1.90  }
    1.91  #endif
    1.92