diff options
Diffstat (limited to 'arch/ia64/sn/kernel/sn2/sn_hwperf.c')
-rw-r--r-- | arch/ia64/sn/kernel/sn2/sn_hwperf.c | 8 |
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 | |||
284 | /* find nearest node with cpus and nearest memory */ | 284 | /* find nearest node with cpus and nearest memory */ |
285 | for (router=NULL, j=0; j < op->ports; j++) { | 285 | for (router=NULL, j=0; j < op->ports; j++) { |
286 | dest = sn_hwperf_findobj_id(objbuf, nobj, ptdata[j].conn_id); | 286 | dest = sn_hwperf_findobj_id(objbuf, nobj, ptdata[j].conn_id); |
287 | if (dest && SN_HWPERF_IS_ROUTER(dest)) | ||
288 | router = dest; | ||
287 | if (!dest || SN_HWPERF_FOREIGN(dest) || | 289 | if (!dest || SN_HWPERF_FOREIGN(dest) || |
288 | !SN_HWPERF_IS_NODE(dest) || SN_HWPERF_IS_IONODE(dest)) { | 290 | !SN_HWPERF_IS_NODE(dest) || SN_HWPERF_IS_IONODE(dest)) { |
289 | continue; | 291 | continue; |
@@ -299,8 +301,6 @@ static int sn_hwperf_get_nearest_node_objdata(struct sn_hwperf_object_info *objb | |||
299 | *near_mem_node = c; | 301 | *near_mem_node = c; |
300 | found_mem++; | 302 | found_mem++; |
301 | } | 303 | } |
302 | if (SN_HWPERF_IS_ROUTER(dest)) | ||
303 | router = dest; | ||
304 | } | 304 | } |
305 | 305 | ||
306 | if (router && (!found_cpu || !found_mem)) { | 306 | if (router && (!found_cpu || !found_mem)) { |
@@ -493,7 +493,7 @@ static int sn_topology_show(struct seq_file *s, void *d) | |||
493 | * numalink ports | 493 | * numalink ports |
494 | */ | 494 | */ |
495 | sz = obj->ports * sizeof(struct sn_hwperf_port_info); | 495 | sz = obj->ports * sizeof(struct sn_hwperf_port_info); |
496 | if ((ptdata = vmalloc(sz)) == NULL) | 496 | if ((ptdata = kmalloc(sz, GFP_KERNEL)) == NULL) |
497 | return -ENOMEM; | 497 | return -ENOMEM; |
498 | e = ia64_sn_hwperf_op(sn_hwperf_master_nasid, | 498 | e = ia64_sn_hwperf_op(sn_hwperf_master_nasid, |
499 | SN_HWPERF_ENUM_PORTS, obj->id, sz, | 499 | SN_HWPERF_ENUM_PORTS, obj->id, sz, |
@@ -541,7 +541,7 @@ static int sn_topology_show(struct seq_file *s, void *d) | |||
541 | (SN_HWPERF_IS_NL3ROUTER(obj) || | 541 | (SN_HWPERF_IS_NL3ROUTER(obj) || |
542 | SN_HWPERF_IS_NL3ROUTER(p)) ? "LLP3" : "LLP4"); | 542 | SN_HWPERF_IS_NL3ROUTER(p)) ? "LLP3" : "LLP4"); |
543 | } | 543 | } |
544 | vfree(ptdata); | 544 | kfree(ptdata); |
545 | } | 545 | } |
546 | 546 | ||
547 | return 0; | 547 | return 0; |