From b19ae3999891cad21a3995c34d313dda5df014e2 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 4 Sep 2009 10:00:09 -0700 Subject: [PATCH] x86, msr: change msr-reg.o to obj-y, and export its symbols Change msr-reg.o to obj-y (it will be included in virtually every kernel since it is used by the initialization code for AMD processors) and add a separate C file to export its symbols to modules, so that msr.ko can use them; on uniprocessors we bypass the helper functions in msr.o and use the accessor functions directly via inlines. Signed-off-by: H. Peter Anvin LKML-Reference: <20090904140834.GA15789@elte.hu> Cc: Borislav Petkov --- arch/x86/lib/Makefile | 3 ++- arch/x86/lib/msr-reg-export.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 arch/x86/lib/msr-reg-export.c diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index b59c064..9e60920 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -8,7 +8,8 @@ lib-y := delay.o lib-y += thunk_$(BITS).o lib-y += usercopy_$(BITS).o getuser.o putuser.o lib-y += memcpy_$(BITS).o -lib-y += msr-reg.o + +obj-y += msr-reg.o msr-reg-export.o ifeq ($(CONFIG_X86_32),y) obj-y += atomic64_32.o diff --git a/arch/x86/lib/msr-reg-export.c b/arch/x86/lib/msr-reg-export.c new file mode 100644 index 0000000..a311cc5 --- /dev/null +++ b/arch/x86/lib/msr-reg-export.c @@ -0,0 +1,5 @@ +#include +#include + +EXPORT_SYMBOL(native_rdmsr_safe_regs); +EXPORT_SYMBOL(native_wrmsr_safe_regs); -- 2.7.4