powerpc/ppc476: Disable BTAC
authorAlistair Popple <alistair@popple.id.au>
Wed, 6 Aug 2014 07:03:09 +0000 (17:03 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 13 Aug 2014 05:13:42 +0000 (15:13 +1000)
This patch disables the branch target address CAM which under specific
circumstances may cause the processor to skip execution of 1-4
instructions. This fixes IBM Erratum #47.

Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/head_44x.S

index c334f53453f708ea64c7d9c1322cc92418a5b687..b5061abbd2e0c1df269f424905f56c5e429167b1 100644 (file)
@@ -1210,10 +1210,12 @@ clear_utlb_entry:
 
        /* We configure icbi to invalidate 128 bytes at a time since the
         * current 32-bit kernel code isn't too happy with icache != dcache
-        * block size
+        * block size. We also disable the BTAC as this can cause errors
+        * in some circumstances (see IBM Erratum 47).
         */
        mfspr   r3,SPRN_CCR0
        oris    r3,r3,0x0020
+       ori     r3,r3,0x0040
        mtspr   SPRN_CCR0,r3
        isync