Commit 9ef7fa50 authored by Douglas Anderson's avatar Douglas Anderson Committed by Daniel Thompson
Browse files

kgdb: Remove irq flags from roundup



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: default avatarDouglas 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: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
parent 25956467
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);
+2 −7
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);
Loading