Thread (35 messages) flat view 35 messages, 3 authors, 2009-10-14

Re: [PATCH 2/8] 8xx: Update TLB asm so it behaves as linux mm expects.

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2009-10-11 21:25:18

On Sun, 2009-10-11 at 18:35 +0200, Joakim Tjernlund wrote:
quoted hunk ↗ jump to hunk
@@ -522,26 +539,12 @@ DataTLBError:
I still think you should remove everything from DataTLBError, it's
just plain useless :-)

Ben.
        mfspr   r11, SPRN_MD_TWC                /* ....and get the pte
address */
        lwz     r10, 0(r11)             /* Get the pte */
 
-       andi.   r11, r10, _PAGE_RW      /* Is it writeable? */
-       beq     2f                      /* Bail out if not */
-
-       /* Update 'changed', among others.
-       */
-#ifdef CONFIG_SWAP
-       ori     r10, r10, _PAGE_DIRTY|_PAGE_HWWRITE
-       /* do not set the _PAGE_ACCESSED bit of a non-present page */
-       andi.   r11, r10, _PAGE_PRESENT
-       beq     4f
-       ori     r10, r10, _PAGE_ACCESSED
-4:
-#else
-       ori     r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE
-#endif
-       mfspr   r11, SPRN_MD_TWC                /* Get pte address
again */
+       ori     r10, r10, _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_HWWRITE
        stw     r10, 0(r11)             /* and update pte in table */
+       xori    r10, r10, _PAGE_RW      /* RW bit is inverted */
 
        /* The Linux PTE won't go exactly into the MMU TLB.
-        * Software indicator bits 21, 22 and 28 must be clear.
+        * Software indicator bits 22 and 28 must be clear.
         * Software indicator bits 24, 25, 26, and 27 must be
         * set.  All other Linux PTE bits control the behavior
         * of the MMU.
-- 
1.6.4.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help