summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/smp.c
diff options
context:
space:
mode:
authorRich Felker <dalias@libc.org>2016-02-12 23:11:55 +0100
committerRich Felker <dalias@libc.org>2016-03-17 20:46:08 +0100
commit5f2cb34d034fab41dfaabb4403af6e83e04f30df (patch)
tree2fbdf9ea59455f82797188f3f052f838ff7a6118 /arch/sh/kernel/smp.c
parentsh: provide unified syscall trap compatible with all SH models (diff)
downloadlinux-5f2cb34d034fab41dfaabb4403af6e83e04f30df.tar.xz
linux-5f2cb34d034fab41dfaabb4403af6e83e04f30df.zip
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>
Diffstat (limited to 'arch/sh/kernel/smp.c')
-rw-r--r--arch/sh/kernel/smp.c8
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)
* from the vm mask set of all processes.
*/
flush_cache_all();
+#ifdef CONFIG_MMU
local_flush_tlb_all();
+#endif
clear_tasks_mm_cpumask(cpu);
@@ -183,8 +185,10 @@ asmlinkage void start_secondary(void)
atomic_inc(&mm->mm_count);
atomic_inc(&mm->mm_users);
current->active_mm = mm;
+#ifdef CONFIG_MMU
enter_lazy_tlb(mm, current);
local_flush_tlb_all();
+#endif
per_cpu_trap_init();
@@ -328,6 +332,8 @@ int setup_profiling_timer(unsigned int multiplier)
return 0;
}
+#ifdef CONFIG_MMU
+
static void flush_tlb_all_ipi(void *info)
{
local_flush_tlb_all();
@@ -467,3 +473,5 @@ void flush_tlb_one(unsigned long asid, unsigned long vaddr)
smp_call_function(flush_tlb_one_ipi, (void *)&fd, 1);
local_flush_tlb_one(asid, vaddr);
}
+
+#endif