From 88976ee187dce4c8de56e25955631de9765d96d1 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 4 Feb 2008 16:47:58 +0100 Subject: x86: use _ASM_EXTABLE macro in include/asm-x86/system.h Use the _ASM_EXTABLE macro from , instead of open-coding __ex_table entires in include/asm-x86/system.h. Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- include/asm-x86/system.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'include/asm-x86/system.h') diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h index ee32ef9367f4..428348e990bf 100644 --- a/include/asm-x86/system.h +++ b/include/asm-x86/system.h @@ -130,10 +130,7 @@ extern void load_gs_index(unsigned); "movl %k1, %%" #seg "\n\t" \ "jmp 2b\n" \ ".previous\n" \ - ".section __ex_table,\"a\"\n\t" \ - _ASM_ALIGN "\n\t" \ - _ASM_PTR " 1b,3b\n" \ - ".previous" \ + _ASM_EXTABLE(1b,3b) \ : :"r" (value), "r" (0)) @@ -214,12 +211,10 @@ static inline unsigned long native_read_cr4_safe(void) /* This could fault if %cr4 does not exist. In x86_64, a cr4 always * exists, so it will never fail. */ #ifdef CONFIG_X86_32 - asm volatile("1: mov %%cr4, %0 \n" - "2: \n" - ".section __ex_table,\"a\" \n" - ".long 1b,2b \n" - ".previous \n" - : "=r" (val), "=m" (__force_order) : "0" (0)); + asm volatile("1: mov %%cr4, %0\n" + "2:\n" + _ASM_EXTABLE(1b,2b) + : "=r" (val), "=m" (__force_order) : "0" (0)); #else val = native_read_cr4(); #endif -- cgit v1.2.2 From 84fb144b928744cea8eb39bb4fbc794fcb749175 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 4 Feb 2008 16:48:00 +0100 Subject: x86: reintroduce volatile keyword in prototype to clflush() The volatile keyword was removed from the clflush() prototype in commit e34907ae180f4fe6c28bb4516c679c2f81b0c9ed; the comment there states: x86: remove volatile keyword from clflush. the p parameter is an explicit memory reference, and is enough to prevent gcc to being nasty here. The volatile seems completely not needed. This reflects incorrect understanding of the function of the volatile keyword there. The purpose of the volatile keyword is informing gcc that it is safe to pass a volatile pointer to this function. Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- include/asm-x86/system.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/asm-x86/system.h') diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h index 428348e990bf..e9c15c97dfe2 100644 --- a/include/asm-x86/system.h +++ b/include/asm-x86/system.h @@ -271,9 +271,9 @@ static inline void native_wbinvd(void) #endif /* __KERNEL__ */ -static inline void clflush(void *__p) +static inline void clflush(volatile void *__p) { - asm volatile("clflush %0" : "+m" (*(char __force *)__p)); + asm volatile("clflush %0" : "+m" (*(volatile char __force *)__p)); } #define nop() __asm__ __volatile__ ("nop") -- cgit v1.2.2 From 599db4fe23d3869af98e2addef5628faef550f60 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Mon, 4 Feb 2008 16:48:03 +0100 Subject: x86: remove final FASTCALL() uses A few snuck back in to x86. Signed-off-by: Harvey Harrison Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- include/asm-x86/system.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/asm-x86/system.h') diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h index e9c15c97dfe2..9cff02ffe6c2 100644 --- a/include/asm-x86/system.h +++ b/include/asm-x86/system.h @@ -20,8 +20,8 @@ #ifdef CONFIG_X86_32 struct task_struct; /* one of the stranger aspects of C forward declarations */ -extern struct task_struct *FASTCALL(__switch_to(struct task_struct *prev, - struct task_struct *next)); +struct task_struct *__switch_to(struct task_struct *prev, + struct task_struct *next); /* * Saving eflags is important. It switches not only IOPL between tasks, -- cgit v1.2.2