aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_rt.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r--kernel/sched_rt.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 1fa13624293e..1f0e99d1a8ce 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -962,7 +962,7 @@ static struct task_struct *pick_next_highest_task_rt(struct rq *rq, int cpu)
962 return next; 962 return next;
963} 963}
964 964
965static DEFINE_PER_CPU(cpumask_t, local_cpu_mask); 965static DEFINE_PER_CPU(cpumask_var_t, local_cpu_mask);
966 966
967static inline int pick_optimal_cpu(int this_cpu, cpumask_t *mask) 967static inline int pick_optimal_cpu(int this_cpu, cpumask_t *mask)
968{ 968{
@@ -982,7 +982,7 @@ static inline int pick_optimal_cpu(int this_cpu, cpumask_t *mask)
982static int find_lowest_rq(struct task_struct *task) 982static int find_lowest_rq(struct task_struct *task)
983{ 983{
984 struct sched_domain *sd; 984 struct sched_domain *sd;
985 cpumask_t *lowest_mask = &__get_cpu_var(local_cpu_mask); 985 cpumask_t *lowest_mask = __get_cpu_var(local_cpu_mask);
986 int this_cpu = smp_processor_id(); 986 int this_cpu = smp_processor_id();
987 int cpu = task_cpu(task); 987 int cpu = task_cpu(task);
988 988
@@ -1551,3 +1551,12 @@ static void print_rt_stats(struct seq_file *m, int cpu)
1551 rcu_read_unlock(); 1551 rcu_read_unlock();
1552} 1552}
1553#endif /* CONFIG_SCHED_DEBUG */ 1553#endif /* CONFIG_SCHED_DEBUG */
1554
1555/* Note that this is never called for !SMP, but that's OK. */
1556static inline void init_sched_rt_class(void)
1557{
1558 unsigned int i;
1559
1560 for_each_possible_cpu(i)
1561 alloc_cpumask_var(&per_cpu(local_cpu_mask, i), GFP_KERNEL);
1562}