]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc/8xx: remove unused _PAGE_WRITETHRU
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 12 Jan 2018 12:45:25 +0000 (13:45 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 16 Jan 2018 12:47:13 +0000 (23:47 +1100)
_PAGE_WRITETHRU is only used in:
* AMIGA_Z2RAM block driver which is never activated on powerPC
* Video/FB driver which is for PPC_PMAC

Therefore, no need to spend time in 8xx TLB miss handlers for
handling it.

And by removing it, we free up bit 20 which then avoids having
to clear it on each TLB miss.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/nohash/32/pte-8xx.h
arch/powerpc/include/asm/nohash/pgtable.h
arch/powerpc/kernel/head_8xx.S

index 6dc0180fd5c7d227b9165fa96216e12d48c66a2d..19a5ecaef265b4cd459ba983aff04e2665110b54 100644 (file)
@@ -41,8 +41,7 @@
 #define _PAGE_GUARDED  0x0010  /* Copied to L1 G entry in DTLB */
 #define _PAGE_USER     0x0020  /* Copied to L1 APG lsb */
 #define _PAGE_EXEC     0x0040  /* Copied to L1 APG */
-#define _PAGE_WRITETHRU        0x0080  /* software: caching is write through */
-#define _PAGE_ACCESSED 0x0800  /* software: page referenced */
+#define _PAGE_ACCESSED 0x0080  /* software: page referenced */
 
 #define _PAGE_RO       0x0600  /* Supervisor RO, User no access */
 
index fc4376c8d4446a6231bbd92e5a366daccc378528..e0864e683cf9fee00ec6bb2525622d746abdb63f 100644 (file)
@@ -235,8 +235,10 @@ extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long addre
 #define pgprot_cached(prot)       (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
                                            _PAGE_COHERENT))
 
+#if _PAGE_WRITETHRU != 0
 #define pgprot_cached_wthru(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
                                            _PAGE_COHERENT | _PAGE_WRITETHRU))
+#endif
 
 #define pgprot_cached_noncoherent(prot) \
                (__pgprot(pgprot_val(prot) & ~_PAGE_CACHE_CTL))
index 641c9a9d4db2d11e6f95d2f8c8fc6b85a9078b16..6399dcadf51d2bc3dbd3664de0f1c65fe5c439bf 100644 (file)
@@ -486,10 +486,6 @@ _ENTRY(DTLBMiss_jmp)
         * above.
         */
        rlwimi  r11, r10, 0, 26, 27
-       /* Insert the WriteThru flag into the TWC from the Linux PTE.
-        * It is bit 25 in the Linux PTE and bit 30 in the TWC
-        */
-       rlwimi  r11, r10, 32-5, 30, 30
        mtspr   SPRN_MD_TWC, r11
 
        /* In 4k pages mode, SPS (bit 28) in RPN must match PS[1] (bit 29)
@@ -523,7 +519,6 @@ _ENTRY(DTLBMiss_jmp)
 #else
        rlwimi  r10, r11, 0, 24, 28     /* Set 24-27, clear 28 */
 #endif
-       rlwimi  r10, r11, 0, 20, 20     /* clear 20 */
        mtspr   SPRN_MD_RPN, r10        /* Update TLB entry */
 
        /* Restore registers */