projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce9eed5
)
[IA64-SGI] sn_hwperf use of num_online_cpus()
author
hawkes@sgi.com
<hawkes@sgi.com>
Mon, 27 Mar 2006 21:18:17 +0000
(13:18 -0800)
committer
Tony Luck
<tony.luck@intel.com>
Mon, 27 Mar 2006 21:47:44 +0000
(13:47 -0800)
Eliminate an unnecessary -- and flawed -- use of the expensive
num_online_cpus().
Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/sn/kernel/sn2/sn_hwperf.c
patch
|
blob
|
history
diff --git
a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index 70db21f3df215afb95140b8fbbef00e06eabf4c6..6ff34fc05c821ce9e77a84e9be1deda1e8f1fea8 100644
(file)
--- a/
arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/
arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@
-605,7
+605,7
@@
static int sn_hwperf_op_cpu(struct sn_hwperf_op_info *op_info)
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;
}