Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 769ebc66 authored by Dean Roe's avatar Dean Roe Committed by Tony Luck
Browse files

[IA64-SGI] fix for-loop in sn_hwperf_geoid_to_cnode()



Fix a for-loop in sn_hwperf_geoid_to_cnode().  It needs to loop over
num_cnodes to ensure it can still process TIO nodes in addition to
compute nodes on systems with many nodes.  Interim fix until better
support for many (>265) nodes is complete.

Signed-off-by: default avatarDean Roe <roe@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent e6ef0fca
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -110,7 +110,11 @@ static int sn_hwperf_geoid_to_cnode(char *location)
	if (sn_hwperf_location_to_bpos(location, &rack, &bay, &slot, &slab))
	if (sn_hwperf_location_to_bpos(location, &rack, &bay, &slot, &slab))
		return -1;
		return -1;


	for_each_node(cnode) {
	/*
	 * FIXME: replace with cleaner for_each_XXX macro which addresses
	 * both compute and IO nodes once ACPI3.0 is available.
	 */
	for (cnode = 0; cnode < num_cnodes; cnode++) {
		geoid = cnodeid_get_geoid(cnode);
		geoid = cnodeid_get_geoid(cnode);
		module_id = geo_module(geoid);
		module_id = geo_module(geoid);
		this_rack = MODULE_GET_RACK(module_id);
		this_rack = MODULE_GET_RACK(module_id);