Subject: Re: kern/36019 (uvm_readahead.c:ra_startio() assumes (MAXPHYS & (MAXPHYS
To: None <gnats-bugs@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 05/10/2007 08:34:16
yamt@NetBSD.org wrote:

> Synopsis: uvm_readahead.c:ra_startio() assumes (MAXPHYS & (MAXPHYS - 1)) == 0
 :
> Responsible-Changed-Why:
> mine.

Is it okay to commit this as temporary workaround (for 4.0)?
---
Index: uvm_readahead.c
===================================================================
RCS file: /cvsroot/src/sys/uvm/uvm_readahead.c,v
retrieving revision 1.3
diff -u -r1.3 uvm_readahead.c
--- uvm_readahead.c	12 Mar 2007 18:18:39 -0000	1.3
+++ uvm_readahead.c	9 May 2007 23:24:23 -0000
@@ -66,6 +66,12 @@
 	off_t ra_next;		/* next offset to read-ahead */
 };
 
+#if defined(sun2) || (defined(sun3) && defined(_SUN3_))
+/* XXX: on sun2 and sun3 (but not sun3x) MAXPHYS is 0xe000 */
+#undef MAXPHYS	
+#define MAXPHYS		0x8000	/* XXX */
+#endif
+
 #define	RA_WINSIZE_INIT	MAXPHYS			/* initial window size */
 #define	RA_WINSIZE_MAX	(MAXPHYS * 8)		/* max window size */
 #define	RA_WINSIZE_SEQENTIAL	RA_WINSIZE_MAX	/* fixed window size used for

---
Izumi Tsutsui