linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: Scott Wood <scottwood@freescale.com>,
	"linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
	Rex Feany <RFeany@mrv.com>
Subject: Re: [PATCH 3/6] 8xx: get rid of _PAGE_HWWRITE dependency in MMU.
Date: Tue, 06 Oct 2009 10:15:39 +1100	[thread overview]
Message-ID: <1254784539.7122.52.camel@pasglop> (raw)
In-Reply-To: <OF346FF2E6.3CCDA0FA-ONC1257646.007C13A0-C1257646.007DF396@transmode.se>

On Tue, 2009-10-06 at 00:55 +0200, Joakim Tjernlund wrote:
> > Sure but if dirty is cleared by the kernel, then you also need to
> remove
> > write permission in the TLB or it will miss setting dirty on the
> next
> > 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.

> > !(PRESENT _AND_ ACCESSED) -> no access permitted.
> 
> Yes, how about those pinned kernel ptes. Do they have ACCESSED from
> start?

They should.

Cheers,
Ben.

  reply	other threads:[~2009-10-05 23:15 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-05 12:16 [PATCH 0/6] PowerPc 8xx TLB/MMU fixes Joakim Tjernlund
2009-10-05 12:16 ` [PATCH 1/6] 8xx: DTLB Error must check for more errors Joakim Tjernlund
2009-10-05 12:16   ` [PATCH 2/6] 8xx, fault: Add some debug code to do_page_fault() Joakim Tjernlund
2009-10-05 12:16     ` [PATCH 3/6] 8xx: get rid of _PAGE_HWWRITE dependency in MMU Joakim Tjernlund
2009-10-05 12:16       ` [PATCH 4/6] 8xx: Tag DAR with 0x00f0 to catch buggy instructions Joakim Tjernlund
2009-10-05 12:16         ` [PATCH 5/6] 8xx: Fixup DAR from buggy dcbX instructions Joakim Tjernlund
2009-10-05 12:16           ` [PATCH 6/6] 8xx: start using dcbX instructions in various copy routines Joakim Tjernlund
2009-10-05 20:17       ` [PATCH 3/6] 8xx: get rid of _PAGE_HWWRITE dependency in MMU Benjamin Herrenschmidt
2009-10-05 21:25         ` Joakim Tjernlund
2009-10-05 21:37           ` Benjamin Herrenschmidt
2009-10-05 22:00             ` Joakim Tjernlund
2009-10-05 22:09               ` Benjamin Herrenschmidt
2009-10-05 22:55                 ` Joakim Tjernlund
2009-10-05 23:15                   ` Benjamin Herrenschmidt [this message]
2009-10-05 23:35                     ` Joakim Tjernlund
2009-10-06  0:34                       ` Benjamin Herrenschmidt
2009-10-06  6:15                         ` Joakim Tjernlund
2009-10-06  6:45                           ` Benjamin Herrenschmidt
2009-10-06  7:54                             ` Joakim Tjernlund
2009-10-06 15:40                             ` Joakim Tjernlund
2009-10-06 17:28                               ` Joakim Tjernlund
2009-10-06 22:05                         ` Joakim Tjernlund
2009-10-06 23:25                           ` Benjamin Herrenschmidt
2009-10-07  1:07                           ` Benjamin Herrenschmidt
2009-10-07  7:47                             ` Joakim Tjernlund
2009-10-05 18:12 ` [PATCH 0/6] PowerPc 8xx TLB/MMU fixes Scott Wood
2009-10-05 18:27   ` Joakim Tjernlund
2009-10-05 20:09     ` Scott Wood
2009-10-05 21:04       ` Joakim Tjernlund
2009-10-05 21:31         ` Benjamin Herrenschmidt
2009-10-05 21:41           ` Joakim Tjernlund
2009-10-05 21:46             ` Scott Wood
2009-10-05 21:31         ` Scott Wood
2009-10-05 22:04 ` Rex Feany
2009-10-05 22:31   ` Joakim Tjernlund
2009-10-05 22:37     ` Benjamin Herrenschmidt
2009-10-05 22:58       ` Joakim Tjernlund
2009-10-05 23:49       ` Joakim Tjernlund
2009-10-06  1:52         ` Benjamin Herrenschmidt
2009-10-06  8:06           ` Joakim Tjernlund
2009-10-06  8:32             ` Benjamin Herrenschmidt
2009-10-06 10:58               ` Joakim Tjernlund
2009-10-06 11:06                 ` Benjamin Herrenschmidt
2009-10-06 11:39                   ` Joakim Tjernlund
2009-10-06 13:18                   ` Joakim Tjernlund
2009-10-05 22:42     ` Rex Feany
2009-10-05 23:00       ` Joakim Tjernlund
2009-10-06  6:25       ` Joakim Tjernlund
2009-10-06  6:44         ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1254784539.7122.52.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=RFeany@mrv.com \
    --cc=joakim.tjernlund@transmode.se \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).