]> git.karo-electronics.de Git - linux-beck.git/commitdiff
x86: build fix for !CONFIG_SMP
authorAlex Nixon <alex.nixon@citrix.com>
Wed, 3 Sep 2008 13:30:23 +0000 (14:30 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 5 Sep 2008 15:44:08 +0000 (17:44 +0200)
Move reset_lazy_tlbstate into tlb_32.c, and define noop versions of
play_dead() in process_{32,64}.c when !CONFIG_SMP.

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/common.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/kernel/tlb_32.c
include/asm-x86/smp.h
include/asm-x86/tlbflush.h

index 18f5551b32dd81ce377fb23a941869f15fe1e6b6..76d10d5c2fa7d2bda925fee0e7e96f6cf4d5caca 100644 (file)
@@ -714,10 +714,3 @@ void __cpuinit cpu_init(void)
        mxcsr_feature_mask_init();
 }
 
-void reset_lazy_tlbstate(void)
-{
-       int cpu = raw_smp_processor_id();
-
-       per_cpu(cpu_tlbstate, cpu).state = 0;
-       per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm;
-}
index 633cf06578fa20aef9f0190ada4d2bcf85c953b3..b76b38ff962b709fd317e8590a0ac835f11f58fd 100644 (file)
@@ -72,6 +72,13 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
        return ((unsigned long *)tsk->thread.sp)[3];
 }
 
+#ifndef CONFIG_SMP
+static inline void play_dead(void)
+{
+       BUG();
+}
+#endif
+
 /*
  * The idle thread. There's no useful work to be
  * done, so just try to conserve power and have a
index aa28ed01cdf3aa22f35f6e0d65c2860b6d085092..ec27afa43d7eac3935a030031d4c42525bff6012 100644 (file)
@@ -85,6 +85,13 @@ void exit_idle(void)
        __exit_idle();
 }
 
+#ifndef CONFIG_SMP
+static inline void play_dead(void)
+{
+       BUG();
+}
+#endif
+
 /*
  * The idle thread. There's no useful work to be
  * done, so just try to conserve power and have a
index fec1ecedc9b7486d6504699fa99583e391ceb92e..e00534b3353483dc67bc8282b839c5257a16ca72 100644 (file)
@@ -241,3 +241,11 @@ void flush_tlb_all(void)
        on_each_cpu(do_flush_tlb_all, NULL, 1);
 }
 
+void reset_lazy_tlbstate(void)
+{
+       int cpu = raw_smp_processor_id();
+
+       per_cpu(cpu_tlbstate, cpu).state = 0;
+       per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm;
+}
+
index 8bdaa4a25f05ad40171817a181de21d13d7d754f..30b5146cc4369eba31db92b1bb820ebe2853ebfd 100644 (file)
@@ -222,14 +222,5 @@ static inline int hard_smp_processor_id(void)
 
 #endif /* CONFIG_X86_LOCAL_APIC */
 
-#ifdef CONFIG_HOTPLUG_CPU
-#ifdef CONFIG_X86_32
-extern void reset_lazy_tlbstate(void);
-#else
-static inline void reset_lazy_tlbstate(void)
-{ }
-#endif /* CONFIG_X86_32 */
-#endif
-
 #endif /* __ASSEMBLY__ */
 #endif
index 35c76ceb9f4055eb548da359319a687467e73f66..0e7bbb5491169f69c4b0b0e2d0e98a8445d95fcd 100644 (file)
@@ -119,6 +119,10 @@ static inline void native_flush_tlb_others(const cpumask_t *cpumask,
 {
 }
 
+static inline void reset_lazy_tlbstate(void)
+{
+}
+
 #else  /* SMP */
 
 #include <asm/smp.h>
@@ -151,6 +155,12 @@ struct tlb_state {
        char __cacheline_padding[L1_CACHE_BYTES-8];
 };
 DECLARE_PER_CPU(struct tlb_state, cpu_tlbstate);
+
+void reset_lazy_tlbstate(void);
+#else
+static inline void reset_lazy_tlbstate(void)
+{
+}
 #endif
 
 #endif /* SMP */