aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched/fair.c6
-rw-r--r--kernel/sched/rt.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index c61a614465c8..f2c9c0c3406c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5418,10 +5418,9 @@ static inline void nohz_balance_exit_idle(int cpu)
5418static inline void set_cpu_sd_state_busy(void) 5418static inline void set_cpu_sd_state_busy(void)
5419{ 5419{
5420 struct sched_domain *sd; 5420 struct sched_domain *sd;
5421 int cpu = smp_processor_id();
5422 5421
5423 rcu_read_lock(); 5422 rcu_read_lock();
5424 sd = rcu_dereference_check_sched_domain(cpu_rq(cpu)->sd); 5423 sd = rcu_dereference_check_sched_domain(this_rq()->sd);
5425 5424
5426 if (!sd || !sd->nohz_idle) 5425 if (!sd || !sd->nohz_idle)
5427 goto unlock; 5426 goto unlock;
@@ -5436,10 +5435,9 @@ unlock:
5436void set_cpu_sd_state_idle(void) 5435void set_cpu_sd_state_idle(void)
5437{ 5436{
5438 struct sched_domain *sd; 5437 struct sched_domain *sd;
5439 int cpu = smp_processor_id();
5440 5438
5441 rcu_read_lock(); 5439 rcu_read_lock();
5442 sd = rcu_dereference_check_sched_domain(cpu_rq(cpu)->sd); 5440 sd = rcu_dereference_check_sched_domain(this_rq()->sd);
5443 5441
5444 if (!sd || sd->nohz_idle) 5442 if (!sd || sd->nohz_idle)
5445 goto unlock; 5443 goto unlock;
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 127a2c4cf4ab..7aced2e3b085 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -472,7 +472,7 @@ static int rt_se_boosted(struct sched_rt_entity *rt_se)
472#ifdef CONFIG_SMP 472#ifdef CONFIG_SMP
473static inline const struct cpumask *sched_rt_period_mask(void) 473static inline const struct cpumask *sched_rt_period_mask(void)
474{ 474{
475 return cpu_rq(smp_processor_id())->rd->span; 475 return this_rq()->rd->span;
476} 476}
477#else 477#else
478static inline const struct cpumask *sched_rt_period_mask(void) 478static inline const struct cpumask *sched_rt_period_mask(void)