changeset 12762:9c71588c0d0e

6943798 HP x64 system panics with: lpl_topo_verify failed: -3
author Ethindra Ramamurthy <Ethindra.Ramamurthy@Sun.COM>
date Fri, 02 Jul 2010 09:31:06 -0700
parents 7f5f1632f71d
children 4b30642bc04e
files usr/src/uts/common/os/lgrp_topo.c
diffstat 1 files changed, 34 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/os/lgrp_topo.c	Fri Jul 02 07:28:02 2010 -0700
+++ b/usr/src/uts/common/os/lgrp_topo.c	Fri Jul 02 09:31:06 2010 -0700
@@ -19,8 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -982,8 +981,30 @@
 			lgrp_rsets_copy(child->lgrp_set, rset);
 			lgrp_rsets_add(newleaf->lgrp_set, rset);
 			if (nlevels >= lgrp_topo_levels) {
-				if (parent == lgrp_root)
+
+#ifdef	DEBUG
+				if (lgrp_topo_debug > 0) {
+					prom_printf("lgrp_lineage_add: nlevels "
+					    "%d > lgrp_topo_levels %d\n",
+					    nlevels, lgrp_topo_levels);
+					lgrp_rsets_print("rset ", rset);
+				}
+#endif	/* DEBUG */
+
+				if (parent == lgrp_root) {
+					/*
+					 * Don't proprogate new leaf resources
+					 * to parent, if it already contains
+					 * these resources
+					 */
+					if (lgrp_rsets_member_all(
+					    parent->lgrp_set, newleaf->lgrp_id))
+						break;
+
+					total += lgrp_proprogate(newleaf, child,
+					    latency, &changes);
 					break;
+				}
 
 #ifdef	DEBUG
 				if (lgrp_topo_debug > 0) {
@@ -1010,6 +1031,16 @@
 				total++;
 				proprogate++;
 			} else {
+
+#ifdef	DEBUG
+				if (lgrp_topo_debug > 0) {
+					prom_printf("lgrp_lineage_add: "
+					    "lgrp_new_parent(0x%p,%d)\n",
+					    (void *)child, latency);
+					lgrp_rsets_print("rset ", rset);
+				}
+#endif	/* DEBUG */
+
 				total += lgrp_new_parent(child, latency, rset,
 				    &changes);
 				intermed = child->lgrp_parent;