On SMP r4k cache style systems, we cannot issue a smp_function_call_many() like what __flush_cache_all() does *after* we have disabled interrupts for the calling CPU. Add a special check, and do a local cache operation instead. Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx> --- arch/mips/mm/c-r4k.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index e7f798d55fbc..ea2998f1f5c5 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -19,6 +19,7 @@ #include <linux/mm.h> #include <linux/export.h> #include <linux/bitops.h> +#include <linux/kexec.h> #include <asm/bcache.h> #include <asm/bootinfo.h> @@ -494,7 +495,10 @@ static inline void local_r4k___flush_cache_all(void * args) static void r4k___flush_cache_all(void) { - r4k_on_each_cpu(R4K_INDEX, local_r4k___flush_cache_all, NULL); + if (!kexec_in_progress) + r4k_on_each_cpu(R4K_INDEX, local_r4k___flush_cache_all, NULL); + else + local_r4k___flush_cache_all(NULL); } /** -- 2.9.3