]> err.no Git - linux-2.6/commitdiff
[POWERPC] Add kernel parameter to set l3cr for MPC745x
authorRobert Brose <linuxppcdev@lists.qbjnet.com>
Fri, 28 Mar 2008 20:20:23 +0000 (07:20 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 1 Apr 2008 09:43:09 +0000 (20:43 +1100)
Old-world powermacs don't set L2CR or L3CR on processor upgrade cards.
This simple patch allows the setting of L3CR via a kernel parameter
(like the existing kernel parameter to set L2CR).

Signed-off-by: Robert Brose <bob@qbjnet.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Documentation/kernel-parameters.txt
arch/powerpc/kernel/setup_32.c

index 508e2a2c98644ad6c4ee70e59a33191af9af541e..a1ff28e0872beaa7312748c96007293ae1ae41d7 100644 (file)
@@ -931,6 +931,8 @@ and is between 256 and 4096 characters. It is defined in the file
 
        l2cr=           [PPC]
 
+       l3cr=           [PPC]
+
        lapic           [X86-32,APIC] Enable the local APIC even if BIOS
                        disabled it.
 
index cd870a823d18a89952d4b9d622bb080e3b5ffc5b..eac936eb3190f165d75a5b4bbc36ead6ad7b52a4 100644 (file)
@@ -172,6 +172,18 @@ int __init ppc_setup_l2cr(char *str)
 }
 __setup("l2cr=", ppc_setup_l2cr);
 
+/* Checks "l3cr=xxxx" command-line option */
+int __init ppc_setup_l3cr(char *str)
+{
+       if (cpu_has_feature(CPU_FTR_L3CR)) {
+               unsigned long val = simple_strtoul(str, NULL, 0);
+               printk(KERN_INFO "l3cr set to %lx\n", val);
+               _set_L3CR(val);         /* and enable it */
+       }
+       return 1;
+}
+__setup("l3cr=", ppc_setup_l3cr);
+
 #ifdef CONFIG_GENERIC_NVRAM
 
 /* Generic nvram hooks used by drivers/char/gen_nvram.c */