diff options
author | Alex Nixon <alex.nixon@citrix.com> | 2008-09-03 09:30:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-05 11:44:08 -0400 |
commit | 913da64b54b2b3bb212a59aba2e6f2b8294ca1fa (patch) | |
tree | c7e715a2df32c8360bc568e274e4868640243e1b | |
parent | 5ab6d815dc23117cd9c5895cb9592824de3d4a68 (diff) |
x86: build fix for !CONFIG_SMP
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>
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/process_32.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/tlb_32.c | 8 | ||||
-rw-r--r-- | include/asm-x86/smp.h | 9 | ||||
-rw-r--r-- | include/asm-x86/tlbflush.h | 10 |
6 files changed, 32 insertions, 16 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 18f5551b32dd..76d10d5c2fa7 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -714,10 +714,3 @@ void __cpuinit cpu_init(void) | |||
714 | mxcsr_feature_mask_init(); | 714 | mxcsr_feature_mask_init(); |
715 | } | 715 | } |
716 | 716 | ||
717 | void reset_lazy_tlbstate(void) | ||
718 | { | ||
719 | int cpu = raw_smp_processor_id(); | ||
720 | |||
721 | per_cpu(cpu_tlbstate, cpu).state = 0; | ||
722 | per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm; | ||
723 | } | ||
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 633cf06578fa..b76b38ff962b 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -72,6 +72,13 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
72 | return ((unsigned long *)tsk->thread.sp)[3]; | 72 | return ((unsigned long *)tsk->thread.sp)[3]; |
73 | } | 73 | } |
74 | 74 | ||
75 | #ifndef CONFIG_SMP | ||
76 | static inline void play_dead(void) | ||
77 | { | ||
78 | BUG(); | ||
79 | } | ||
80 | #endif | ||
81 | |||
75 | /* | 82 | /* |
76 | * The idle thread. There's no useful work to be | 83 | * The idle thread. There's no useful work to be |
77 | * done, so just try to conserve power and have a | 84 | * done, so just try to conserve power and have a |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index aa28ed01cdf3..ec27afa43d7e 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -85,6 +85,13 @@ void exit_idle(void) | |||
85 | __exit_idle(); | 85 | __exit_idle(); |
86 | } | 86 | } |
87 | 87 | ||
88 | #ifndef CONFIG_SMP | ||
89 | static inline void play_dead(void) | ||
90 | { | ||
91 | BUG(); | ||
92 | } | ||
93 | #endif | ||
94 | |||
88 | /* | 95 | /* |
89 | * The idle thread. There's no useful work to be | 96 | * The idle thread. There's no useful work to be |
90 | * done, so just try to conserve power and have a | 97 | * done, so just try to conserve power and have a |
diff --git a/arch/x86/kernel/tlb_32.c b/arch/x86/kernel/tlb_32.c index fec1ecedc9b7..e00534b33534 100644 --- a/arch/x86/kernel/tlb_32.c +++ b/arch/x86/kernel/tlb_32.c | |||
@@ -241,3 +241,11 @@ void flush_tlb_all(void) | |||
241 | on_each_cpu(do_flush_tlb_all, NULL, 1); | 241 | on_each_cpu(do_flush_tlb_all, NULL, 1); |
242 | } | 242 | } |
243 | 243 | ||
244 | void reset_lazy_tlbstate(void) | ||
245 | { | ||
246 | int cpu = raw_smp_processor_id(); | ||
247 | |||
248 | per_cpu(cpu_tlbstate, cpu).state = 0; | ||
249 | per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm; | ||
250 | } | ||
251 | |||
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h index 8bdaa4a25f05..30b5146cc436 100644 --- a/include/asm-x86/smp.h +++ b/include/asm-x86/smp.h | |||
@@ -222,14 +222,5 @@ static inline int hard_smp_processor_id(void) | |||
222 | 222 | ||
223 | #endif /* CONFIG_X86_LOCAL_APIC */ | 223 | #endif /* CONFIG_X86_LOCAL_APIC */ |
224 | 224 | ||
225 | #ifdef CONFIG_HOTPLUG_CPU | ||
226 | #ifdef CONFIG_X86_32 | ||
227 | extern void reset_lazy_tlbstate(void); | ||
228 | #else | ||
229 | static inline void reset_lazy_tlbstate(void) | ||
230 | { } | ||
231 | #endif /* CONFIG_X86_32 */ | ||
232 | #endif | ||
233 | |||
234 | #endif /* __ASSEMBLY__ */ | 225 | #endif /* __ASSEMBLY__ */ |
235 | #endif | 226 | #endif |
diff --git a/include/asm-x86/tlbflush.h b/include/asm-x86/tlbflush.h index 35c76ceb9f40..0e7bbb549116 100644 --- a/include/asm-x86/tlbflush.h +++ b/include/asm-x86/tlbflush.h | |||
@@ -119,6 +119,10 @@ static inline void native_flush_tlb_others(const cpumask_t *cpumask, | |||
119 | { | 119 | { |
120 | } | 120 | } |
121 | 121 | ||
122 | static inline void reset_lazy_tlbstate(void) | ||
123 | { | ||
124 | } | ||
125 | |||
122 | #else /* SMP */ | 126 | #else /* SMP */ |
123 | 127 | ||
124 | #include <asm/smp.h> | 128 | #include <asm/smp.h> |
@@ -151,6 +155,12 @@ struct tlb_state { | |||
151 | char __cacheline_padding[L1_CACHE_BYTES-8]; | 155 | char __cacheline_padding[L1_CACHE_BYTES-8]; |
152 | }; | 156 | }; |
153 | DECLARE_PER_CPU(struct tlb_state, cpu_tlbstate); | 157 | DECLARE_PER_CPU(struct tlb_state, cpu_tlbstate); |
158 | |||
159 | void reset_lazy_tlbstate(void); | ||
160 | #else | ||
161 | static inline void reset_lazy_tlbstate(void) | ||
162 | { | ||
163 | } | ||
154 | #endif | 164 | #endif |
155 | 165 | ||
156 | #endif /* SMP */ | 166 | #endif /* SMP */ |