mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 10:12:16 +09:00
Merge tag 'vexpress-fixes-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes
ARMv7 Vexpress fixes for v5.5 Switching the cpumask from topology core to OPP sharing, as the topology core cpumask can be modified during cpu hotplug to avoid setting up wrong cpufreq policy cpumask. * tag 'vexpress-fixes-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: cpufreq: vexpress-spc: Switch cpumask from topology core to OPP sharing ARM: vexpress: Set-up shared OPP table instead of individual for each CPU Link: https://lore.kernel.org/r/20191209140037.GC25155@bogus Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
@@ -551,8 +551,9 @@ static struct clk *ve_spc_clk_register(struct device *cpu_dev)
|
||||
|
||||
static int __init ve_spc_clk_init(void)
|
||||
{
|
||||
int cpu;
|
||||
int cpu, cluster;
|
||||
struct clk *clk;
|
||||
bool init_opp_table[MAX_CLUSTERS] = { false };
|
||||
|
||||
if (!info)
|
||||
return 0; /* Continue only if SPC is initialised */
|
||||
@@ -578,8 +579,17 @@ static int __init ve_spc_clk_init(void)
|
||||
continue;
|
||||
}
|
||||
|
||||
cluster = topology_physical_package_id(cpu_dev->id);
|
||||
if (init_opp_table[cluster])
|
||||
continue;
|
||||
|
||||
if (ve_init_opp_table(cpu_dev))
|
||||
pr_warn("failed to initialise cpu%d opp table\n", cpu);
|
||||
else if (dev_pm_opp_set_sharing_cpus(cpu_dev,
|
||||
topology_core_cpumask(cpu_dev->id)))
|
||||
pr_warn("failed to mark OPPs shared for cpu%d\n", cpu);
|
||||
else
|
||||
init_opp_table[cluster] = true;
|
||||
}
|
||||
|
||||
platform_device_register_simple("vexpress-spc-cpufreq", -1, NULL, 0);
|
||||
|
||||
@@ -434,7 +434,7 @@ static int ve_spc_cpufreq_init(struct cpufreq_policy *policy)
|
||||
if (cur_cluster < MAX_CLUSTERS) {
|
||||
int cpu;
|
||||
|
||||
cpumask_copy(policy->cpus, topology_core_cpumask(policy->cpu));
|
||||
dev_pm_opp_get_sharing_cpus(cpu_dev, policy->cpus);
|
||||
|
||||
for_each_cpu(cpu, policy->cpus)
|
||||
per_cpu(physical_cluster, cpu) = cur_cluster;
|
||||
|
||||
Reference in New Issue
Block a user