CVS Root: :pserver:anonymous@www.denx.de:/cvsroot CVS Module: linuxppc_2_4_devel PatchSet: 295 Date: 2004/08/25 16:16:30 Log: Implement work-around for CPU15 Silicon Errata on MPC8xx processors. Signed-off-by: Wolfgang Denk Index: arch/ppc/8xx_io/Config.in =================================================================== RCS file: /cvsroot/linuxppc_2_4_devel/arch/ppc/8xx_io/Config.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- arch/ppc/8xx_io/Config.in 11 Mar 2004 22:43:31 -0000 1.8 +++ arch/ppc/8xx_io/Config.in 25 Aug 2004 15:16:30 -0000 1.9 @@ -7,6 +7,7 @@ comment 'Generic MPC8xx Options' bool 'Copy-Back Data Cache (else Writethrough)' CONFIG_8xx_COPYBACK bool 'CPU6 Silicon Errata (860 Pre Rev. C)' CONFIG_8xx_CPU6 +bool 'CPU15 Silicon Errata' CONFIG_8xx_CPU15 bool 'I2C/SPI Microcode Patch' CONFIG_UCODE_PATCH if [ "$CONFIG_UCODE_PATCH" = "y" ]; then bool ' Use MPC850-specific microcode patch' CONFIG_MPC850_UCODE_PATCH Index: arch/ppc/kernel/head_8xx.S =================================================================== RCS file: /cvsroot/linuxppc_2_4_devel/arch/ppc/kernel/head_8xx.S,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- arch/ppc/kernel/head_8xx.S 30 Oct 2003 00:32:14 -0000 1.6 +++ arch/ppc/kernel/head_8xx.S 25 Aug 2004 15:16:30 -0000 1.7 @@ -324,6 +324,19 @@ stw r3, 12(r0) lwz r3, 12(r0) #endif +#ifdef CONFIG_8xx_CPU15 + lis r21, cpu15_fix@h + ori r21, r21, cpu15_fix@l + tophys(r21,r21) + lwz r21, 0(r21) /* value of cpu15 variable */ + cmpwi r21, 0 + beq 4f + subi r21, r20, 0x1000 /* EA of prev page */ + tlbie r21 + addi r21, r20, 0x1000 /* EA of next page */ + tlbie r21 +4: +#endif mtspr MD_EPN, r20 /* Have to use MD_EPN for walk, MI_EPN can't */ mfspr r20, M_TWB /* Get level 1 table entry address */ Index: include/linux/sysctl.h =================================================================== RCS file: /cvsroot/linuxppc_2_4_devel/include/linux/sysctl.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- include/linux/sysctl.h 11 Mar 2004 22:44:32 -0000 1.8 +++ include/linux/sysctl.h 25 Aug 2004 15:16:30 -0000 1.9 @@ -128,6 +128,7 @@ KERN_PPC_L3CR=57, /* l3cr register on PPC */ KERN_EXCEPTION_TRACE=58, /* boolean: exception trace */ KERN_CORE_SETUID=59, /* int: set to allow core dumps of setuid apps */ + KERN_8XX_CPU15=60, /* boolean: patch cpu15 errata on mpc8xx cpu */ }; Index: kernel/sysctl.c =================================================================== RCS file: /cvsroot/linuxppc_2_4_devel/kernel/sysctl.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- kernel/sysctl.c 15 Nov 2003 01:37:12 -0000 1.8 +++ kernel/sysctl.c 25 Aug 2004 15:16:30 -0000 1.9 @@ -150,6 +150,10 @@ static void unregister_proc_table(ctl_table *, struct proc_dir_entry *); #endif +#ifdef CONFIG_8xx_CPU15 +int cpu15_fix = 0; /* disabled by default */ +#endif + /* The default sysctl tables: */ static ctl_table root_table[] = { @@ -273,6 +277,10 @@ {KERN_EXCEPTION_TRACE,"exception-trace", &exception_trace,sizeof(int),0644,NULL,&proc_dointvec}, #endif +#ifdef CONFIG_8xx_CPU15 + {KERN_8XX_CPU15, "8xx_cpu15", &cpu15_fix, sizeof(int), + 0644, NULL, &proc_dointvec}, +#endif {0} };