Skip to content

Commit 5f35649

Browse files
chleroympe
authored andcommitted
powerpc/8xx: remove unused _PAGE_WRITETHRU
_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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent cd99ddb commit 5f35649

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

arch/powerpc/include/asm/nohash/32/pte-8xx.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
#define _PAGE_GUARDED 0x0010 /* Copied to L1 G entry in DTLB */
4242
#define _PAGE_USER 0x0020 /* Copied to L1 APG lsb */
4343
#define _PAGE_EXEC 0x0040 /* Copied to L1 APG */
44-
#define _PAGE_WRITETHRU 0x0080 /* software: caching is write through */
45-
#define _PAGE_ACCESSED 0x0800 /* software: page referenced */
44+
#define _PAGE_ACCESSED 0x0080 /* software: page referenced */
4645

4746
#define _PAGE_RO 0x0600 /* Supervisor RO, User no access */
4847

arch/powerpc/include/asm/nohash/pgtable.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,10 @@ extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long addre
235235
#define pgprot_cached(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
236236
_PAGE_COHERENT))
237237

238+
#if _PAGE_WRITETHRU != 0
238239
#define pgprot_cached_wthru(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
239240
_PAGE_COHERENT | _PAGE_WRITETHRU))
241+
#endif
240242

241243
#define pgprot_cached_noncoherent(prot) \
242244
(__pgprot(pgprot_val(prot) & ~_PAGE_CACHE_CTL))

arch/powerpc/kernel/head_8xx.S

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -486,10 +486,6 @@ _ENTRY(DTLBMiss_jmp)
486486
* above.
487487
*/
488488
rlwimi r11, r10, 0, 26, 27
489-
/* Insert the WriteThru flag into the TWC from the Linux PTE.
490-
* It is bit 25 in the Linux PTE and bit 30 in the TWC
491-
*/
492-
rlwimi r11, r10, 32-5, 30, 30
493489
mtspr SPRN_MD_TWC, r11
494490

495491
/* In 4k pages mode, SPS (bit 28) in RPN must match PS[1] (bit 29)
@@ -523,7 +519,6 @@ _ENTRY(DTLBMiss_jmp)
523519
#else
524520
rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */
525521
#endif
526-
rlwimi r10, r11, 0, 20, 20 /* clear 20 */
527522
mtspr SPRN_MD_RPN, r10 /* Update TLB entry */
528523

529524
/* Restore registers */

0 commit comments

Comments
 (0)