arch/x86/include/asm/runtime-const.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/runtime-const.h b/arch/x86/include/asm/runtime-const.h index 8d983cfd06ea..01e35997587d 100644 --- a/arch/x86/include/asm/runtime-const.h +++ b/arch/x86/include/asm/runtime-const.h @@ -2,7 +2,18 @@ #ifndef _ASM_RUNTIME_CONST_H #define _ASM_RUNTIME_CONST_H -#ifdef __ASSEMBLY__ +#ifdef MODULE + +/* + * None of this is available to modules, so we force link errors + * if people try to use it + */ +extern unsigned long no_runtime_const; +#define runtime_const_ptr(sym) ((typeof(sym))no_runtime_const) +#define runtime_const_shift_right_32(val, sym) ((u32)no_runtime_const) +#define runtime_const_init(type,sym) do { no_runtime_const=1; } while (0) + +#elif defined(__ASSEMBLY__) .macro RUNTIME_CONST_PTR sym reg movq $0x0123456789abcdef, %\reg