diff options
author | Olof Johansson <olof@lixom.net> | 2019-12-09 09:17:09 -0800 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2019-12-09 09:17:10 -0800 |
commit | df4a6ff19224b5434237e781979fbace0a7feebd (patch) | |
tree | 943f7f0be761d5456c7ffd7b4910277170ab6b05 /arch | |
parent | e42617b825f8073569da76dc4510bfa019b1c35a (diff) | |
parent | c9385887cbbf292ee367f75b400874f00ea34890 (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-vexpress/spc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c index 354e0e7025ae..1da11bdb1dfb 100644 --- a/arch/arm/mach-vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c @@ -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); |