]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/sched.c
Merge remote-tracking branch 'moduleh/module.h-split'
[karo-tx-linux.git] / kernel / sched.c
index f54b886fbe101e24e1e6b16e3ed92757d0d227fd..7c0c81b39cc31458a3393d843b46398324a0a469 100644 (file)
@@ -4237,6 +4237,7 @@ static inline void schedule_debug(struct task_struct *prev)
         */
        if (unlikely(in_atomic_preempt_off() && !prev->exit_state))
                __schedule_bug(prev);
+       rcu_sleep_check();
 
        profile_hit(SCHED_PROFILING, __builtin_return_address(0));
 
@@ -5968,15 +5969,6 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
        ftrace_graph_init_idle_task(idle, cpu);
 }
 
-/*
- * In a system that switches off the HZ timer nohz_cpu_mask
- * indicates which cpus entered this state. This is used
- * in the rcu update to wait only for active cpus. For system
- * which do not switch off the HZ timer nohz_cpu_mask should
- * always be CPU_BITS_NONE.
- */
-cpumask_var_t nohz_cpu_mask;
-
 /*
  * Increase the granularity value when there are more CPUs,
  * because with more CPUs the 'effective latency' as visible
@@ -8188,8 +8180,6 @@ void __init sched_init(void)
         */
        current->sched_class = &fair_sched_class;
 
-       /* Allocate the nohz_cpu_mask if CONFIG_CPUMASK_OFFSTACK */
-       zalloc_cpumask_var(&nohz_cpu_mask, GFP_NOWAIT);
 #ifdef CONFIG_SMP
        zalloc_cpumask_var(&sched_domains_tmpmask, GFP_NOWAIT);
 #ifdef CONFIG_NO_HZ
@@ -8219,6 +8209,7 @@ void __might_sleep(const char *file, int line, int preempt_offset)
 {
        static unsigned long prev_jiffy;        /* ratelimiting */
 
+       rcu_sleep_check(); /* WARN_ON_ONCE() by default, no rate limit reqd. */
        if ((preempt_count_equals(preempt_offset) && !irqs_disabled()) ||
            system_state != SYSTEM_RUNNING || oops_in_progress)
                return;