--- linux-pmac-stable-orig/arch/ppc/kernel/setup.c Mon Jul 17 21:30:43 2000 +++ linux/arch/ppc/kernel/setup.c Mon Jul 17 23:13:58 2000 @@ -549,15 +549,19 @@ return 0; } -/* Checks "l2cr=xxxx" command-line option */ +/* Takes care of "l2cr=xxxx" command-line option */ void ppc_setup_l2cr(char *str, int *ints) { if ( ((_get_PVR() >> 16) == 8) || ((_get_PVR() >> 16) == 12) ) + /* Make sure cpu is G3 or G4 */ { unsigned long val = simple_strtoul(str, NULL, 0); printk(KERN_INFO "l2cr set to %lx\n", val); - _set_L2CR(0); - _set_L2CR(val); + val |= 0x00200000; /* perform global invalidate */ + _set_L2CR(0); /* disable cache */ + _set_L2CR(val); /* enable it */ + } else { + printk(KERN_INFO "l2cr: cpu is not suitable\n"); } } --- linux-pmac-stable-orig/init/main.c Mon Jul 17 21:31:00 2000 +++ linux/init/main.c Mon Jul 17 21:04:15 2000 @@ -355,6 +355,9 @@ #ifdef CONFIG_ADBMOUSE extern void adb_mouse_setup(char *str, int *ints); #endif +#ifdef CONFIG_PPC +extern void ppc_setup_l2cr(char *str, int *ints); +#endif #ifdef CONFIG_WDT extern void wdt_setup(char *str, int *ints); #endif @@ -1044,6 +1047,9 @@ #endif #ifdef CONFIG_ADBMOUSE { "adb_buttons=", adb_mouse_setup }, +#endif +#ifdef CONFIG_PPC + { "l2cr=", ppc_setup_l2cr }, #endif #ifdef CONFIG_LTPC { "ltpc=", ltpc_setup },