Support for very old Cell hardware We still have a small number of boards using the first CPU generation and we want to keep running them for a short time. Signed-off-by: Arnd Bergmann --- arch/ppc64/Kconfig | 6 ++++++ arch/ppc64/kernel/head.S | 1 + include/asm-ppc64/mmu.h | 16 ++++++++++++++++ 3 files changed, 23 insertions(+) Index: linux-cg/arch/ppc64/Kconfig =================================================================== --- linux-cg.orig/arch/ppc64/Kconfig +++ linux-cg/arch/ppc64/Kconfig @@ -227,6 +227,12 @@ config BE_DD2 ---help--- This support enables BE DD2.x errata workarounds. +config BE_DD1 + bool "BE DD1.x Errata Workaround Support" + depends on PPC_BPA + ---help--- + This support enables BE DD1.x errata workarounds. + config NR_CPUS int "Maximum number of CPUs (2-128)" range 2 128 Index: linux-cg/arch/ppc64/kernel/head.S =================================================================== --- linux-cg.orig/arch/ppc64/kernel/head.S +++ linux-cg/arch/ppc64/kernel/head.S @@ -201,6 +201,7 @@ exception_marker: #define EX_CCR 60 #define EXCEPTION_PROLOG_PSERIES(area, label) \ + HMT_MEDIUM; /* FIXME: simulator/DD1 hack */ \ mfspr r13,SPRG3; /* get paca address into r13 */ \ std r9,area+EX_R9(r13); /* save r9 - r12 */ \ std r10,area+EX_R10(r13); \ Index: linux-cg/include/asm-ppc64/mmu.h =================================================================== --- linux-cg.orig/include/asm-ppc64/mmu.h +++ linux-cg/include/asm-ppc64/mmu.h @@ -130,9 +130,17 @@ static inline void __tlbie(unsigned long static inline void tlbie(unsigned long va, int large) { +#ifdef CONFIG_BE_DD1 + asm volatile("sync": : :"memory"); +#else asm volatile("ptesync": : :"memory"); +#endif __tlbie(va, large); +#ifdef CONFIG_BE_DD1 + asm volatile("eieio; tlbsync; sync": : :"memory"); +#else asm volatile("eieio; tlbsync; ptesync": : :"memory"); +#endif } static inline void __tlbiel(unsigned long va) @@ -156,9 +164,17 @@ static inline void __tlbiel(unsigned lon static inline void tlbiel(unsigned long va) { +#ifdef CONFIG_BE_DD1 + asm volatile("sync": : :"memory"); +#else asm volatile("ptesync": : :"memory"); +#endif __tlbiel(va); +#ifdef CONFIG_BE_DD1 + asm volatile("sync": : :"memory"); +#else asm volatile("ptesync": : :"memory"); +#endif } static inline unsigned long slot2va(unsigned long hpte_v, unsigned long slot) --