From: "Art Haas" <ahaas@airmail.net>
To: sparclinux@vger.kernel.org
Subject: [PATCH] A BTFIXUP'd fix for pte_read()
Date: Wed, 02 Feb 2005 20:04:09 +0000 [thread overview]
Message-ID: <20050202200409.GA30839@artsapartment.org> (raw)
Hi.
Here's my attempt at taking Bob Breuer's patch and adding in some of the
BTFIXUP magic that sparc32 needs. I'm running the current BK kernel with
this patch on my SS20, and things seem to work. The current kernel
complains during bootup and shutdown about accessing the system clock,
a problem I am guessing is related to changes elsewhere in the kernel.
Art Haas
=== arch/sparc/mm/srmmu.c 1.49 vs edited ==--- 1.49/arch/sparc/mm/srmmu.c 2005-01-20 23:02:11 -06:00
+++ edited/arch/sparc/mm/srmmu.c 2005-02-02 09:39:49 -06:00
@@ -2197,6 +2197,7 @@
BTFIXUPSET_CALL(free_pgd_fast, srmmu_free_pgd_fast, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(get_pgd_fast, srmmu_get_pgd_fast, BTFIXUPCALL_NORM);
+ BTFIXUPSET_HALF(pte_readi, SRMMU_NOREAD);
BTFIXUPSET_HALF(pte_writei, SRMMU_WRITE);
BTFIXUPSET_HALF(pte_dirtyi, SRMMU_DIRTY);
BTFIXUPSET_HALF(pte_youngi, SRMMU_REF);
=== include/asm-sparc/pgtable.h 1.24 vs edited ==--- 1.24/include/asm-sparc/pgtable.h 2004-12-22 03:36:07 -06:00
+++ edited/include/asm-sparc/pgtable.h 2005-02-02 09:51:07 -06:00
@@ -186,9 +186,16 @@
* The following only work if pte_present() is true.
* Undefined behaviour if not..
*/
+BTFIXUPDEF_HALF(pte_readi)
BTFIXUPDEF_HALF(pte_writei)
BTFIXUPDEF_HALF(pte_dirtyi)
BTFIXUPDEF_HALF(pte_youngi)
+
+extern int pte_read(pte_t pte) __attribute_const__;
+extern __inline__ int pte_read(pte_t pte)
+{
+ return !(pte_val(pte) & BTFIXUP_HALF(pte_readi));
+}
extern int pte_write(pte_t pte) __attribute_const__;
extern __inline__ int pte_write(pte_t pte)
=== include/asm-sparc/pgtsrmmu.h 1.12 vs edited ==--- 1.12/include/asm-sparc/pgtsrmmu.h 2004-07-12 01:53:22 -05:00
+++ edited/include/asm-sparc/pgtsrmmu.h 2005-02-01 10:45:31 -06:00
@@ -73,6 +73,7 @@
#define SRMMU_CACHE 0x80
#define SRMMU_DIRTY 0x40
#define SRMMU_REF 0x20
+#define SRMMU_NOREAD 0x10
#define SRMMU_EXEC 0x08
#define SRMMU_WRITE 0x04
#define SRMMU_VALID 0x02 /* SRMMU_ET_PTE */
--
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.
-Thomas Jefferson to James Smith, 1822
next reply other threads:[~2005-02-02 20:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-02 20:04 Art Haas [this message]
2005-02-02 21:54 ` [PATCH] A BTFIXUP'd fix for pte_read() Tom 'spot' Callaway
2005-02-02 22:40 ` William Lee Irwin III
2005-02-02 23:32 ` David S. Miller
2005-02-03 0:52 ` David S. Miller
2005-02-03 0:55 ` William Lee Irwin III
2005-02-03 4:22 ` Tom 'spot' Callaway
2005-02-03 6:27 ` David S. Miller
2005-02-03 9:13 ` William Lee Irwin III
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=20050202200409.GA30839@artsapartment.org \
--to=ahaas@airmail.net \
--cc=sparclinux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.