All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] A BTFIXUP'd fix for pte_read()
@ 2005-02-02 20:04 Art Haas
  2005-02-02 21:54 ` Tom 'spot' Callaway
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Art Haas @ 2005-02-02 20:04 UTC (permalink / raw)
  To: sparclinux

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-02-03  9:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-02 20:04 [PATCH] A BTFIXUP'd fix for pte_read() Art Haas
2005-02-02 21:54 ` 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

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.