6444147 OPL panic: assertion failed: info.mmu_idx < max_mmu_ctxdoms
authormv143129
Thu, 27 Jul 2006 13:37:12 -0700
changeset 2457 4d90a6ed88f7
parent 2456 0bd2410bad66
child 2458 57289607cb87
6444147 OPL panic: assertion failed: info.mmu_idx < max_mmu_ctxdoms
usr/src/uts/sun4u/opl/os/opl.c
usr/src/uts/sun4u/sys/opl.h
--- a/usr/src/uts/sun4u/opl/os/opl.c	Thu Jul 27 13:36:16 2006 -0700
+++ b/usr/src/uts/sun4u/opl/os/opl.c	Thu Jul 27 13:37:12 2006 -0700
@@ -974,10 +974,7 @@
 
 	impl = cpunodes[cpuid].implementation;
 	if (IS_OLYMPUS_C(impl)) {
-		/*
-		 * Olympus-C processor supports 2 strands per core.
-		 */
-		info->mmu_idx = cpuid >> 1;
+		info->mmu_idx = MMU_ID(cpuid);
 		info->mmu_nctxs = 8192;
 	} else {
 		cmn_err(CE_PANIC, "Unknown processor %d", impl);
--- a/usr/src/uts/sun4u/sys/opl.h	Thu Jul 27 13:36:16 2006 -0700
+++ b/usr/src/uts/sun4u/sys/opl.h	Thu Jul 27 13:37:12 2006 -0700
@@ -66,6 +66,10 @@
 #define	CORE_ID(x)	(((uint_t)(x)/OPL_MAX_STRANDID_PER_CORE) & \
 	(OPL_MAX_COREID_PER_CMP - 1))
 #define	STRAND_ID(x)	((uint_t)(x) & (OPL_MAX_STRANDID_PER_CORE - 1))
+#define	MMU_ID(x) \
+	((opl_get_physical_board(LSB_ID(x)) * OPL_MAX_COREID_PER_BOARD) + \
+	(CHIP_ID(x) * OPL_MAX_COREID_PER_CMP) + \
+	CORE_ID(x))
 
 /*
  * Max. boards supported in a domain per model.