Skip to content

Commit

Permalink
cpufreq: ARM big LITTLE: Move cpu_to_cluster() to arm_big_little.h
Browse files Browse the repository at this point in the history
The cpu_to_cluster() function may be used by glue drivers, so it's
better to keep it in arm_big_little.h.

[rjw: Changelog]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Viresh Kumar authored and Rafael J. Wysocki committed May 12, 2013
1 parent 3c792e0 commit 4521adf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/cpufreq/arm_big_little.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ static struct clk *clk[MAX_CLUSTERS];
static struct cpufreq_frequency_table *freq_table[MAX_CLUSTERS];
static atomic_t cluster_usage[MAX_CLUSTERS] = {ATOMIC_INIT(0), ATOMIC_INIT(0)};

static int cpu_to_cluster(int cpu)
{
return topology_physical_package_id(cpu);
}

static unsigned int bL_cpufreq_get(unsigned int cpu)
{
u32 cur_cluster = cpu_to_cluster(cpu);
Expand Down
5 changes: 5 additions & 0 deletions drivers/cpufreq/arm_big_little.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ struct cpufreq_arm_bL_ops {
int (*init_opp_table)(struct device *cpu_dev);
};

static inline int cpu_to_cluster(int cpu)
{
return topology_physical_package_id(cpu);
}

int bL_cpufreq_register(struct cpufreq_arm_bL_ops *ops);
void bL_cpufreq_unregister(struct cpufreq_arm_bL_ops *ops);

Expand Down

0 comments on commit 4521adf

Please sign in to comment.