[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1390221588-20473-11-git-send-email-dietmar.eggemann@arm.com>
Date: Mon, 20 Jan 2014 12:39:47 +0000
From: dietmar.eggemann@....com
To: peterz@...radead.org, mingo@...hat.com, vincent.guittot@...aro.org,
morten.rasmussen@....com, chris.redpath@....com
Cc: linux-kernel@...r.kernel.org, dietmar.eggemann@....com
Subject: [RFC v2 PATCH 10/11] sched: delete sd ptr arg in arch_scale_freq_power()
From: Dietmar Eggemann <dietmar.eggemann@....com>
The ARM arch_scale_freq_power function is the only one outside the core
scheduler code using struct sched_domain. This argument is not used in
the call chain. This patch deletes it to make it possible to un-export
struct sched_domain.
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@....com>
---
arch/arm/kernel/topology.c | 4 ++--
kernel/sched/fair.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 85a87370f144..ae209ce7d78f 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -42,7 +42,7 @@
*/
static DEFINE_PER_CPU(unsigned long, cpu_scale);
-unsigned long arch_scale_freq_power(struct sched_domain *sd, int cpu)
+unsigned long arch_scale_freq_power(int cpu)
{
return per_cpu(cpu_scale, cpu);
}
@@ -166,7 +166,7 @@ void update_cpu_power(unsigned int cpu)
set_power_scale(cpu, cpu_capacity(cpu) / middle_capacity);
printk(KERN_INFO "CPU%u: update cpu_power %lu\n",
- cpu, arch_scale_freq_power(NULL, cpu));
+ cpu, arch_scale_freq_power(cpu));
}
#else
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index c7395d97e4cb..cb93cb09caf8 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5257,14 +5257,14 @@ static inline int get_sd_load_idx(struct sched_domain *sd,
return load_idx;
}
-static unsigned long default_scale_freq_power(struct sched_domain *sd, int cpu)
+static unsigned long default_scale_freq_power(int cpu)
{
return SCHED_POWER_SCALE;
}
-unsigned long __weak arch_scale_freq_power(struct sched_domain *sd, int cpu)
+unsigned long __weak arch_scale_freq_power(int cpu)
{
- return default_scale_freq_power(sd, cpu);
+ return default_scale_freq_power(cpu);
}
static unsigned long default_scale_smt_power(struct sched_domain *sd, int cpu)
@@ -5329,9 +5329,9 @@ static void update_cpu_power(struct sched_domain *sd, int cpu)
sdg->sgp->power_orig = power;
if (sched_feat(ARCH_POWER))
- power *= arch_scale_freq_power(sd, cpu);
+ power *= arch_scale_freq_power(cpu);
else
- power *= default_scale_freq_power(sd, cpu);
+ power *= default_scale_freq_power(cpu);
power >>= SCHED_POWER_SHIFT;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists