From: Andi Kleen on
x86: Fix vsyscall on gcc 4.5 with -Os

This fixes the -Os breaks with gcc 4.5 bug.
rdtsc_barrier needs to be force inlined, otherwise
user space will jump into kernel space and kill init.

This also addresses
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44129
I believe

Signed-off-by: Andi Kleen <ak(a)linux.intel.com>

---
arch/x86/include/asm/system.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.34-ak/arch/x86/include/asm/system.h
===================================================================
--- linux-2.6.34-ak.orig/arch/x86/include/asm/system.h
+++ linux-2.6.34-ak/arch/x86/include/asm/system.h
@@ -451,7 +451,7 @@ void stop_this_cpu(void *dummy);
*
* (Could use an alternative three way for this if there was one.)
*/
-static inline void rdtsc_barrier(void)
+static __always_inline void rdtsc_barrier(void)
{
alternative(ASM_NOP3, "mfence", X86_FEATURE_MFENCE_RDTSC);
alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/