summaryrefslogtreecommitdiff
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-07-01 13:20:51 +0200
committerIngo Molnar <mingo@elte.hu>2011-07-01 13:20:51 +0200
commit1ecc818c51b1f6886825dae3885792d5e49ec798 (patch)
tree2179ae53fa86ea6a42d01ff4efc1a3f6a32e76f2 /kernel/sched.c
parent1c09ab0d257317f97e8629a3d0c8713d6dd9de4c (diff)
parentd902db1eb60387040fe541573083e47469db50ac (diff)
downloadlwn-1ecc818c51b1f6886825dae3885792d5e49ec798.tar.gz
lwn-1ecc818c51b1f6886825dae3885792d5e49ec798.zip
Merge branch 'sched/core-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into sched/core
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index e355ee72e83f..4380a80c1e7a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2854,7 +2854,7 @@ void sched_fork(struct task_struct *p)
#if defined(CONFIG_SMP)
p->on_cpu = 0;
#endif
-#ifdef CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT_COUNT
/* Want to start with kernel preemption disabled. */
task_thread_info(p)->preempt_count = 1;
#endif
@@ -8022,7 +8022,7 @@ void __init sched_init(void)
scheduler_running = 1;
}
-#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
+#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
static inline int preempt_count_equals(int preempt_offset)
{
int nested = (preempt_count() & ~PREEMPT_ACTIVE) + rcu_preempt_depth();
@@ -8032,7 +8032,6 @@ static inline int preempt_count_equals(int preempt_offset)
void __might_sleep(const char *file, int line, int preempt_offset)
{
-#ifdef in_atomic
static unsigned long prev_jiffy; /* ratelimiting */
if ((preempt_count_equals(preempt_offset) && !irqs_disabled()) ||
@@ -8054,7 +8053,6 @@ void __might_sleep(const char *file, int line, int preempt_offset)
if (irqs_disabled())
print_irqtrace_events(current);
dump_stack();
-#endif
}
EXPORT_SYMBOL(__might_sleep);
#endif