Skip to contentSkip to conversation

ppc32: Workaround new MPC745x CPU erratas

PATCH New Benjamin Herrenschmidt 1 participant 1 message Aug 2, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc32: Workaround new MPC745x CPU erratas

Hi !

The latest versions of Motorola erratas for the MPC745x CPUs (and 744x) adds a couple of nasty ones for which we really want workarounds in the kernel. One is to disable the BTIC branch target cache on some revs (too bad for performances...) and the other one is to force cacheable memory pages to always be marked as SMP coherent even on UP systems (I didn't measure significant perfs impact with this one).

Please apply,
Ben.

===== arch/ppc/kernel/cpu_setup_6xx.S 1.4 vs edited =====

arch/ppc/kernel/cpu_setup_6xx.S +4 -1
@@ -218,7 +218,10 @@
 
 	/* All of the bits we have to set.....
 	 */
-	ori	r11,r11,HID0_SGE | HID0_FOLD | HID0_BHTE | HID0_BTIC | HID0_LRSTK
+	ori	r11,r11,HID0_SGE | HID0_FOLD | HID0_BHTE | HID0_LRSTK
+BEGIN_FTR_SECTION
+	ori	r11,r11,HID0_BTIC
+END_FTR_SECTION_IFCLR(CPU_FTR_NO_BTIC)
 BEGIN_FTR_SECTION
 	oris	r11,r11,HID0_DPM@h	/* enable dynamic power mgmt */
 END_FTR_SECTION_IFCLR(CPU_FTR_NO_DPM)

===== arch/ppc/kernel/cputable.c 1.23 vs edited =====

arch/ppc/kernel/cputable.c +36 -11

103 lines not on this page · raw message

===== include/asm-ppc/cputable.h 1.8 vs edited =====

include/asm-ppc/cputable.h +1 -0
@@ -76,6 +76,7 @@
 #define CPU_FTR_NO_DPM			0x00008000
 #define CPU_FTR_HAS_HIGH_BATS		0x00010000
 #define CPU_FTR_NEED_COHERENT           0x00020000
+#define CPU_FTR_NO_BTIC			0x00040000
 
 #ifdef __ASSEMBLY__