kgdb: Remove irq flags from roundup
authorDouglas Anderson <dianders@chromium.org>
Wed, 5 Dec 2018 03:38:25 +0000 (19:38 -0800)
committerDaniel Thompson <daniel.thompson@linaro.org>
Sun, 30 Dec 2018 08:24:21 +0000 (08:24 +0000)
The function kgdb_roundup_cpus() was passed a parameter that was
documented as:

> the flags that will be used when restoring the interrupts. There is
> local_irq_save() call before kgdb_roundup_cpus().

Nobody used those flags.  Anyone who wanted to temporarily turn on
interrupts just did local_irq_enable() and local_irq_disable() without
looking at them.  So we can definitely remove the flags.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
arch/arc/kernel/kgdb.c
arch/arm/kernel/kgdb.c
arch/arm64/kernel/kgdb.c
arch/hexagon/kernel/kgdb.c
arch/mips/kernel/kgdb.c
arch/powerpc/kernel/kgdb.c
arch/sh/kernel/kgdb.c
arch/sparc/kernel/smp_64.c
arch/x86/kernel/kgdb.c
include/linux/kgdb.h
kernel/debug/debug_core.c

index 9a3c34a..0932851 100644 (file)
@@ -197,7 +197,7 @@ static void kgdb_call_nmi_hook(void *ignored)
        kgdb_nmicallback(raw_smp_processor_id(), NULL);
 }
 
-void kgdb_roundup_cpus(unsigned long flags)
+void kgdb_roundup_cpus(void)
 {
        local_irq_enable();
        smp_call_function(kgdb_call_nmi_hook, NULL, 0);
index caa0dbe..f21077b 100644 (file)
@@ -175,7 +175,7 @@ static void kgdb_call_nmi_hook(void *ignored)
        kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs());
 }
 
-void kgdb_roundup_cpus(unsigned long flags)
+void kgdb_roundup_cpus(void)
 {
        local_irq_enable();
        smp_call_function(kgdb_call_nmi_hook, NULL, 0);
index a20de58..12c339f 100644 (file)
@@ -289,7 +289,7 @@ static void kgdb_call_nmi_hook(void *ignored)
        kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs());
 }
 
-void kgdb_roundup_cpus(unsigned long flags)
+void kgdb_roundup_cpus(void)
 {
        local_irq_enable();
        smp_call_function(kgdb_call_nmi_hook, NULL, 0);
index 16c24b2..012e0e2 100644 (file)
@@ -119,17 +119,12 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc)
 
 /**
  * kgdb_roundup_cpus - Get other CPUs into a holding pattern
- * @flags: Current IRQ state
  *
  * On SMP systems, we need to get the attention of the other CPUs
  * and get them be in a known state.  This should do what is needed
  * to get the other CPUs to call kgdb_wait(). Note that on some arches,
  * the NMI approach is not used for rounding up all the CPUs. For example,
- * in case of MIPS, smp_call_function() is used to roundup CPUs. In
- * this case, we have to make sure that interrupts are enabled before
- * calling smp_call_function(). The argument to this function is
- * the flags that will be used when restoring the interrupts. There is
- * local_irq_save() call before kgdb_roundup_cpus().
+ * in case of MIPS, smp_call_function() is used to roundup CPUs.
  *
  * On non-SMP systems, this is not called.
  */
@@ -139,7 +134,7 @@ static void hexagon_kgdb_nmi_hook(void *ignored)
        kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs());
 }
 
-void kgdb_roundup_cpus(unsigned long flags)
+void kgdb_roundup_cpus(void)
 {
        local_irq_enable();
        smp_call_function(hexagon_kgdb_nmi_hook, NULL, 0);
index eb6c0d5..2b05eff 100644 (file)
@@ -219,7 +219,7 @@ static void kgdb_call_nmi_hook(void *ignored)
        set_fs(old_fs);
 }
 
