Skip to contentSkip to conversation

correctly count CPU objects in the ia64/sn hwperf interface

PATCH New Mark Goodwin 1 participant 1 message Jul 13, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 correctly count CPU objects in the ia64/sn hwperf interface

Hi Tony,

please accept this patch to fix a logic error in the SGI ia64/sn hwperf interface.

Thanks
-- Mark

Correctly count CPU objects for SGI ia64/sn hwperf interface

arch/ia64/sn/kernel/sn2/sn_hwperf.c +2 -1
@@ -750,9 +750,10 @@
 			goto error;
 		} else
 		if ((r = sn_hwperf_enum_objects(&nobj, &objs)) == 0) {
+			int cpuobj_index = 0;
+
 			memset(p, 0, a.sz);
 			for (i = 0; i < nobj; i++) {
-				int cpuobj_index = 0;
 				if (!SN_HWPERF_IS_NODE(objs + i))
 					continue;
 				node = sn_hwperf_obj_to_cnode(objs + i);