From: "Wohlgemuth, Jason" <jason_wohlgemuth@gilbarco.com>
To: "'Peter Allworth'" <linsol@zeta.org.au>
Cc: "'linuxppc-embedded@lists.linuxppc.org'"
<linuxppc-embedded@lists.linuxppc.org>
Subject: RE: Low Memory / Software Emulation Exception / Performance
Date: Wed, 12 Apr 2000 07:38:29 -0400 [thread overview]
Message-ID: <200004121138.HAA05150@hoover.gilbarco.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
Peter,
Attached is the patch file you requested, this should bring the head.S
distributed in mpc8xx-2.2.13 up-to-date with the dirty page fix.
Thanks,
Jason
[-- Attachment #2: mpc8xx-2.2.13-page-patch --]
[-- Type: application/octet-stream, Size: 2272 bytes --]
--- head.S.orig Mon Apr 10 10:33:28 2000
+++ head.S Tue Apr 11 14:59:54 2000
@@ -1,7 +1,7 @@
/*
* arch/ppc/kernel/head.S
*
- * $Id: head.S,v 1.1.1.1 2000/01/03 15:56:48 jason Exp $
+ * $Id: head.S,v 1.4 2000/04/11 18:59:54 jason Exp $
*
* PowerPC version
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
@@ -901,8 +901,16 @@
ori r21,r21,1 /* Set valid bit */
mtspr MI_TWC, r21 /* Set page attributes */
mtspr MD_TWC, r21 /* Load pte table base address */
- mfspr r21, MD_TWC /* ....and get the pte address */
- lwz r21, 0(r21) /* Get the pte */
+ /* mfspr r21, MD_TWC */ /* ....and get the pte address */
+ /* lwz r21, 0(r21) */ /* Get the pte */
+ mfspr r20, MD_TWC /* ....and get the pte address */
+ lwz r21, 0(r20) /* Get the pte */
+ andi. r21, r21, _PAGE_PRESENT /* Set cr0 if it's invalid */
+ lwz r21, 0(r20) /* Get the pte again */
+ beq 3f /* Skip update if invalid */
+ ori r21, r21, _PAGE_ACCESSED /* Set the accessed flag */
+ stw r21, 0(r20) /* Update the pte */
+3:
/* Set four subpage valid bits (24, 25, 26, and 27).
* Since we currently run MI_CTR.PPCS = 0, the manual says,
@@ -1024,6 +1032,18 @@
ori r21, r21, 1 /* Set valid bit in physical L2 page */
mtspr MD_TWC, r21 /* Load pte table base address */
mfspr r21, MD_TWC /* ....and get the pte address */
+ lwz r20, 0(r21) /* Get the pte */
+ andi. r20, r20, _PAGE_PRESENT /* Set cr0 if it's invalid */
+ beq 4f /* Skip update if invalid */
+ mfspr r20, DSISR /* Check for store op */
+ andis. r20, r20, 0x0200 /* If set, indicates store */
+ lwz r20, 0(r21) /* Get the pte again */
+ beq 3f
+ ori r20, r20, _PAGE_DIRTY|_PAGE_HWWRITE /* Set the dirty flags */
+3:
+ ori r20, r20, _PAGE_ACCESSED /* Set the accessed flag */
+ stw r20, 0(r21) /* Update the pte */
+4:
lwz r21, 0(r21) /* Get the pte */
/* Set four subpage valid bits (24, 25, 26, and 27).
@@ -1113,7 +1133,8 @@
andi. r20, r21, _PAGE_RW /* Is it writeable? */
beq 2f /* Bail out if not */
- ori r21, r21, _PAGE_DIRTY /* Update changed bit */
+ /* ori r21, r21, _PAGE_DIRTY */ /* Update changed bit */
+ ori r21, r21, _PAGE_DIRTY|_PAGE_HWWRITE|_PAGE_ACCESSED
mfspr r20, MD_TWC /* Get pte address again */
stw r21, 0(r20) /* and update pte in table */
next reply other threads:[~2000-04-12 11:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-12 11:38 Wohlgemuth, Jason [this message]
2000-04-12 13:27 ` Low Memory / Software Emulation Exception / Performance Dan Malek
-- strict thread matches above, loose matches on Subject: below --
2000-04-11 18:43 Wohlgemuth, Jason
2000-04-12 0:43 ` Peter Allworth
2000-04-11 17:20 Wohlgemuth, Jason
2000-04-11 13:50 Wohlgemuth, Jason
2000-04-11 16:40 ` Marcus Sundberg
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=200004121138.HAA05150@hoover.gilbarco.com \
--to=jason_wohlgemuth@gilbarco.com \
--cc=linsol@zeta.org.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).