Re: trigger_all_cpu_backtrace() has no generic implementation (wasRe: [regression, 3.1, rcu] rcu_sched_state detected stall on CPU 8 (t=15000jiffies))

From: Don Zickus
Date: Tue Aug 23 2011 - 12:42:55 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/