From: Paul Mundt Date: Wed, 14 Oct 2009 02:51:28 +0000 (+0900) Subject: sh: Only invalidate the I-cache range for secondary CPUs stack_start. X-Git-Tag: v2.6.33-rc1~347^2~27^2~81 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d780613acc0eeea89e1b3a7d9db765e0f2a4a950;p=karo-tx-linux.git sh: Only invalidate the I-cache range for secondary CPUs stack_start. Secondary CPUs already take care of the D-cache bits through the common cache initialization path, and the only thing that is necessary after twiddling around with stack_start is ensuring that the I-cache changes are visible (particularly since this tends to be the only part lacking coherency). Signed-off-by: Paul Mundt --- diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 442d8d47a41e..6a27c657648d 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c @@ -120,7 +120,9 @@ int __cpuinit __cpu_up(unsigned int cpu) stack_start.bss_start = 0; /* don't clear bss for secondary cpus */ stack_start.start_kernel_fn = start_secondary; - flush_cache_all(); + flush_icache_range((unsigned long)&stack_start, + (unsigned long)&stack_start + sizeof(stack_start)); + wmb(); plat_start_cpu(cpu, (unsigned long)_stext);