aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2007-02-20 01:07:13 +0100
committerDave Jones <davej@redhat.com>2007-02-20 14:29:37 -0500
commitb44755cfaa72e7ed3d831a946bb4e7dfe7548966 (patch)
tree251cf0ab5aa9c39bab3f0981ab96021b5523bee3 /arch
parent48ac3271e52d23ee987da93f80d20f6bec8e6717 (diff)
{rd,wr}msr_on_cpu SMP=n optimization
Let's save a few bytes in the CONFIG_SMP=n case. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/lib/Makefile2
-rw-r--r--arch/i386/lib/msr-on-cpu.c12
-rw-r--r--arch/x86_64/lib/Makefile3
3 files changed, 3 insertions, 14 deletions
diff --git a/arch/i386/lib/Makefile b/arch/i386/lib/Makefile
index 0d41223472c..22d8ac5815f 100644
--- a/arch/i386/lib/Makefile
+++ b/arch/i386/lib/Makefile
@@ -8,4 +8,4 @@ lib-y = checksum.o delay.o usercopy.o getuser.o putuser.o memcpy.o strstr.o \
lib-$(CONFIG_X86_USE_3DNOW) += mmx.o
-obj-y = msr-on-cpu.o
+obj-$(CONFIG_SMP) += msr-on-cpu.o
diff --git a/arch/i386/lib/msr-on-cpu.c b/arch/i386/lib/msr-on-cpu.c
index 2092ea15ba8..1c46bda409f 100644
--- a/arch/i386/lib/msr-on-cpu.c
+++ b/arch/i386/lib/msr-on-cpu.c
@@ -3,7 +3,6 @@
#include <linux/smp.h>
#include <asm/msr.h>
-#ifdef CONFIG_SMP
struct msr_info {
u32 msr_no;
u32 l, h;
@@ -54,17 +53,6 @@ void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
}
preempt_enable();
}
-#else
-void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
-{
- rdmsr(msr_no, *l, *h);
-}
-
-void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
-{
- wrmsr(msr_no, l, h);
-}
-#endif
EXPORT_SYMBOL(rdmsr_on_cpu);
EXPORT_SYMBOL(wrmsr_on_cpu);
diff --git a/arch/x86_64/lib/Makefile b/arch/x86_64/lib/Makefile
index 0a43f07b029..43d051ff1fb 100644
--- a/arch/x86_64/lib/Makefile
+++ b/arch/x86_64/lib/Makefile
@@ -4,7 +4,8 @@
CFLAGS_csum-partial.o := -funroll-loops
-obj-y := io.o iomap_copy.o msr-on-cpu.o
+obj-y := io.o iomap_copy.o
+obj-$(CONFIG_SMP) += msr-on-cpu.o
lib-y := csum-partial.o csum-copy.o csum-wrappers.o delay.o \
usercopy.o getuser.o putuser.o \