diff options
author | Rich Felker <dalias@libc.org> | 2016-02-12 17:11:55 -0500 |
---|---|---|
committer | Rich Felker <dalias@libc.org> | 2016-03-17 15:46:08 -0400 |
commit | 5f2cb34d034fab41dfaabb4403af6e83e04f30df (patch) | |
tree | 2fbdf9ea59455f82797188f3f052f838ff7a6118 | |
parent | 3623d138213aedf0e2c89720f6a3cd0e164cb310 (diff) |
sh: make MMU-specific SMP code conditional on CONFIG_MMU
This is a prerequisite for adding NOMMU SMP support.
Signed-off-by: Rich Felker <dalias@libc.org>
-rw-r--r-- | arch/sh/kernel/smp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index de6be008fc01..a66f2aa53dac 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
@@ -150,7 +150,9 @@ int __cpu_disable(void) | |||
150 | * from the vm mask set of all processes. | 150 | * from the vm mask set of all processes. |
151 | */ | 151 | */ |
152 | flush_cache_all(); | 152 | flush_cache_all(); |
153 | #ifdef CONFIG_MMU | ||
153 | local_flush_tlb_all(); | 154 | local_flush_tlb_all(); |
155 | #endif | ||
154 | 156 | ||
155 | clear_tasks_mm_cpumask(cpu); | 157 | clear_tasks_mm_cpumask(cpu); |
156 | 158 | ||
@@ -183,8 +185,10 @@ asmlinkage void start_secondary(void) | |||
183 | atomic_inc(&mm->mm_count); | 185 | atomic_inc(&mm->mm_count); |
184 | atomic_inc(&mm->mm_users); | 186 | atomic_inc(&mm->mm_users); |
185 | current->active_mm = mm; | 187 | current->active_mm = mm; |
188 | #ifdef CONFIG_MMU | ||
186 | enter_lazy_tlb(mm, current); | 189 | enter_lazy_tlb(mm, current); |
187 | local_flush_tlb_all(); | 190 | local_flush_tlb_all(); |
191 | #endif | ||
188 | 192 | ||
189 | per_cpu_trap_init(); | 193 | per_cpu_trap_init(); |
190 | 194 | ||
@@ -328,6 +332,8 @@ int setup_profiling_timer(unsigned int multiplier) | |||
328 | return 0; | 332 | return 0; |
329 | } | 333 | } |
330 | 334 | ||
335 | #ifdef CONFIG_MMU | ||
336 | |||
331 | static void flush_tlb_all_ipi(void *info) | 337 | static void flush_tlb_all_ipi(void *info) |
332 | { | 338 | { |
333 | local_flush_tlb_all(); | 339 | local_flush_tlb_all(); |
@@ -467,3 +473,5 @@ void flush_tlb_one(unsigned long asid, unsigned long vaddr) | |||
467 | smp_call_function(flush_tlb_one_ipi, (void *)&fd, 1); | 473 | smp_call_function(flush_tlb_one_ipi, (void *)&fd, 1); |
468 | local_flush_tlb_one(asid, vaddr); | 474 | local_flush_tlb_one(asid, vaddr); |
469 | } | 475 | } |
476 | |||
477 | #endif | ||