lkml.org 
[lkml]   [2011]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: trigger_all_cpu_backtrace() has no generic implementation (was Re: [regression, 3.1, rcu] rcu_sched_state detected stall on CPU 8 (t=15000 jiffies))
On Sat, Aug 06, 2011 at 10:20:56AM +1000, Dave Chinner wrote:
> > My ability to do so is quite limited, but you do have
> > CONFIG_X86_LOCAL_APIC=y. I took a quick look but don't immediately
> > see why you would not be getting the NMI variant.
>
> It would appear to be because include/linux/nmi.h does not do
> #include <asm/nmi.h> where arch_trigger_all_cpu_backtrace is
> defined.
>
> I think this is the case from looking at the build deps for
> rcutree.h: I see include/linux/nmi.h but no asm/nmi.h. It appears
> that asm/nmi.h is only included if this config ifdef is true:

Hi Dave,

Does this patch solve your problem?

Cheers,
Don


diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h
index ba870bb..ffa50f5 100644
--- a/arch/x86/include/asm/irq.h
+++ b/arch/x86/include/asm/irq.h
@@ -10,6 +10,8 @@
#include <asm/apicdef.h>
#include <asm/irq_vectors.h>

+#define ARCH_HAS_NMI_WATCHDOG
+
static inline int irq_canonicalize(int irq)
{
return ((irq == 2) ? 9 : irq);
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h
index a4f1945..74172ef 100644
--- a/arch/x86/include/asm/nmi.h
+++ b/arch/x86/include/asm/nmi.h
@@ -5,6 +5,13 @@
#include <asm/irq.h>
#include <asm/io.h>

+#if !defined (CONFIG_HARDLOCKUP_DETECTOR)
+#include <linux/sched.h>
+static inline void touch_nmi_watchdog(void)
+{
+ touch_softlockup_watchdog();
+}
+#endif
#ifdef CONFIG_X86_LOCAL_APIC

extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index 2d304ef..9aac41b 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -14,7 +14,7 @@
* may be used to reset the timeout - for code which intentionally
* disables interrupts for a long time. This call is stateless.
*/
-#if defined(ARCH_HAS_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
+#if defined(ARCH_HAS_NMI_WATCHDOG)
#include <asm/nmi.h>
extern void touch_nmi_watchdog(void);
#else

\
 
 \ /
  Last update: 2011-08-23 18:45    [W:0.329 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site