linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dan Malek <dan@mvista.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linuxppc-embedded@lists.linuxppc.org
Subject: Re: Another fix for xmon on non-standard MMU machines
Date: Mon, 10 Sep 2001 20:16:32 -0400	[thread overview]
Message-ID: <3B9D57E0.4881358E@mvista.com> (raw)
In-Reply-To: 20010911091748.M4823@zax


David Gibson wrote:

> ..... Turns out the TLB miss handler
> was broken in that:
>     a) it set the TLB writable bit based only the _PAGE_DIRTY bit, but
> a page can be dirty but still write-protected - in particular this
> happens during the COW of the stack, so the two processes were sharing
> their stack.

What the heck are you looking at????

It sets _PAGE_DIRTY | _PAGE_ACCESSED based upon the setting of
the _PAGE_RW.

If you get a Data Store exception (which would be the case trying
to access a page that is write protected), and the page is not
marked _PAGE_RW, it will call the heavyweight fault handler to
fix this.....which is exactly what happens for copy-on-write.
The _PAGE_DIRTY is an alias to the hardware write protect.  Setting
this bit will allow a write operation.

The purpose of the TLB miss handlers are to simply store the Linux
PTE (or close approximation) into the hardware TLB.  It is up to
the Linux MM to construct this properly, which it appears isn't happening.

These exception handlers worked perfectly in the 2.4.2 timeframe.
Modifications to other areas of the kernel have caused problems, and
we need to find them there, not hack around down at this level where
we want minimal code.

The 603 cores and the 8xx are having similar problems to the 4xx.
There is something more generic that is wrong.


	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-09-11  0:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-10  9:47 Another fix for xmon on non-standard MMU machines David Gibson
     [not found] ` <20010910160600.21153@smtp.adsl.oleane.com>
2001-09-10 23:17   ` David Gibson
2001-09-11  0:16     ` Dan Malek [this message]
2001-09-11  1:04       ` David Gibson

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=3B9D57E0.4881358E@mvista.com \
    --to=dan@mvista.com \
    --cc=benh@kernel.crashing.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /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).