lkml.org 
[lkml]   [2013]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subjecttrigger_all_cpu_backtrace() is ignored on x86
From
Hi,

I am having a funny issue with code that tries to use
trigger_all_cpu_backtrace(). I would expect this function to dump
backtraces on architectures that support it, including x86. However as
it turns out, include/linux/nmi.h includes asm/irq.h but not
asm/nmi.h, so it misses the arch/x86/include/asm/nmi.h definition of
arch_trigger_all_cpu_backtrace and falls back to what it'd do for
architectures that don't have this function.

I would suggest the following straightforward fix:

diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index db50840e6355..6549df520dd3 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -6,6 +6,7 @@

#include <linux/sched.h>
#include <asm/irq.h>
+#include <asm/nmi.h>

/**
* touch_nmi_watchdog - restart NMI watchdog timeout.

However, I am slightly confused by the fact that
arch/x86/kernel/apic/hw_nmi.c also encloses the
arch_trigger_all_cpu_backtrace() definition within #ifdef
arch_trigger_all_cpu_backtrace - so I can't tell if the definition
from arch/x86/include/asm/nmi.h is intended to take effect or if there
is some subtle point explaining why things are as they are.

Help anyone ?


Thanks,

--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.


\
 
 \ /
  Last update: 2013-06-05 10:01    [W:0.046 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site