Add temporary workaround for PR kern/36019 (panic on sun2 and sun3).

Ok'ed by yamt.
This commit is contained in:
tsutsui 2007-05-11 12:11:09 +00:00
parent a2b224da1f
commit 31c6ef6761
1 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_readahead.c,v 1.3 2007/03/12 18:18:39 ad Exp $ */
/* $NetBSD: uvm_readahead.c,v 1.4 2007/05/11 12:11:09 tsutsui Exp $ */
/*-
* Copyright (c)2003, 2005 YAMAMOTO Takashi,
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_readahead.c,v 1.3 2007/03/12 18:18:39 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_readahead.c,v 1.4 2007/05/11 12:11:09 tsutsui Exp $");
#include <sys/param.h>
#include <sys/pool.h>
@ -66,6 +66,12 @@ struct uvm_ractx {
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