Thread (49 messages) flat view 49 messages, 4 authors, 2009-10-07

Re: [PATCH 3/6] 8xx: get rid of _PAGE_HWWRITE dependency in MMU.

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2009-10-05 23:15:49

On Tue, 2009-10-06 at 00:55 +0200, Joakim Tjernlund wrote:
quoted
Sure but if dirty is cleared by the kernel, then you also need to
remove
quoted
write permission in the TLB or it will miss setting dirty on the
next
quoted
store to the page.
Dirty map to HW changed bit so if kernel clears it, the next
store will trap to DTLB error. There I will check RW and clear it
again
without trapping to C. Is that OK? Not if I read you correcly below ..
Well, if the HW has the ability to enforce trap when store with !DIRTY,
then that's fine, just map it that way, but you shouldn't have to handle
it in the DTLB error neither, the kernel will fix it up for you in
handle_pte_fault().

I think I need to get myself an 8xx manual and figure out what that damn
MMU actually does :-)
No it's really !(RW _AND_ DIRTY) -> no store permitted, and

..  hmm, I don't do that. I should do a
    if ( store && !(pte & (RW | DIRTY))
       goto DSI
 in DTLB error?
Well, if the HW does the test of DIRTY, then it's fine, as you seem to
suggest above. _something_ needs to do it, either SW or HW, ie, we need
to catch any attempt to store to a non-dirty page to set dirty.
quoted
!(PRESENT _AND_ ACCESSED) -> no access permitted.
Yes, how about those pinned kernel ptes. Do they have ACCESSED from
start?
They should.

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help