Commit 6b5738f2 authored by Dave Jones's avatar Dave Jones

[PATCH] CONFIG_DEBUG_SPINLOCK_SLEEP

This makes the sleep-under-spinlock-held check a CONFIG_ option.
parent cebce9d8
......@@ -1612,6 +1612,12 @@ config KALLSYMS
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
......
......@@ -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
......
......@@ -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__)
......
......@@ -2253,7 +2253,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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment