lkml.org 
[lkml]   [2008]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC/PATCH 3/3] adjust cpu power for secondary threads on POWER6
Date
Hi,

> +static unsigned int pseries_cpu_power(int cpu, unsigned int
> default_power)
> +{
> + struct device_node *np;
> + unsigned int thread, power;
> +
> + if (!cpu_has_feature(CPU_FTR_ASYM_POWER))
> + return default_power;
> +
> + power = default_power;

Why not just NULL out the cpu_power function pointers on platforms
that don't have the feature bit instead? (or the other way around:
NULL by default, and set only on platforms that have imbalanced threads.

It'd be even nicer to do so without using up a cpu feature bit, since
it'd then only be used in determining whether to set the ppc_md
function pointer or not, but I don't know if there's a convenient way
to probe for this at runtime (cpu device tree node properties?).


-Olof



\
 
 \ /
  Last update: 2008-06-19 05:13    [W:0.054 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site