Module Name:    src
Committed By:   tsutsui
Date:           Wed Dec  9 12:21:59 UTC 2009

Modified Files:
        src/sys/arch/amiga/include: param.h
        src/sys/arch/atari/include: param.h
        src/sys/arch/cesfic/include: param.h
        src/sys/arch/hp300/include: param.h
        src/sys/arch/luna68k/include: param.h
        src/sys/arch/mac68k/include: param.h
        src/sys/arch/mvme68k/include: param.h
        src/sys/arch/news68k/include: param.h
        src/sys/arch/next68k/include: param.h
        src/sys/arch/x68k/include: param.h

Log Message:
Fix wrong NBSEG values for all hp300 pmap derived m68k ports.
They were incorrect since 1997 on amiga and atari, and since 2002
on other ports, but fortunately they don't look so fatal.

Anyway, these values will be moved into <m68k/pmap_motorola.h> soon
since they are quite pmap implementation dependent.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/amiga/include/param.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/atari/include/param.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/cesfic/include/param.h
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/hp300/include/param.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/luna68k/include/param.h
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/mac68k/include/param.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/mvme68k/include/param.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/news68k/include/param.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/next68k/include/param.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/x68k/include/param.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/amiga/include/param.h
diff -u src/sys/arch/amiga/include/param.h:1.45 src/sys/arch/amiga/include/param.h:1.46
--- src/sys/arch/amiga/include/param.h:1.45	Sun Jan  6 18:50:32 2008
+++ src/sys/arch/amiga/include/param.h	Wed Dec  9 12:21:58 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.45 2008/01/06 18:50:32 mhitch Exp $	*/
+/*	$NetBSD: param.h,v 1.46 2009/12/09 12:21:58 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -89,10 +89,10 @@
 #define	KERNBASE	0x00000000	/* start of kernel virtual */
 
 #define	SEGSHIFT	24		/* LOG2(NBSEG) [68030 value] */
-/* bytes/segment */
-/* (256 * (1 << PGSHIFT)) == (1 << SEGSHIFT) */
-#define NBSEG		((mmutype == MMU_68040) \
-			    ? (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+
+#define NBSEG		((mmutype == MMU_68040) ? \
+			    (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
+					/* bytes/segment */
 #define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
 
 #define	UPAGES		2		/* pages of u-area */

Index: src/sys/arch/atari/include/param.h
diff -u src/sys/arch/atari/include/param.h:1.31 src/sys/arch/atari/include/param.h:1.32
--- src/sys/arch/atari/include/param.h:1.31	Thu Jan  3 01:02:04 2008
+++ src/sys/arch/atari/include/param.h	Wed Dec  9 12:21:58 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.31 2008/01/03 01:02:04 joerg Exp $	*/
+/*	$NetBSD: param.h,v 1.32 2009/12/09 12:21:58 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -89,10 +89,10 @@
 #define	KERNBASE	0x00000000	/* start of kernel virtual */
 
 #define	SEGSHIFT	24		/* LOG2(NBSEG) [68030 value] */
-/* bytes/segment */
-/* (256 * (1 << PGSHIFT)) == (1 << SEGSHIFT) */
+
 #define	NBSEG		((mmutype == MMU_68040) \
-			    ? (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+			    ? (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
+					/* bytes/segment */
 #define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
 
 #define	UPAGES		2		/* pages of u-area */

Index: src/sys/arch/cesfic/include/param.h
diff -u src/sys/arch/cesfic/include/param.h:1.8 src/sys/arch/cesfic/include/param.h:1.9
--- src/sys/arch/cesfic/include/param.h:1.8	Sat Mar 14 14:45:58 2009
+++ src/sys/arch/cesfic/include/param.h	Wed Dec  9 12:21:58 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.8 2009/03/14 14:45:58 dsl Exp $	*/
+/*	$NetBSD: param.h,v 1.9 2009/12/09 12:21:58 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -101,10 +101,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define	NBSEG		(32 * (1 << PGSHIFT))
+#define	NBSEG		(1 << 18 /* SG4_SHIFT2 */)
 #else
 #define	NBSEG		((mmutype == MMU_68040) ? \
-				(32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+			    (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
 

Index: src/sys/arch/hp300/include/param.h
diff -u src/sys/arch/hp300/include/param.h:1.49 src/sys/arch/hp300/include/param.h:1.50
--- src/sys/arch/hp300/include/param.h:1.49	Mon Dec 31 13:38:50 2007
+++ src/sys/arch/hp300/include/param.h	Wed Dec  9 12:21:58 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.49 2007/12/31 13:38:50 ad Exp $	*/
+/*	$NetBSD: param.h,v 1.50 2009/12/09 12:21:58 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -92,10 +92,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define	NBSEG		(32 * (1 << PGSHIFT))
+#define	NBSEG		(1 << 18 /* SG4_SHIFT2 */)
 #else
 #define	NBSEG		((mmutype == MMU_68040) ? \
-				(32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+			    (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
 

Index: src/sys/arch/luna68k/include/param.h
diff -u src/sys/arch/luna68k/include/param.h:1.8 src/sys/arch/luna68k/include/param.h:1.9
--- src/sys/arch/luna68k/include/param.h:1.8	Sat Mar 14 14:46:01 2009
+++ src/sys/arch/luna68k/include/param.h	Wed Dec  9 12:21:58 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.8 2009/03/14 14:46:01 dsl Exp $ */
+/* $NetBSD: param.h,v 1.9 2009/12/09 12:21:58 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -89,10 +89,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define	NBSEG		(32 * (1 << PGSHIFT))
+#define	NBSEG		(1 << 18 /* SG4_SHIFT2 */)
 #else
 #define	NBSEG		((mmutype == MMU_68040) ? \
-				(32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+			    (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define SEGOFSET	(NBSEG-1)	/* byte offset into segment */
 

Index: src/sys/arch/mac68k/include/param.h
diff -u src/sys/arch/mac68k/include/param.h:1.41 src/sys/arch/mac68k/include/param.h:1.42
--- src/sys/arch/mac68k/include/param.h:1.41	Sun Dec 11 12:18:03 2005
+++ src/sys/arch/mac68k/include/param.h	Wed Dec  9 12:21:58 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.41 2005/12/11 12:18:03 christos Exp $	*/
+/*	$NetBSD: param.h,v 1.42 2009/12/09 12:21:58 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -127,10 +127,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define	NBSEG		(32 * (1 << PGSHIFT))
+#define	NBSEG		(1 << 18 /* SG4_SHIFT2 */)
 #else
 #define	NBSEG		((mmutype == MMU_68040) ? \
-				(32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+			    (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
 

Index: src/sys/arch/mvme68k/include/param.h
diff -u src/sys/arch/mvme68k/include/param.h:1.29 src/sys/arch/mvme68k/include/param.h:1.30
--- src/sys/arch/mvme68k/include/param.h:1.29	Sat Jan 12 09:54:28 2008
+++ src/sys/arch/mvme68k/include/param.h	Wed Dec  9 12:21:58 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.29 2008/01/12 09:54:28 tsutsui Exp $	*/
+/*	$NetBSD: param.h,v 1.30 2009/12/09 12:21:58 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -99,10 +99,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define	NBSEG		(32 * (1 << PGSHIFT))
+#define	NBSEG		(1 << 18 /* SG4_SHIFT2 */)
 #else
 #define	NBSEG		((mmutype == MMU_68040) ? \
-				(32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+			    (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
 

Index: src/sys/arch/news68k/include/param.h
diff -u src/sys/arch/news68k/include/param.h:1.12 src/sys/arch/news68k/include/param.h:1.13
--- src/sys/arch/news68k/include/param.h:1.12	Mon Dec 31 13:38:52 2007
+++ src/sys/arch/news68k/include/param.h	Wed Dec  9 12:21:58 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.12 2007/12/31 13:38:52 ad Exp $	*/
+/*	$NetBSD: param.h,v 1.13 2009/12/09 12:21:58 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -90,13 +90,14 @@
 #define	KERNBASE	0x00000000	/* start of kernel virtual */
 
 #define	SEGSHIFT	22		/* LOG2(NBSEG) */
+
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define	NBSEG		(32 * (1 << PGSHIFT))
+#define	NBSEG		(1 << 18 /* SG4_SHIFT2 */)
 #else
 #define	NBSEG		((mmutype == MMU_68040) ? \
-				(32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+			    (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
 

Index: src/sys/arch/next68k/include/param.h
diff -u src/sys/arch/next68k/include/param.h:1.8 src/sys/arch/next68k/include/param.h:1.9
--- src/sys/arch/next68k/include/param.h:1.8	Sun Dec 11 12:18:25 2005
+++ src/sys/arch/next68k/include/param.h	Wed Dec  9 12:21:59 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.8 2005/12/11 12:18:25 christos Exp $	*/
+/*	$NetBSD: param.h,v 1.9 2009/12/09 12:21:59 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -92,10 +92,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define	NBSEG		(32 * (1 << PGSHIFT))
+#define	NBSEG		(1 << 18 /* SG4_SHIFT2 */)
 #else
 #define	NBSEG		((mmutype == MMU_68040) ? \
-				(32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+			    (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
 

Index: src/sys/arch/x68k/include/param.h
diff -u src/sys/arch/x68k/include/param.h:1.24 src/sys/arch/x68k/include/param.h:1.25
--- src/sys/arch/x68k/include/param.h:1.24	Mon Dec 31 13:38:53 2007
+++ src/sys/arch/x68k/include/param.h	Wed Dec  9 12:21:59 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.24 2007/12/31 13:38:53 ad Exp $	*/
+/*	$NetBSD: param.h,v 1.25 2009/12/09 12:21:59 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -92,10 +92,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG		(1 << SEGSHIFT)	/* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define	NBSEG		(32 * (1 << PGSHIFT))
+#define	NBSEG		(1 << 18 /* SG4_SHIFT2 */)
 #else
 #define	NBSEG		((mmutype == MMU_68040) ? \
-				(32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+			    (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define	SEGOFSET	(NBSEG-1)	/* byte offset into segment */
 

Reply via email to