]> git.karo-electronics.de Git - linux-beck.git/commitdiff
x86: only compile setup_percpu.o on SMP
authorBrian Gerst <brgerst@gmail.com>
Tue, 27 Jan 2009 03:56:47 +0000 (12:56 +0900)
committerTejun Heo <tj@kernel.org>
Tue, 27 Jan 2009 03:56:47 +0000 (12:56 +0900)
Impact: Minor build optimization

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
arch/x86/kernel/Makefile
arch/x86/kernel/setup_percpu.c

index a99437c965cc049eaac23685ad28ae4d5220eb57..73de055c29c29855ae4d4b205e781903ba04b632 100644 (file)
@@ -28,7 +28,7 @@ CFLAGS_paravirt.o     := $(nostackp)
 obj-y                  := process_$(BITS).o signal.o entry_$(BITS).o
 obj-y                  += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
 obj-y                  += time_$(BITS).o ioport.o ldt.o dumpstack.o
-obj-y                  += setup.o i8259.o irqinit_$(BITS).o setup_percpu.o
+obj-y                  += setup.o i8259.o irqinit_$(BITS).o
 obj-$(CONFIG_X86_VISWS)        += visws_quirks.o
 obj-$(CONFIG_X86_32)   += probe_roms_32.o
 obj-$(CONFIG_X86_32)   += sys_i386_32.o i386_ksyms_32.o
@@ -59,6 +59,7 @@ apm-y                         := apm_32.o
 obj-$(CONFIG_APM)              += apm.o
 obj-$(CONFIG_X86_SMP)          += smp.o
 obj-$(CONFIG_X86_SMP)          += smpboot.o tsc_sync.o ipi.o
+obj-$(CONFIG_SMP)              += setup_percpu.o
 obj-$(CONFIG_X86_32_SMP)       += smpcommon.o
 obj-$(CONFIG_X86_64_SMP)       += tsc_sync.o smpcommon.o
 obj-$(CONFIG_X86_TRAMPOLINE)   += trampoline_$(BITS).o
index d367996693e6013e825fb77d65e5b701db44d677..f30ff691c34de780bf052ef4b8d2f7b966254595 100644 (file)
 # define DBG(x...)
 #endif
 
-/*
- * Could be inside CONFIG_HAVE_SETUP_PER_CPU_AREA with other stuff but
- * voyager wants cpu_number too.
- */
-#ifdef CONFIG_SMP
 DEFINE_PER_CPU(int, cpu_number);
 EXPORT_PER_CPU_SYMBOL(cpu_number);
-#endif
 
 #ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA