diff -urpN --exclude-from=/home/davej/.exclude bk-linus/include/linux/kernel.h linux-2.5/include/linux/kernel.h --- bk-linus/include/linux/kernel.h 2002-11-21 02:23:56.000000000 +0000 +++ linux-2.5/include/linux/kernel.h 2002-11-21 18:04:46.000000000 +0000 @@ -40,7 +40,7 @@ struct completion; -#ifdef CONFIG_DEBUG_KERNEL +#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP void __might_sleep(char *file, int line); #define might_sleep() __might_sleep(__FILE__, __LINE__) #else diff -urpN --exclude-from=/home/davej/.exclude bk-linus/kernel/sched.c linux-2.5/kernel/sched.c --- bk-linus/kernel/sched.c 2002-11-21 02:24:37.000000000 +0000 +++ linux-2.5/kernel/sched.c 2002-11-21 18:05:17.000000000 +0000 @@ -2233,7 +2233,7 @@ void __init sched_init(void) enter_lazy_tlb(&init_mm, current, smp_processor_id()); } -#ifdef CONFIG_DEBUG_KERNEL +#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP void __might_sleep(char *file, int line) { #if defined(in_atomic) diff -urpN --exclude-from=/home/davej/.exclude bk-linus/kernel/ksyms.c linux-2.5/kernel/ksyms.c --- bk-linus/kernel/ksyms.c 2002-11-21 02:24:37.000000000 +0000 +++ linux-2.5/kernel/ksyms.c 2002-11-21 18:05:17.000000000 +0000 @@ -481,7 +481,7 @@ EXPORT_SYMBOL(jiffies_64); EXPORT_SYMBOL(xtime); EXPORT_SYMBOL(do_gettimeofday); EXPORT_SYMBOL(do_settimeofday); -#ifdef CONFIG_DEBUG_KERNEL +#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP EXPORT_SYMBOL(__might_sleep); #endif #if !defined(__ia64__) diff -urpN --exclude-from=/home/davej/.exclude bk-linus/arch/i386/Kconfig linux-2.5/arch/i386/Kconfig --- bk-linus/arch/i386/Kconfig 2002-11-21 02:09:27.000000000 +0000 +++ linux-2.5/arch/i386/Kconfig 2002-11-21 18:23:48.000000000 +0000 @@ -1612,6 +1628,12 @@ symbolic stack backtraces. This increases the size of the kernel somewhat, as all symbols have to be loaded into the kernel image. +config DEBUG_SPINLOCK_SLEEP + bool "Sleep-inside-spinlock checking" + help + If you say Y here, various routines which may sleep will become very + noisy if they are called with a spinlock held. + config X86_EXTRA_IRQS bool depends on X86_LOCAL_APIC