* [PATCH] ia64 sn_hwperf use of num_online_cpus()
@ 2006-03-27 21:18 hawkes
0 siblings, 0 replies; only message in thread
From: hawkes @ 2006-03-27 21:18 UTC (permalink / raw)
To: Tony Luck, Andrew Morton, linux-ia64, linux-kernel
Cc: Jack Steiner, hawkes, Jes Sorensen
Eliminate an unnecessary -- and flawed -- use of the expensive
num_online_cpus().
Signed-off-by: John Hawkes <hawkes@sgi.com>
Index: linux/arch/ia64/sn/kernel/sn2/sn_hwperf.c
=================================--- linux.orig/arch/ia64/sn/kernel/sn2/sn_hwperf.c 2006-03-19 21:53:29.000000000 -0800
+++ linux/arch/ia64/sn/kernel/sn2/sn_hwperf.c 2006-03-27 13:14:12.000000000 -0800
@@ -605,7 +605,7 @@ static int sn_hwperf_op_cpu(struct sn_hw
op_info->a->arg &= SN_HWPERF_ARG_OBJID_MASK;
if (cpu != SN_HWPERF_ARG_ANY_CPU) {
- if (cpu >= num_online_cpus() || !cpu_online(cpu)) {
+ if (cpu >= NR_CPUS || !cpu_online(cpu)) {
r = -EINVAL;
goto out;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-27 21:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-27 21:18 [PATCH] ia64 sn_hwperf use of num_online_cpus() hawkes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox