Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: kexec: remove SMP_DUMP

SMP_DUMP has been added as a new IPI signal when kexec support was added
for Cavium Octeon CPUs ('commit 7aa1c8f47e7e ("MIPS: kdump: Add support")'.
However, the new signal doesn't appear to ever have a proper handler
added (octeon_message_functions[] array has an empty handler for it),
and generic IPI handlers now trigger a BUG() on unhandled signal.

As the method is unused remove it completely and replace its only
invocation with a smp_call_function().

[ralf@linux-mips.org: Renumber SMP_ASK_C0COUNT to avoid numbering gaps.]

Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14630/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Marcin Nowakowski and committed by
Ralf Baechle
c83c2eed 109c32ff

+2 -25
+1 -7
arch/mips/include/asm/smp.h
··· 42 42 #define SMP_CALL_FUNCTION 0x2 43 43 /* Octeon - Tell another core to flush its icache */ 44 44 #define SMP_ICACHE_FLUSH 0x4 45 - /* Used by kexec crashdump to save all cpu's state */ 46 - #define SMP_DUMP 0x8 47 - #define SMP_ASK_C0COUNT 0x10 45 + #define SMP_ASK_C0COUNT 0x8 48 46 49 47 /* Mask of CPUs which are currently definitely operating coherently */ 50 48 extern cpumask_t cpu_coherent_mask; ··· 109 111 mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION); 110 112 } 111 113 112 - #if defined(CONFIG_KEXEC) 113 - extern void (*dump_ipi_function_ptr)(void *); 114 - void dump_send_ipi(void (*dump_ipi_callback)(void *)); 115 - #endif 116 114 #endif /* __ASM_SMP_H */
+1 -1
arch/mips/kernel/crash.c
··· 56 56 57 57 ncpus = num_online_cpus() - 1;/* Excluding the panic cpu */ 58 58 59 - dump_send_ipi(crash_shutdown_secondary); 59 + smp_call_function(crash_shutdown_secondary, NULL, 0); 60 60 smp_wmb(); 61 61 62 62 /*
-17
arch/mips/kernel/smp.c
··· 638 638 EXPORT_SYMBOL(flush_tlb_page); 639 639 EXPORT_SYMBOL(flush_tlb_one); 640 640 641 - #if defined(CONFIG_KEXEC) 642 - void (*dump_ipi_function_ptr)(void *) = NULL; 643 - void dump_send_ipi(void (*dump_ipi_callback)(void *)) 644 - { 645 - int i; 646 - int cpu = smp_processor_id(); 647 - 648 - dump_ipi_function_ptr = dump_ipi_callback; 649 - smp_mb(); 650 - for_each_online_cpu(i) 651 - if (i != cpu) 652 - mp_ops->send_ipi_single(i, SMP_DUMP); 653 - 654 - } 655 - EXPORT_SYMBOL(dump_send_ipi); 656 - #endif 657 - 658 641 #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST 659 642 660 643 static DEFINE_PER_CPU(atomic_t, tick_broadcast_count);