diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h index e047a0bc5554..b74169434b85 100644 --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h @@ -4,8 +4,10 @@ #ifdef CONFIG_X86_64 #define __percpu_seg gs +#define __percpu_rip "(%%rip)" #else #define __percpu_seg fs +#define __percpu_rip "" #endif #ifdef __ASSEMBLY__ @@ -85,7 +87,7 @@ #define __my_cpu_ptr(ptr) (__my_cpu_type(*ptr) *)(uintptr_t)(ptr) #define __my_cpu_var(var) (*__my_cpu_ptr(&var)) #define __percpu_arg(x) __percpu_prefix "%" #x -#define __force_percpu_arg(x) __force_percpu_prefix "%" #x +#define __force_percpu_arg(x) __force_percpu_prefix "%" #x __percpu_rip /* * Initialized pointers to per-cpu variables needed for the boot