Message ID | 1454500799-18451-5-git-send-email-juri.lelli@arm.com |
---|---|
State | New |
Headers | show |
On 03/02/16 11:59, Juri Lelli wrote: > Define arch_wants_init_cpu_capacity() to return true; so that > cpufreq_init_cpu_capacity() can go ahead and profile CPU capacities > at boot time. [...] > > +bool arch_wants_init_cpu_capacity(void) > +{ > + return true; Isn't this a little bit too simple? Not every ARM/ARM64 platform is a heterogeneous one. You could add code to compare the cpu node 'compatible' properties (required) and only return true if they differ, which would let you detect uarch based heterogeneity. In case of max. frequency based heterogeneity (clusters consisting of same cpu types but running at different max. frequency), you're at the mercy of cpu node 'clock-frequency' properties (optional). We might argue that for these platforms, providing cpu node 'clock-frequency' properties is necessary. The 'struct cpu_efficiency table_efficiency[]' based approach in ARM already faces this problem. > +} > + > static int __init get_cpu_for_node(struct device_node *node) > { > struct device_node *cpu_node; > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Feb 08, 2016 at 12:28:39PM +0000, Dietmar Eggemann wrote: > On 03/02/16 11:59, Juri Lelli wrote: > > +bool arch_wants_init_cpu_capacity(void) > > +{ > > + return true; > Isn't this a little bit too simple? Not every ARM/ARM64 platform is a > heterogeneous one. Does it matter? Is there any problem with doing the callibration and having it say that all the CPUs performs very similarly? My understanding was that this was simply saying it was worth checking to see if there was some asymmetry.
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index 3b75d63..f2513a6 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -35,6 +35,11 @@ void set_capacity_scale(unsigned int cpu, unsigned long capacity) per_cpu(cpu_scale, cpu) = capacity; } +bool arch_wants_init_cpu_capacity(void) +{ + return true; +} + static int __init get_cpu_for_node(struct device_node *node) { struct device_node *cpu_node;
Define arch_wants_init_cpu_capacity() to return true; so that cpufreq_init_cpu_capacity() can go ahead and profile CPU capacities at boot time. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Sudeep Holla <sudeep.holla@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Juri Lelli <juri.lelli@arm.com> --- arch/arm64/kernel/topology.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html