diff options
-rw-r--r-- | Documentation/DocBook/kernel-hacking.tmpl | 2 | ||||
-rw-r--r-- | Documentation/SubmitChecklist | 2 | ||||
-rw-r--r-- | Documentation/development-process/4.Coding | 2 | ||||
-rw-r--r-- | Documentation/ja_JP/SubmitChecklist | 2 | ||||
-rw-r--r-- | Documentation/zh_CN/SubmitChecklist | 2 | ||||
-rw-r--r-- | include/linux/kernel.h | 2 | ||||
-rw-r--r-- | kernel/sched.c | 2 | ||||
-rw-r--r-- | lib/Kconfig.debug | 8 |
8 files changed, 12 insertions, 10 deletions
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl index 7b3f49363413..07a9c48de5a2 100644 --- a/Documentation/DocBook/kernel-hacking.tmpl +++ b/Documentation/DocBook/kernel-hacking.tmpl | |||
@@ -409,7 +409,7 @@ cond_resched(); /* Will sleep */ | |||
409 | 409 | ||
410 | <para> | 410 | <para> |
411 | You should always compile your kernel | 411 | You should always compile your kernel |
412 | <symbol>CONFIG_DEBUG_SPINLOCK_SLEEP</symbol> on, and it will warn | 412 | <symbol>CONFIG_DEBUG_ATOMIC_SLEEP</symbol> on, and it will warn |
413 | you if you break these rules. If you <emphasis>do</emphasis> break | 413 | you if you break these rules. If you <emphasis>do</emphasis> break |
414 | the rules, you will eventually lock up your box. | 414 | the rules, you will eventually lock up your box. |
415 | </para> | 415 | </para> |
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist index da0382daa395..7b13be41c085 100644 --- a/Documentation/SubmitChecklist +++ b/Documentation/SubmitChecklist | |||
@@ -53,7 +53,7 @@ kernel patches. | |||
53 | 53 | ||
54 | 12: Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, | 54 | 12: Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, |
55 | CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, | 55 | CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, |
56 | CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEP all simultaneously | 56 | CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_ATOMIC_SLEEP all simultaneously |
57 | enabled. | 57 | enabled. |
58 | 58 | ||
59 | 13: Has been build- and runtime tested with and without CONFIG_SMP and | 59 | 13: Has been build- and runtime tested with and without CONFIG_SMP and |
diff --git a/Documentation/development-process/4.Coding b/Documentation/development-process/4.Coding index f3f1a469443c..83f5f5b365a3 100644 --- a/Documentation/development-process/4.Coding +++ b/Documentation/development-process/4.Coding | |||
@@ -244,7 +244,7 @@ testing purposes. In particular, you should turn on: | |||
244 | - DEBUG_SLAB can find a variety of memory allocation and use errors; it | 244 | - DEBUG_SLAB can find a variety of memory allocation and use errors; it |
245 | should be used on most development kernels. | 245 | should be used on most development kernels. |
246 | 246 | ||
247 | - DEBUG_SPINLOCK, DEBUG_SPINLOCK_SLEEP, and DEBUG_MUTEXES will find a | 247 | - DEBUG_SPINLOCK, DEBUG_ATOMIC_SLEEP, and DEBUG_MUTEXES will find a |
248 | number of common locking errors. | 248 | number of common locking errors. |
249 | 249 | ||
250 | There are quite a few other debugging options, some of which will be | 250 | There are quite a few other debugging options, some of which will be |
diff --git a/Documentation/ja_JP/SubmitChecklist b/Documentation/ja_JP/SubmitChecklist index 2df4576f1173..cb5507b1ac81 100644 --- a/Documentation/ja_JP/SubmitChecklist +++ b/Documentation/ja_JP/SubmitChecklist | |||
@@ -68,7 +68,7 @@ Linux カーネルパッチ投稿者向けチェックリスト | |||
68 | 68 | ||
69 | 12: CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, CONFIG_DEBUG_SLAB, | 69 | 12: CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, CONFIG_DEBUG_SLAB, |
70 | CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, CONFIG_DEBUG_SPINLOCK, | 70 | CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, CONFIG_DEBUG_SPINLOCK, |
71 | CONFIG_DEBUG_SPINLOCK_SLEEP これら全てを同時に有効にして動作確認を | 71 | CONFIG_DEBUG_ATOMIC_SLEEP これら全てを同時に有効にして動作確認を |
72 | 行ってください。 | 72 | 行ってください。 |
73 | 73 | ||
74 | 13: CONFIG_SMP, CONFIG_PREEMPT を有効にした場合と無効にした場合の両方で | 74 | 13: CONFIG_SMP, CONFIG_PREEMPT を有効にした場合と無効にした場合の両方で |
diff --git a/Documentation/zh_CN/SubmitChecklist b/Documentation/zh_CN/SubmitChecklist index 951415bbab0c..4c741d6bc048 100644 --- a/Documentation/zh_CN/SubmitChecklist +++ b/Documentation/zh_CN/SubmitChecklist | |||
@@ -67,7 +67,7 @@ Linuxںύ嵥 | |||
67 | 67 | ||
68 | 12ѾͨCONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, | 68 | 12ѾͨCONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, |
69 | CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, | 69 | CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, |
70 | CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEPԣͬʱ | 70 | CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_ATOMIC_SLEEPԣͬʱ |
71 | ʹܡ | 71 | ʹܡ |
72 | 72 | ||
73 | 13Ѿʹû߲ʹ CONFIG_SMP CONFIG_PREEMPTִʱ䡣 | 73 | 13Ѿʹû߲ʹ CONFIG_SMP CONFIG_PREEMPTִʱ䡣 |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index fb0e7329fee1..24b489f66592 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -121,7 +121,7 @@ extern int _cond_resched(void); | |||
121 | # define might_resched() do { } while (0) | 121 | # define might_resched() do { } while (0) |
122 | #endif | 122 | #endif |
123 | 123 | ||
124 | #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP | 124 | #ifdef CONFIG_DEBUG_ATOMIC_SLEEP |
125 | void __might_sleep(const char *file, int line, int preempt_offset); | 125 | void __might_sleep(const char *file, int line, int preempt_offset); |
126 | /** | 126 | /** |
127 | * might_sleep - annotation for functions that can sleep | 127 | * might_sleep - annotation for functions that can sleep |
diff --git a/kernel/sched.c b/kernel/sched.c index 90ad7cf2b290..a5f318b8d659 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -8018,7 +8018,7 @@ void __init sched_init(void) | |||
8018 | scheduler_running = 1; | 8018 | scheduler_running = 1; |
8019 | } | 8019 | } |
8020 | 8020 | ||
8021 | #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP | 8021 | #ifdef CONFIG_DEBUG_ATOMIC_SLEEP |
8022 | static inline int preempt_count_equals(int preempt_offset) | 8022 | static inline int preempt_count_equals(int preempt_offset) |
8023 | { | 8023 | { |
8024 | int nested = (preempt_count() & ~PREEMPT_ACTIVE) + rcu_preempt_depth(); | 8024 | int nested = (preempt_count() & ~PREEMPT_ACTIVE) + rcu_preempt_depth(); |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index a7dd7b547fea..81a4f3302bc8 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -648,13 +648,15 @@ config TRACE_IRQFLAGS | |||
648 | Enables hooks to interrupt enabling and disabling for | 648 | Enables hooks to interrupt enabling and disabling for |
649 | either tracing or lock debugging. | 649 | either tracing or lock debugging. |
650 | 650 | ||
651 | config DEBUG_SPINLOCK_SLEEP | 651 | config DEBUG_ATOMIC_SLEEP |
652 | bool "Spinlock debugging: sleep-inside-spinlock checking" | 652 | bool "Sleep inside atomic section checking" |
653 | select PREEMPT_COUNT | 653 | select PREEMPT_COUNT |
654 | depends on DEBUG_KERNEL | 654 | depends on DEBUG_KERNEL |
655 | help | 655 | help |
656 | If you say Y here, various routines which may sleep will become very | 656 | If you say Y here, various routines which may sleep will become very |
657 | noisy if they are called with a spinlock held. | 657 | noisy if they are called inside atomic sections: when a spinlock is |
658 | held, inside an rcu read side critical section, inside preempt disabled | ||
659 | sections, inside an interrupt, etc... | ||
658 | 660 | ||
659 | config DEBUG_LOCKING_API_SELFTESTS | 661 | config DEBUG_LOCKING_API_SELFTESTS |
660 | bool "Locking API boot-time self-tests" | 662 | bool "Locking API boot-time self-tests" |