diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-12-11 11:36:00 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-12-11 11:36:00 +0000 |
commit | 3bc61439add8aa6386afcff33a46a85d2247b960 (patch) | |
tree | 32bc8a298cefe09025dffc909c296e0bd6c83084 /xen/include/asm-x86/x86_64 | |
parent | 3245eb0237a6cdf5252efad3dda8030f8e97240a (diff) | |
download | xen-3bc61439add8aa6386afcff33a46a85d2247b960.tar.gz xen-3bc61439add8aa6386afcff33a46a85d2247b960.tar.bz2 xen-3bc61439add8aa6386afcff33a46a85d2247b960.zip |
x86: unify local_irq_XXX()
This also removes an inconsistency in that x86-64's __save_flags() had
a memory clobber, while x86_32's didn't.
It further adds type checking since blindly using {pop,push}{l,q} on a
memory operand of unknown size bares the risk of corrupting other
data.
Finally, it eliminates the redundant (with local_irq_restore())
__restore_flags() macro and renames __save_flags() to
local_save_flags(), making the naming consistent with Linux (again?).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/include/asm-x86/x86_64')
-rw-r--r-- | xen/include/asm-x86/x86_64/system.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/xen/include/asm-x86/x86_64/system.h b/xen/include/asm-x86/x86_64/system.h index 229fc15292..fa9b3118b0 100644 --- a/xen/include/asm-x86/x86_64/system.h +++ b/xen/include/asm-x86/x86_64/system.h @@ -55,14 +55,4 @@ static inline void atomic_write64(uint64_t *p, uint64_t v) #define mb() \ asm volatile ( "mfence" : : : "memory" ) -#define __save_flags(x) \ - asm volatile ( "pushfq ; popq %q0" : "=g" (x) : :"memory" ) -#define __restore_flags(x) \ - asm volatile ( "pushq %0 ; popfq" : : "g" (x) : "memory", "cc" ) - -#define local_irq_save(x) \ - asm volatile ( "pushfq ; popq %0 ; cli" : "=g" (x) : : "memory" ) -#define local_irq_restore(x) \ - __restore_flags(x) - #endif /* __X86_64_SYSTEM_H__ */ |