Commit cca2e6f8 authored by Joe Perches's avatar Joe Perches Committed by Ingo Molnar

include/asm-x86/processor.h: checkpatch cleanups - formatting only

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 4943aa4e
...@@ -175,7 +175,7 @@ static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, ...@@ -175,7 +175,7 @@ static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
unsigned int *ecx, unsigned int *edx) unsigned int *ecx, unsigned int *edx)
{ {
/* ecx is often an input as well as an output. */ /* ecx is often an input as well as an output. */
__asm__("cpuid" asm("cpuid"
: "=a" (*eax), : "=a" (*eax),
"=b" (*ebx), "=b" (*ebx),
"=c" (*ecx), "=c" (*ecx),
...@@ -427,17 +427,23 @@ static inline unsigned long native_get_debugreg(int regno) ...@@ -427,17 +427,23 @@ static inline unsigned long native_get_debugreg(int regno)
switch (regno) { switch (regno) {
case 0: case 0:
asm("mov %%db0, %0" :"=r" (val)); break; asm("mov %%db0, %0" :"=r" (val));
break;
case 1: case 1:
asm("mov %%db1, %0" :"=r" (val)); break; asm("mov %%db1, %0" :"=r" (val));
break;
case 2: case 2:
asm("mov %%db2, %0" :"=r" (val)); break; asm("mov %%db2, %0" :"=r" (val));
break;
case 3: case 3:
asm("mov %%db3, %0" :"=r" (val)); break; asm("mov %%db3, %0" :"=r" (val));
break;
case 6: case 6:
asm("mov %%db6, %0" :"=r" (val)); break; asm("mov %%db6, %0" :"=r" (val));
break;
case 7: case 7:
asm("mov %%db7, %0" :"=r" (val)); break; asm("mov %%db7, %0" :"=r" (val));
break;
default: default:
BUG(); BUG();
} }
...@@ -478,7 +484,7 @@ static inline void native_set_iopl_mask(unsigned mask) ...@@ -478,7 +484,7 @@ static inline void native_set_iopl_mask(unsigned mask)
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
unsigned int reg; unsigned int reg;
__asm__ __volatile__ ("pushfl;" asm volatile ("pushfl;"
"popl %0;" "popl %0;"
"andl %1, %0;" "andl %1, %0;"
"orl %2, %0;" "orl %2, %0;"
...@@ -523,8 +529,8 @@ static inline void native_swapgs(void) ...@@ -523,8 +529,8 @@ static inline void native_swapgs(void)
#define set_debugreg(value, register) \ #define set_debugreg(value, register) \
native_set_debugreg(register, value) native_set_debugreg(register, value)
static inline void static inline void load_sp0(struct tss_struct *tss,
load_sp0(struct tss_struct *tss, struct thread_struct *thread) struct thread_struct *thread)
{ {
native_load_sp0(tss, thread); native_load_sp0(tss, thread);
} }
...@@ -680,7 +686,7 @@ static inline unsigned int cpuid_edx(unsigned int op) ...@@ -680,7 +686,7 @@ static inline unsigned int cpuid_edx(unsigned int op)
/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
static inline void rep_nop(void) static inline void rep_nop(void)
{ {
__asm__ __volatile__("rep; nop" ::: "memory"); asm volatile("rep; nop" ::: "memory");
} }
static inline void cpu_relax(void) static inline void cpu_relax(void)
...@@ -697,28 +703,25 @@ static inline void sync_core(void) ...@@ -697,28 +703,25 @@ static inline void sync_core(void)
: "ebx", "ecx", "edx", "memory"); : "ebx", "ecx", "edx", "memory");
} }
static inline void static inline void __monitor(const void *eax, unsigned long ecx,
__monitor(const void *eax, unsigned long ecx, unsigned long edx) unsigned long edx)
{ {
/* "monitor %eax, %ecx, %edx;" */ /* "monitor %eax, %ecx, %edx;" */
asm volatile( asm volatile(".byte 0x0f, 0x01, 0xc8;"
".byte 0x0f, 0x01, 0xc8;"
:: "a" (eax), "c" (ecx), "d"(edx)); :: "a" (eax), "c" (ecx), "d"(edx));
} }
static inline void __mwait(unsigned long eax, unsigned long ecx) static inline void __mwait(unsigned long eax, unsigned long ecx)
{ {
/* "mwait %eax, %ecx;" */ /* "mwait %eax, %ecx;" */
asm volatile( asm volatile(".byte 0x0f, 0x01, 0xc9;"
".byte 0x0f, 0x01, 0xc9;"
:: "a" (eax), "c" (ecx)); :: "a" (eax), "c" (ecx));
} }
static inline void __sti_mwait(unsigned long eax, unsigned long ecx) static inline void __sti_mwait(unsigned long eax, unsigned long ecx)
{ {
/* "mwait %eax, %ecx;" */ /* "mwait %eax, %ecx;" */
asm volatile( asm volatile("sti; .byte 0x0f, 0x01, 0xc9;"
"sti; .byte 0x0f, 0x01, 0xc9;"
:: "a" (eax), "c" (ecx)); :: "a" (eax), "c" (ecx));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment