aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/sn/kernel/sn2/sn_hwperf.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-04-27 17:01:37 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-27 17:01:37 -0700
commit37e53db8aa233c65142d63b496277bf5be9c0ade (patch)
treec4b7409825cc0497593e94dd7d6f874d22b0b3f0 /arch/ia64/sn/kernel/sn2/sn_hwperf.c
parentMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 (diff)
parent[IA64] update sn2 defconfig (diff)
downloadlinux-dev-37e53db8aa233c65142d63b496277bf5be9c0ade.tar.xz
linux-dev-37e53db8aa233c65142d63b496277bf5be9c0ade.zip
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] update sn2 defconfig [IA64] Add mca recovery failure messages [IA64-SGI] fix SGI Altix tioce_reserve_m32() bug [IA64] enable dumps to capture second page of kernel stack [IA64-SGI] - Reduce overhead of reading sn_topology [IA64-SGI] - Fix discover of nearest cpu node to IO node [IA64] IOC4 config option ordering [IA64] Setup an IA64 specific reclaim distance [IA64] eliminate compile time warnings [IA64] eliminate compile time warnings [IA64-SGI] SN SAL call to inject memory errors [IA64] - Fix MAX_PXM_DOMAINS for systems with > 256 nodes [IA64] Remove unused variable in sn_sal.h [IA64] Remove redundant NULL checks before kfree [IA64] wire up compat_sys_adjtimex()
Diffstat (limited to 'arch/ia64/sn/kernel/sn2/sn_hwperf.c')
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index d917afa30b27..739c948dc504 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -284,6 +284,8 @@ static int sn_hwperf_get_nearest_node_objdata(struct sn_hwperf_object_info *objb
/* find nearest node with cpus and nearest memory */
for (router=NULL, j=0; j < op->ports; j++) {
dest = sn_hwperf_findobj_id(objbuf, nobj, ptdata[j].conn_id);
+ if (dest && SN_HWPERF_IS_ROUTER(dest))
+ router = dest;
if (!dest || SN_HWPERF_FOREIGN(dest) ||
!SN_HWPERF_IS_NODE(dest) || SN_HWPERF_IS_IONODE(dest)) {
continue;
@@ -299,8 +301,6 @@ static int sn_hwperf_get_nearest_node_objdata(struct sn_hwperf_object_info *objb
*near_mem_node = c;
found_mem++;
}
- if (SN_HWPERF_IS_ROUTER(dest))
- router = dest;
}
if (router && (!found_cpu || !found_mem)) {
@@ -493,7 +493,7 @@ static int sn_topology_show(struct seq_file *s, void *d)
* numalink ports
*/
sz = obj->ports * sizeof(struct sn_hwperf_port_info);
- if ((ptdata = vmalloc(sz)) == NULL)
+ if ((ptdata = kmalloc(sz, GFP_KERNEL)) == NULL)
return -ENOMEM;
e = ia64_sn_hwperf_op(sn_hwperf_master_nasid,
SN_HWPERF_ENUM_PORTS, obj->id, sz,
@@ -541,7 +541,7 @@ static int sn_topology_show(struct seq_file *s, void *d)
(SN_HWPERF_IS_NL3ROUTER(obj) ||
SN_HWPERF_IS_NL3ROUTER(p)) ? "LLP3" : "LLP4");
}
- vfree(ptdata);
+ kfree(ptdata);
}
return 0;