-void kgdb_roundup_cpus(unsigned long flags)
+void kgdb_roundup_cpus(void)
 {
        local_irq_enable();
        smp_call_function(kgdb_call_nmi_hook, NULL, 0);
index 59c578f..b0e8048 100644 (file)
@@ -124,7 +124,7 @@ static int kgdb_call_nmi_hook(struct pt_regs *regs)
 }
 
 #ifdef CONFIG_SMP
-void kgdb_roundup_cpus(unsigned long flags)
+void kgdb_roundup_cpus(void)
 {
        smp_send_debugger_break();
 }
index 4f04c66..cc57630 100644 (file)
@@ -319,7 +319,7 @@ static void kgdb_call_nmi_hook(void *ignored)
        kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs());
 }
 
-void kgdb_roundup_cpus(unsigned long flags)
+void kgdb_roundup_cpus(void)
 {
        local_irq_enable();
        smp_call_function(kgdb_call_nmi_hook, NULL, 0);
index 4792e08..f45d876 100644 (file)
@@ -1014,7 +1014,7 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page)
 }
 
 #ifdef CONFIG_KGDB
-void kgdb_roundup_cpus(unsigned long flags)
+void kgdb_roundup_cpus(void)
 {
        smp_cross_call(&xcall_kgdb_capture, 0, 0, 0);
 }
index 8e36f24..ac6291a 100644 (file)
@@ -422,21 +422,16 @@ static void kgdb_disable_hw_debug(struct pt_regs *regs)
 #ifdef CONFIG_SMP
 /**
  *     kgdb_roundup_cpus - Get other CPUs into a holding pattern
- *     @flags: Current IRQ state
  *
  *     On SMP systems, we need to get the attention of the other CPUs
  *     and get them be in a known state.  This should do what is needed
  *     to get the other CPUs to call kgdb_wait(). Note that on some arches,
  *     the NMI approach is not used for rounding up all the CPUs. For example,
- *     in case of MIPS, smp_call_function() is used to roundup CPUs. In
- *     this case, we have to make sure that interrupts are enabled before
- *     calling smp_call_function(). The argument to this function is
- *     the flags that will be used when restoring the interrupts. There is
- *     local_irq_save() call before kgdb_roundup_cpus().
+ *     in case of MIPS, smp_call_function() is used to roundup CPUs.
  *
  *     On non-SMP systems, this is not called.
  */
-void kgdb_roundup_cpus(unsigned long flags)
+void kgdb_roundup_cpus(void)
 {
        apic->send_IPI_allbutself(APIC_DM_NMI);
 }
index e465bb1..05e5b2e 100644 (file)
@@ -178,21 +178,16 @@ kgdb_arch_handle_exception(int vector, int signo, int err_code,
 
 /**
  *     kgdb_roundup_cpus - Get other CPUs into a holding pattern
- *     @flags: Current IRQ state
  *
  *     On SMP systems, we need to get the attention of the other CPUs
  *     and get them into a known state.  This should do what is needed
  *     to get the other CPUs to call kgdb_wait(). Note that on some arches,
  *     the NMI approach is not used for rounding up all the CPUs. For example,
- *     in case of MIPS, smp_call_function() is used to roundup CPUs. In
- *     this case, we have to make sure that interrupts are enabled before
- *     calling smp_call_function(). The argument to this function is
- *     the flags that will be used when restoring the interrupts. There is
- *     local_irq_save() call before kgdb_roundup_cpus().
+ *     in case of MIPS, smp_call_function() is used to roundup CPUs.
  *
  *     On non-SMP systems, this is not called.
  */
-extern void kgdb_roundup_cpus(unsigned long flags);
+extern void kgdb_roundup_cpus(void);
 
 /**
  *     kgdb_arch_set_pc - Generic call back to the program counter
index 65c0f13..f3cadda 100644 (file)
@@ -593,7 +593,7 @@ return_normal:
 
        /* Signal the other CPUs to enter kgdb_wait() */
        else if ((!kgdb_single_step) && kgdb_do_roundup)
-               kgdb_roundup_cpus(flags);
+               kgdb_roundup_cpus();
 #endif
 
        /*