]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86: fix trigger_all_cpu_backtrace() implementation
authorMichel Lespinasse <walken@google.com>
Wed, 19 Jun 2013 00:05:22 +0000 (10:05 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:12:39 +0000 (17:12 +1000)
commit0fe24676c138578eccad83157988d26e9bdaafec
tree6d0c017e100d8476926241b591b6fbbc7b4e8cac
parentf93022a59d33256424decdbc60964c048a6c6623
x86: fix trigger_all_cpu_backtrace() implementation

Fix the x86 implementation of trigger_all_cpu_backtrace(), which was
previously (accidentally, as far as I can tell) disabled to always return
false as on architectures that do not implement this function.

trigger_all_cpu_backtrace(), as defined in include/linux/nmi.h, should
call arch_trigger_all_cpu_backtrace() if available, or return false if the
underlying arch doesn't implement this function.

x86 did provide a suitable arch_trigger_all_cpu_backtrace()
implementation, but it wasn't actually being used because it was declared
in asm/nmi.h, which linux/nmi.h doesn't include.  Also, linux/nmi.h
couldn't easily be fixed by including asm/nmi.h, because that file is not
available on all architectures.

I am proposing to fix this by moving the x86 definition of
arch_trigger_all_cpu_backtrace() to asm/irq.h.

Tested: echo l > /proc/sysrq-trigger

Before the change, this uses a fallback implementation which shows
backtraces on active CPUs (using smp_call_function_interrupt()).

After the change, this shows NMI backtraces on all CPUs.

Signed-off-by: Michel Lespinasse <walken@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/include/asm/irq.h
arch/x86/include/asm/nmi.h
arch/x86/kernel/apic/hw_nmi.c