From ae548f1006096a08846f1df00414c04172feb419 Mon Sep 17 00:00:00 2001 From: Glauber de Oliveira Costa Date: Wed, 30 Jan 2008 13:31:27 +0100 Subject: [PATCH] --- yaml --- r: 80032 b: refs/heads/master c: 62d7d7ed11760a0fea40e4fc6f0553e721d00443 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-x86/processor.h | 19 +++++++++++++++++++ trunk/include/asm-x86/processor_32.h | 17 ----------------- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index 60f537cefe00..a0b1f250fc57 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1b46cbe0ccaad25786526601bc54426f2e2abb20 +refs/heads/master: 62d7d7ed11760a0fea40e4fc6f0553e721d00443 diff --git a/trunk/include/asm-x86/processor.h b/trunk/include/asm-x86/processor.h index 8d0af7bf090a..8b7794766884 100644 --- a/trunk/include/asm-x86/processor.h +++ b/trunk/include/asm-x86/processor.h @@ -78,6 +78,24 @@ static inline void native_set_debugreg(int regno, unsigned long value) } } +/* + * Set IOPL bits in EFLAGS from given mask + */ +static inline void native_set_iopl_mask(unsigned mask) +{ +#ifdef CONFIG_X86_32 + unsigned int reg; + __asm__ __volatile__ ("pushfl;" + "popl %0;" + "andl %1, %0;" + "orl %2, %0;" + "pushl %0;" + "popfl" + : "=&r" (reg) + : "i" (~X86_EFLAGS_IOPL), "r" (mask)); +#endif +} + #ifndef CONFIG_PARAVIRT #define __cpuid native_cpuid @@ -91,6 +109,7 @@ static inline void native_set_debugreg(int regno, unsigned long value) #define set_debugreg(value, register) \ native_set_debugreg(register, value) +#define set_iopl_mask native_set_iopl_mask #endif /* CONFIG_PARAVIRT */ /* diff --git a/trunk/include/asm-x86/processor_32.h b/trunk/include/asm-x86/processor_32.h index e7fc023cd810..516a38ad2a7a 100644 --- a/trunk/include/asm-x86/processor_32.h +++ b/trunk/include/asm-x86/processor_32.h @@ -455,21 +455,6 @@ static inline void native_load_sp0(struct tss_struct *tss, struct thread_struct wrmsr(MSR_IA32_SYSENTER_CS, thread->sysenter_cs, 0); } } -/* - * Set IOPL bits in EFLAGS from given mask - */ -static inline void native_set_iopl_mask(unsigned mask) -{ - unsigned int reg; - __asm__ __volatile__ ("pushfl;" - "popl %0;" - "andl %1, %0;" - "orl %2, %0;" - "pushl %0;" - "popfl" - : "=&r" (reg) - : "i" (~X86_EFLAGS_IOPL), "r" (mask)); -} #ifdef CONFIG_PARAVIRT #include @@ -479,8 +464,6 @@ static inline void load_sp0(struct tss_struct *tss, struct thread_struct *thread { native_load_sp0(tss, thread); } - -#define set_iopl_mask native_set_iopl_mask #endif /* CONFIG_PARAVIRT */ /* generic versions from gas */