CVS commit: src/sys/arch/sun3/include

2020-01-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jan 18 20:47:15 UTC 2020

Modified Files:
src/sys/arch/sun3/include: pmap.h pmap3.h pmap3x.h

Log Message:
Fix "modload nfsserver" failure on sun3.  PR/54869

sun3 port has two definitions for different pmaps for sun3 (pmap3.h)
and sun3x (pmap3x.h) and they are selected by _SUN3_ or _SUN3X_ macro,
but neither of them is defined on module builds so common exported
definitions required by module(7) should be in a common header,
i.e. pmap.h.

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sun3/include/pmap.h
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/sun3/include/pmap3.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sun3/include/pmap3x.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sun3/include/pmap.h
diff -u src/sys/arch/sun3/include/pmap.h:1.32 src/sys/arch/sun3/include/pmap.h:1.33
--- src/sys/arch/sun3/include/pmap.h:1.32	Fri Dec 11 18:31:27 2009
+++ src/sys/arch/sun3/include/pmap.h	Sat Jan 18 20:47:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.32 2009/12/11 18:31:27 tsutsui Exp $	*/
+/*	$NetBSD: pmap.h,v 1.33 2020/01/18 20:47:15 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,6 +37,12 @@
 #endif	/* SUN3X */
 
 #ifdef _KERNEL
+/*
+ * Some pmap(9) API macros should be defined here for module(7)
+ * because they are common between sun3 and sun3x. (see PR/54869)
+ */
+#define	pmap_update(pmap)		/* nothing (yet) */
+
 void pmap_procwr(struct proc *, vaddr_t, size_t);
 #endif
 

Index: src/sys/arch/sun3/include/pmap3.h
diff -u src/sys/arch/sun3/include/pmap3.h:1.49 src/sys/arch/sun3/include/pmap3.h:1.50
--- src/sys/arch/sun3/include/pmap3.h:1.49	Mon Jan  7 16:58:09 2013
+++ src/sys/arch/sun3/include/pmap3.h	Sat Jan 18 20:47:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap3.h,v 1.49 2013/01/07 16:58:09 chs Exp $	*/
+/*	$NetBSD: pmap3.h,v 1.50 2020/01/18 20:47:15 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -64,8 +64,6 @@ extern segsz_t pmap_wired_pages(pmap_t);
 /* We use the PA plus some low bits for device mmap. */
 #define pmap_phys_address(addr) 	(addr)
 
-#define	pmap_update(pmap)		/* nothing (yet) */
-
 /* Map a given physical region to a virtual region */
 extern vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int);
 

Index: src/sys/arch/sun3/include/pmap3x.h
diff -u src/sys/arch/sun3/include/pmap3x.h:1.29 src/sys/arch/sun3/include/pmap3x.h:1.30
--- src/sys/arch/sun3/include/pmap3x.h:1.29	Fri Jun  3 17:03:52 2011
+++ src/sys/arch/sun3/include/pmap3x.h	Sat Jan 18 20:47:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap3x.h,v 1.29 2011/06/03 17:03:52 tsutsui Exp $	*/
+/*	$NetBSD: pmap3x.h,v 1.30 2020/01/18 20:47:15 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -53,8 +53,6 @@ segsz_t pmap_count(pmap_t, int);
 /* We use the PA plus some low bits for device mmap. */
 #define pmap_phys_address(addr) 	(addr)
 
-#define	pmap_update(pmap)		/* nothing (yet) */
-
 /* Map a given physical region to a virtual region */
 vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int);
 



CVS commit: src/sys/arch/sun3/include

2012-10-27 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Oct 28 00:25:59 UTC 2012

Modified Files:
src/sys/arch/sun3/include: types.h

Log Message:
no need to define __BROKEN_CONFIG_UNIT_USAGE, the code that this enabled
has been gone for years.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sun3/include/types.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sun3/include/types.h
diff -u src/sys/arch/sun3/include/types.h:1.18 src/sys/arch/sun3/include/types.h:1.19
--- src/sys/arch/sun3/include/types.h:1.18	Sun Jun 12 03:35:48 2011
+++ src/sys/arch/sun3/include/types.h	Sun Oct 28 00:25:59 2012
@@ -1,8 +1,7 @@
-/*	$NetBSD: types.h,v 1.18 2011/06/12 03:35:48 rmind Exp $	*/
+/*	$NetBSD: types.h,v 1.19 2012/10/28 00:25:59 chs Exp $	*/
 
 #include m68k/types.h
 
-#define	__BROKEN_CONFIG_UNIT_USAGE
 #define	__HAVE_MM_MD_KERNACC
 #define	__HAVE_MM_MD_DIRECT_MAPPED_PHYS
 #define	__HAVE_MM_MD_MMAP



CVS commit: src/sys/arch/sun3/include

2012-08-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Aug 12 20:00:07 UTC 2012

Modified Files:
src/sys/arch/sun3/include: param3.h

Log Message:
Also reduce UBC_NWINS from default 1024 to 512
to avoid possible KVA shortage, otherwise
panic: ubc_init: failed to map ubc_object
could still happen on netbsd-6 branch.

Should be pulled up to netbsd-6.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/sun3/include/param3.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sun3/include/param3.h
diff -u src/sys/arch/sun3/include/param3.h:1.55 src/sys/arch/sun3/include/param3.h:1.56
--- src/sys/arch/sun3/include/param3.h:1.55	Sat Aug 11 14:35:33 2012
+++ src/sys/arch/sun3/include/param3.h	Sun Aug 12 20:00:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: param3.h,v 1.55 2012/08/11 14:35:33 tsutsui Exp $	*/
+/*	$NetBSD: param3.h,v 1.56 2012/08/12 20:00:06 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -51,3 +51,6 @@
  */
 #define	NKMEMPAGES_MIN_DEFAULT	((8 * 1024 * 1024)  PAGE_SHIFT)
 #define	NKMEMPAGES_MAX_DEFAULT	((16 * 1024 * 1024)  PAGE_SHIFT)
+
+/* Use smaller UBC_NWINS to avoid KVA space shortage. */
+#define	UBC_NWINS	512



CVS commit: src/sys/arch/sun3/include

2012-08-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Aug 11 14:35:33 UTC 2012

Modified Files:
src/sys/arch/sun3/include: param.h param3.h param3x.h

Log Message:
Poor sun3 (but not sun3x) has only 31MB KVM address space,
so reduce NKMEMPAGES_MAX_DEFAULT from 64MB to 16MB.
Fixes panic: ubc_init: failed to map ubc_object on
TME emulating 3/120 with 16MB RAM.

Should be pulled up to netbsd-6.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/sun3/include/param.h
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/sun3/include/param3.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sun3/include/param3x.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sun3/include/param.h
diff -u src/sys/arch/sun3/include/param.h:1.60 src/sys/arch/sun3/include/param.h:1.61
--- src/sys/arch/sun3/include/param.h:1.60	Fri Feb 10 17:35:47 2012
+++ src/sys/arch/sun3/include/param.h	Sat Aug 11 14:35:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.60 2012/02/10 17:35:47 para Exp $	*/
+/*	$NetBSD: param.h,v 1.61 2012/08/11 14:35:33 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -75,13 +75,6 @@
 
 #include m68k/param.h
 
-/*
- * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
- * logical pages.
- */
-#define	NKMEMPAGES_MIN_DEFAULT	((8 * 1024 * 1024)  PAGE_SHIFT)
-#define	NKMEMPAGES_MAX_DEFAULT	((64 * 1024 * 1024)  PAGE_SHIFT)
-
 #if defined(_KERNEL)  !defined(_LOCORE)
 
 #include machine/intr.h

Index: src/sys/arch/sun3/include/param3.h
diff -u src/sys/arch/sun3/include/param3.h:1.54 src/sys/arch/sun3/include/param3.h:1.55
--- src/sys/arch/sun3/include/param3.h:1.54	Tue Feb  8 20:20:25 2011
+++ src/sys/arch/sun3/include/param3.h	Sat Aug 11 14:35:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: param3.h,v 1.54 2011/02/08 20:20:25 rmind Exp $	*/
+/*	$NetBSD: param3.h,v 1.55 2012/08/11 14:35:33 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -43,3 +43,11 @@
 
 #define	KERNBASE3	0x0E00	/* start of kernel virtual */
 #define	KERN_END3	0x0FE0	/* end of kernel virtual */
+
+/*
+ * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
+ * logical pages.
+ * Note maximum value can't be so large due to limited KVA space as above.
+ */
+#define	NKMEMPAGES_MIN_DEFAULT	((8 * 1024 * 1024)  PAGE_SHIFT)
+#define	NKMEMPAGES_MAX_DEFAULT	((16 * 1024 * 1024)  PAGE_SHIFT)

Index: src/sys/arch/sun3/include/param3x.h
diff -u src/sys/arch/sun3/include/param3x.h:1.17 src/sys/arch/sun3/include/param3x.h:1.18
--- src/sys/arch/sun3/include/param3x.h:1.17	Tue Feb  8 20:20:25 2011
+++ src/sys/arch/sun3/include/param3x.h	Sat Aug 11 14:35:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: param3x.h,v 1.17 2011/02/08 20:20:25 rmind Exp $	*/
+/*	$NetBSD: param3x.h,v 1.18 2012/08/11 14:35:33 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -43,3 +43,10 @@
 
 #define	KERNBASE3X	0xF800	/* start of kernel virtual */
 #define	KERN_END3X	0xFE00	/* end of kernel virtual */
+
+/*
+ * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
+ * logical pages.
+ */
+#define	NKMEMPAGES_MIN_DEFAULT	((8 * 1024 * 1024)  PAGE_SHIFT)
+#define	NKMEMPAGES_MAX_DEFAULT	((64 * 1024 * 1024)  PAGE_SHIFT)



CVS commit: src/sys/arch/sun3/include

2010-04-30 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Apr 30 13:48:55 UTC 2010

Modified Files:
src/sys/arch/sun3/include: vmparam.h vmparam3.h vmparam3x.h

Log Message:
Raise the blade, make the change, don't quite rearrange to where
it's sane.  But improves the non-monolithic kernel case anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sun3/include/vmparam.h
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sun3/include/vmparam3.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sun3/include/vmparam3x.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sun3/include/vmparam.h
diff -u src/sys/arch/sun3/include/vmparam.h:1.33 src/sys/arch/sun3/include/vmparam.h:1.34
--- src/sys/arch/sun3/include/vmparam.h:1.33	Mon Apr 28 20:23:38 2008
+++ src/sys/arch/sun3/include/vmparam.h	Fri Apr 30 13:48:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.33 2008/04/28 20:23:38 martin Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.34 2010/04/30 13:48:55 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,20 +37,24 @@
 #define	PAGE_SIZE	(1  PAGE_SHIFT)
 #define	PAGE_MASK	(PAGE_SIZE - 1)
 
+#define	USRSTACK	KERNBASE
+
 #ifdef	_SUN3_
 #include machine/vmparam3.h
 #endif	/* SUN3 */
 #ifdef	_SUN3X_
 #include machine/vmparam3x.h
 #endif	/* SUN3X */
-#ifdef	_LKM
-#define	USRSTACK KERNBASE
-/* Be conservative. If an LKM is gonna be built for sun3x, define this first */
-#ifndef MAXDSIZ
-#define MAXDSIZ (32*1024*1024)  /* max data size */
+
+/* default for modules etc. */
+#if !defined(_SUN3_)  !defined(_SUN3X_)
+#include machine/vmparam3.h
+#endif
+
+/* XXX: this makes modules *compile* */
+#ifdef _MODULE
+extern char KERNBASE[];
 #endif
-extern	char KERNBASE[];
-#endif	/* _LKM */
 
 /* This is needed by some LKMs. */
 #define VM_PHYSSEG_MAX		4

Index: src/sys/arch/sun3/include/vmparam3.h
diff -u src/sys/arch/sun3/include/vmparam3.h:1.35 src/sys/arch/sun3/include/vmparam3.h:1.36
--- src/sys/arch/sun3/include/vmparam3.h:1.35	Fri Mar  6 20:31:53 2009
+++ src/sys/arch/sun3/include/vmparam3.h	Fri Apr 30 13:48:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam3.h,v 1.35 2009/03/06 20:31:53 joerg Exp $	*/
+/*	$NetBSD: vmparam3.h,v 1.36 2010/04/30 13:48:55 pooka Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -92,11 +92,6 @@
  */
 
 /*
- * USRSTACK is the top (end) of the user stack.
- */
-#define	USRSTACK	KERNBASE	/* High end of user stack */
-
-/*
  * Virtual memory related constants, all in bytes.
  * The Sun3 has only 224 MB of user-virtual space,
  * so we need to be conservative with these limits.

Index: src/sys/arch/sun3/include/vmparam3x.h
diff -u src/sys/arch/sun3/include/vmparam3x.h:1.19 src/sys/arch/sun3/include/vmparam3x.h:1.20
--- src/sys/arch/sun3/include/vmparam3x.h:1.19	Fri Mar  6 20:31:53 2009
+++ src/sys/arch/sun3/include/vmparam3x.h	Fri Apr 30 13:48:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam3x.h,v 1.19 2009/03/06 20:31:53 joerg Exp $	*/
+/*	$NetBSD: vmparam3x.h,v 1.20 2010/04/30 13:48:55 pooka Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -81,11 +81,6 @@
  */
 
 /*
- * USRSTACK is the top (end) of the user stack.
- */
-#define	USRSTACK	KERNBASE	/* High end of user stack */
-
-/*
  * Virtual memory related constants, all in bytes
  */
 #ifndef MAXTSIZ



CVS commit: src/sys/arch/sun3/include

2009-12-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 11 18:40:08 UTC 2009

Modified Files:
src/sys/arch/sun3/include: pmap3.h pmap3x.h

Log Message:
Export NBSG for bootloaders. MMU is enabled even on PROM on sun68k machines.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sun3/include/pmap3.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sun3/include/pmap3x.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sun3/include/pmap3.h
diff -u src/sys/arch/sun3/include/pmap3.h:1.46 src/sys/arch/sun3/include/pmap3.h:1.47
--- src/sys/arch/sun3/include/pmap3.h:1.46	Fri Dec 11 13:52:57 2009
+++ src/sys/arch/sun3/include/pmap3.h	Fri Dec 11 18:40:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap3.h,v 1.46 2009/12/11 13:52:57 tsutsui Exp $	*/
+/*	$NetBSD: pmap3.h,v 1.47 2009/12/11 18:40:08 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -95,6 +95,8 @@
 #define	PMAP_NC		0x10	/* tells pmap_enter to set PG_NC */
 #define	PMAP_SPEC	0x1C	/* mask to get all above. */
 
+#endif	/* _KERNEL */
+
 /* MMU specific segment size */
 #define	SEGSHIFT	17	/* LOG2(NBSG) */
 #define	NBSG		(1  SEGSHIFT)	/* bytes/segment */
@@ -103,5 +105,3 @@
 #define	sun3_round_seg(x)	vaddr_t)(x)) + SEGOFSET)  ~SEGOFSET)
 #define	sun3_trunc_seg(x)	((vaddr_t)(x)  ~SEGOFSET)
 #define	sun3_seg_offset(x)	((vaddr_t)(x)  SEGOFSET)
-
-#endif	/* _KERNEL */

Index: src/sys/arch/sun3/include/pmap3x.h
diff -u src/sys/arch/sun3/include/pmap3x.h:1.27 src/sys/arch/sun3/include/pmap3x.h:1.28
--- src/sys/arch/sun3/include/pmap3x.h:1.27	Fri Dec 11 13:52:57 2009
+++ src/sys/arch/sun3/include/pmap3x.h	Fri Dec 11 18:40:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap3x.h,v 1.27 2009/12/11 13:52:57 tsutsui Exp $	*/
+/*	$NetBSD: pmap3x.h,v 1.28 2009/12/11 18:40:08 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -79,6 +79,8 @@
 #define	PMAP_VME32	0x20	/* etc. */
 #define	PMAP_NC		0x40	/* tells pmap_enter to set PTE_CI */
 #define	PMAP_SPEC	0xFF	/* mask to get all above. */
+ 
+#endif	/* _KERNEL */
 
 /* MMU specific segment size */
 #define	SEGSHIFT	19	/* LOG2(NBSG) */
@@ -88,5 +90,3 @@
 #define	sun3x_round_seg(x)	vaddr_t)(x)) + SEGOFSET)  ~SEGOFSET)
 #define	sun3x_trunc_seg(x)	((vaddr_t)(x)  ~SEGOFSET)
 #define	sun3x_seg_offset(x)	((vaddr_t)(x)  SEGOFSET)
- 
-#endif	/* _KERNEL */