aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_44x.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-12-18 14:13:51 -0500
committerPaul Mackerras <paulus@samba.org>2008-12-20 22:21:16 -0500
commit64b3d0e8122b422e879b23d42f9e0e8efbbf9744 (patch)
treeb1fab3fc39fd3117d0c050b0a54d6fe09f3a2948 /arch/powerpc/kernel/head_44x.S
parent77520351805cc19ba37394ae33f862ef6d3c2a23 (diff)
powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
Currently, we never set _PAGE_COHERENT in the PTEs, we just OR it in in the hash code based on some CPU feature bit. We also manipulate _PAGE_NO_CACHE and _PAGE_GUARDED by hand in all sorts of places. This changes the logic so that instead, the PTE now contains _PAGE_COHERENT for all normal RAM pages thay have I = 0 on platforms that need it. The hash code clears it if the feature bit is not set. It also adds some clean accessors to setup various valid combinations of access flags and change various bits of code to use them instead. This should help having the PTE actually containing the bit combinations that we really want. I also removed _PAGE_GUARDED from _PAGE_BASE on 44x and instead set it explicitely from the TLB miss. I will ultimately remove it completely as it appears that it might not be needed after all but in the meantime, having it in the TLB miss makes things a lot easier. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/head_44x.S')
-rw-r--r--arch/powerpc/kernel/head_44x.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index f3a1ea9d7fe4..26237357a88c 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -570,6 +570,7 @@ finish_tlb_load:
570 rlwimi r10,r12,29,30,30 /* DIRTY -> SW position */ 570 rlwimi r10,r12,29,30,30 /* DIRTY -> SW position */
571 and r11,r12,r10 /* Mask PTE bits to keep */ 571 and r11,r12,r10 /* Mask PTE bits to keep */
572 andi. r10,r12,_PAGE_USER /* User page ? */ 572 andi. r10,r12,_PAGE_USER /* User page ? */
573 ori r11,r11,_PAGE_GUARDED /* 440 errata, needs G set */
573 beq 1f /* nope, leave U bits empty */ 574 beq 1f /* nope, leave U bits empty */
574 rlwimi r11,r11,3,26,28 /* yes, copy S bits to U */ 575 rlwimi r11,r11,3,26,28 /* yes, copy S bits to U */
5751: tlbwe r11,r13,PPC44x_TLB_ATTRIB /* Write ATTRIB */ 5761: tlbwe r11,r13,PPC44x_TLB_ATTRIB /* Write ATTRIB */