]> Git Repo - linux.git/commit
x86: Fix trigger_all_cpu_backtrace() implementation
authorMichel Lespinasse <[email protected]>
Thu, 6 Jun 2013 11:41:15 +0000 (04:41 -0700)
committerIngo Molnar <[email protected]>
Thu, 20 Jun 2013 12:00:21 +0000 (14:00 +0200)
commitb52e0a7c4e4100f8683af508664e60e1603070f9
tree1688d563baa6a011bb2945d79050ecb008da9821
parent949785996ec2250fa958fc3a924e5186e9a8fa2c
x86: Fix trigger_all_cpu_backtrace() implementation

The following change fixes 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 via: 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 <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/include/asm/irq.h
arch/x86/include/asm/nmi.h
arch/x86/kernel/apic/hw_nmi.c
This page took 0.04198 seconds and 4 git commands to generate.