]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: kexec: remove SMP_DUMP
authorMarcin Nowakowski <marcin.nowakowski@imgtec.com>
Fri, 2 Dec 2016 08:58:28 +0000 (09:58 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 3 Jan 2017 15:34:44 +0000 (16:34 +0100)
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>
arch/mips/include/asm/smp.h
arch/mips/kernel/crash.c
arch/mips/kernel/smp.c

index f8c5faa935847ec5fa370514d261e38909bffe37..98a117a05fbce1af774dc0f6833e78163036e8ce 100644 (file)
@@ -42,9 +42,7 @@ extern int __cpu_logical_map[NR_CPUS];
 #define SMP_CALL_FUNCTION      0x2
 /* Octeon - Tell another core to flush its icache */
 #define SMP_ICACHE_FLUSH       0x4
-/* Used by kexec crashdump to save all cpu's state */
-#define SMP_DUMP               0x8
-#define SMP_ASK_C0COUNT                0x10
+#define SMP_ASK_C0COUNT                0x8
 
 /* Mask of CPUs which are currently definitely operating coherently */
 extern cpumask_t cpu_coherent_mask;
@@ -111,8 +109,4 @@ static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask)
        mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION);
 }
 
-#if defined(CONFIG_KEXEC)
-extern void (*dump_ipi_function_ptr)(void *);
-void dump_send_ipi(void (*dump_ipi_callback)(void *));
-#endif
 #endif /* __ASM_SMP_H */
index 1723b17622976da35170caba062fe956a0fcd245..5a71518be0f10b550187135741e994a852c900b3 100644 (file)
@@ -56,7 +56,7 @@ static void crash_kexec_prepare_cpus(void)
 
        ncpus = num_online_cpus() - 1;/* Excluding the panic cpu */
 
-       dump_send_ipi(crash_shutdown_secondary);
+       smp_call_function(crash_shutdown_secondary, NULL, 0);
        smp_wmb();
 
        /*
index 0a831f63b0ecda2fe4606aad7d0f163f84226d11..8c60a296294c594cfa03ea12d9913426c803eee2 100644 (file)
@@ -638,23 +638,6 @@ void flush_tlb_one(unsigned long vaddr)
 EXPORT_SYMBOL(flush_tlb_page);
 EXPORT_SYMBOL(flush_tlb_one);
 
-#if defined(CONFIG_KEXEC)
-void (*dump_ipi_function_ptr)(void *) = NULL;
-void dump_send_ipi(void (*dump_ipi_callback)(void *))
-{
-       int i;
-       int cpu = smp_processor_id();
-
-       dump_ipi_function_ptr = dump_ipi_callback;
-       smp_mb();
-       for_each_online_cpu(i)
-               if (i != cpu)
-                       mp_ops->send_ipi_single(i, SMP_DUMP);
-
-}
-EXPORT_SYMBOL(dump_send_ipi);
-#endif
-
 #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
 
 static DEFINE_PER_CPU(atomic_t, tick_broadcast_count);