Skip to content

Commit

Permalink
x86, msr: change msr-reg.o to obj-y, and export its symbols
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H. Peter Anvin committed Sep 4, 2009
1 parent 0d96b9f commit b19ae39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions arch/x86/lib/msr-reg-export.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <linux/module.h>
#include <asm/msr.h>

EXPORT_SYMBOL(native_rdmsr_safe_regs);
EXPORT_SYMBOL(native_wrmsr_safe_regs);

0 comments on commit b19ae39

Please sign in to comment.