aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-09-04 13:00:09 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-09-04 13:00:09 -0400
commitb19ae3999891cad21a3995c34d313dda5df014e2 (patch)
tree6a82be9eda154f03e7cbb67f2483f54a4d596082 /arch/x86
parent0d96b9ff748b5f57d6f1d6d21209f5745245aadc (diff)
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 <hpa@zytor.com> LKML-Reference: <20090904140834.GA15789@elte.hu> Cc: Borislav Petkov <petkovbb@googlemail.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/lib/Makefile3
-rw-r--r--arch/x86/lib/msr-reg-export.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index b59c0647d809..9e609206fac9 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -8,7 +8,8 @@ lib-y := delay.o
8lib-y += thunk_$(BITS).o 8lib-y += thunk_$(BITS).o
9lib-y += usercopy_$(BITS).o getuser.o putuser.o 9lib-y += usercopy_$(BITS).o getuser.o putuser.o
10lib-y += memcpy_$(BITS).o 10lib-y += memcpy_$(BITS).o
11lib-y += msr-reg.o 11
12obj-y += msr-reg.o msr-reg-export.o
12 13
13ifeq ($(CONFIG_X86_32),y) 14ifeq ($(CONFIG_X86_32),y)
14 obj-y += atomic64_32.o 15 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 000000000000..a311cc59b65d
--- /dev/null
+++ b/arch/x86/lib/msr-reg-export.c
@@ -0,0 +1,5 @@
1#include <linux/module.h>
2#include <asm/msr.h>
3
4EXPORT_SYMBOL(native_rdmsr_safe_regs);
5EXPORT_SYMBOL(native_wrmsr_safe_regs);