]> err.no Git - linux-2.6/commitdiff
[IA64-SGI] fix for-loop in sn_hwperf_geoid_to_cnode()
authorDean Roe <roe@sgi.com>
Mon, 6 Mar 2006 16:32:05 +0000 (10:32 -0600)
committerTony Luck <tony.luck@intel.com>
Tue, 28 Mar 2006 16:39:10 +0000 (08:39 -0800)
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: Dean Roe <roe@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/sn/kernel/sn2/sn_hwperf.c

index 6ff34fc05c821ce9e77a84e9be1deda1e8f1fea8..d917afa30b27ef3b6ae5ae8025355951b186b889 100644 (file)
@@ -110,7 +110,11 @@ static int sn_hwperf_geoid_to_cnode(char *location)
        if (sn_hwperf_location_to_bpos(location, &rack, &bay, &slot, &slab))
                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);
                module_id = geo_module(geoid);
                this_rack = MODULE_GET_RACK(module_id);