Tiny fix to Carolina l2 reporting

From: Leigh Brown <hidden>
Date: 2002-10-07 21:52:03

Hi,

This one's Hollis's.  I think someone reported that this fixes it.  It
definitely looks better.

Cheers,

Leigh.

--- linuxppc_2_4_devel/arch/ppc/platforms/prep_setup.c	Thu May 30 13:31:24 2002
+++ linuxppc_2_4_devel-local/arch/ppc/platforms/prep_setup.c	Tue Jun 11 14:47:25 2002
@@ -340,12 +340,17 @@
 		unsigned int l2_reg = inb(PREP_IBM_L2INFO);

 		/* L2 size */
-		if ((l2_reg & 0x60) == 0)
-			seq_printf(m, "256KiB");
-		else if ((l2_reg & 0x60) == 1)
-			seq_printf(m, "512KiB");
-		else
-			seq_printf(m, "unknown size");
+		switch ((l2_reg & 0x60) >> 5) {
+			case 0:
+				seq_printf(m, "256KiB");
+				break;
+			case 1:
+				seq_printf(m, "512KiB");
+				break;
+			default:
+				seq_printf(m, "unknown size");
+				break;
+		}

 		/* L2 type */
 		if ((l2_reg & 0x3) == 0)

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help