lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 18 Jun 2008 21:58:59 -0500
From:	Olof Johansson <olof@...om.net>
To:	Nathan Lynch <ntl@...ox.com>
Cc:	linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org,
	Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
	Anton Blanchard <anton@...ba.org>
Subject: Re: [RFC/PATCH 3/3] adjust cpu power for secondary threads on POWER6

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