Module Name:    src
Committed By:   thorpej
Date:           Thu Jan 18 05:12:30 UTC 2024

Modified Files:
        src/sys/arch/mvme68k/conf: Makefile.mvme68k files.mvme68k
        src/sys/arch/mvme68k/dev: mainbus.c zs.c
        src/sys/arch/mvme68k/include: cpu.h
        src/sys/arch/mvme68k/mvme68k: autoconf.c locore.s machdep.c

Log Message:
Don't put the MVME1xx model defines into IDENT, make them defflag options and
put them in opt_mvmeconf.h.  Make these options depend on the appropriate
M680x0 option (MVME147 -> M68030, MVME16[27] -> M68040, MVME17[27] -> M68060)
so that the CPU option appears correctly in opt_m68k_arch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/mvme68k/conf/Makefile.mvme68k \
    src/sys/arch/mvme68k/conf/files.mvme68k
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/mvme68k/dev/mainbus.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/mvme68k/dev/zs.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/mvme68k/include/cpu.h
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/mvme68k/mvme68k/autoconf.c
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/mvme68k/mvme68k/locore.s
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/mvme68k/mvme68k/machdep.c

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/mvme68k/conf/Makefile.mvme68k
diff -u src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.68 src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.69
--- src/sys/arch/mvme68k/conf/Makefile.mvme68k:1.68	Sat Sep 22 12:24:02 2018
+++ src/sys/arch/mvme68k/conf/Makefile.mvme68k	Thu Jan 18 05:12:29 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mvme68k,v 1.68 2018/09/22 12:24:02 rin Exp $
+#	$NetBSD: Makefile.mvme68k,v 1.69 2024/01/18 05:12:29 thorpej Exp $
 
 # Makefile for NetBSD
 #
@@ -32,19 +32,19 @@ GENASSYM_CONF=	${MVME68K}/mvme68k/genass
 ## (2) compile settings
 ##
 CPPFLAGS+=	-Dmvme68k
-.if empty(IDENT:M-DMVME172) && empty(IDENT:M-DMVME177)
-.if empty(IDENT:M-DMVME147)
+.if empty(KERNEL_OPT_M68060)
+.if empty(KERNEL_OPT_M68030)
 CMACHFLAGS=	-m68040
 .else
 CMACHFLAGS=	-m68030
 .endif
-.else
-.if empty(IDENT:M-DMVME147) && empty(IDENT:M-DMVME162) && empty(IDENT:M-DMVME167)
+.else		# M68060
+.if empty(KERNEL_OPT_M68030) && empty(KERNEL_OPT_M68040)
 CMACHFLAGS=	-m68060 -Wa,-march=68030 -Wa,-m68030 -Wa,-mcpu=68030 -Wa,-m68851
 .else
 CMACHFLAGS=	-m68020-60 -Wa,-m68030 -Wa,-mcpu=68030 -Wa,-m68851
 .endif
-.endif
+.endif		# M68060
 CFLAGS+=	${CMACHFLAGS} -msoft-float
 AFLAGS+=	-x assembler-with-cpp
 
Index: src/sys/arch/mvme68k/conf/files.mvme68k
diff -u src/sys/arch/mvme68k/conf/files.mvme68k:1.68 src/sys/arch/mvme68k/conf/files.mvme68k:1.69
--- src/sys/arch/mvme68k/conf/files.mvme68k:1.68	Tue Jan 16 01:26:34 2024
+++ src/sys/arch/mvme68k/conf/files.mvme68k	Thu Jan 18 05:12:29 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: files.mvme68k,v 1.68 2024/01/16 01:26:34 thorpej Exp $
+#	$NetBSD: files.mvme68k,v 1.69 2024/01/18 05:12:29 thorpej Exp $
 
 # config file for mvme68k
 
@@ -8,6 +8,13 @@ defflag				PANICBUTTON	# panic on ABORT 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 8
 
+# System configuration options.
+defflag	opt_mvmeconf.h	MVME147: M68030
+defflag	opt_mvmeconf.h	MVME162: M68040
+defflag	opt_mvmeconf.h	MVME167: M68040
+defflag	opt_mvmeconf.h	MVME172: M68060
+defflag	opt_mvmeconf.h	MVME177: M68060
+
 device mainbus { }
 attach mainbus at root
 file arch/mvme68k/dev/mainbus.c		mainbus

Index: src/sys/arch/mvme68k/dev/mainbus.c
diff -u src/sys/arch/mvme68k/dev/mainbus.c:1.23 src/sys/arch/mvme68k/dev/mainbus.c:1.24
--- src/sys/arch/mvme68k/dev/mainbus.c:1.23	Sat Aug  7 16:19:00 2021
+++ src/sys/arch/mvme68k/dev/mainbus.c	Thu Jan 18 05:12:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.23 2021/08/07 16:19:00 thorpej Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.24 2024/01/18 05:12:29 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -34,8 +34,9 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.23 2021/08/07 16:19:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.24 2024/01/18 05:12:29 thorpej Exp $");
 
+#include "opt_mvmeconf.h"
 #include "vmetwo.h"
 
 #include <sys/param.h>

Index: src/sys/arch/mvme68k/dev/zs.c
diff -u src/sys/arch/mvme68k/dev/zs.c:1.45 src/sys/arch/mvme68k/dev/zs.c:1.46
--- src/sys/arch/mvme68k/dev/zs.c:1.45	Sat Sep 11 20:28:04 2021
+++ src/sys/arch/mvme68k/dev/zs.c	Thu Jan 18 05:12:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.45 2021/09/11 20:28:04 andvar Exp $	*/
+/*	$NetBSD: zs.c,v 1.46 2024/01/18 05:12:29 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,7 +39,9 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.45 2021/09/11 20:28:04 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.46 2024/01/18 05:12:29 thorpej Exp $");
+
+#include "opt_mvmeconf.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>

Index: src/sys/arch/mvme68k/include/cpu.h
diff -u src/sys/arch/mvme68k/include/cpu.h:1.53 src/sys/arch/mvme68k/include/cpu.h:1.54
--- src/sys/arch/mvme68k/include/cpu.h:1.53	Tue Jan 16 01:26:34 2024
+++ src/sys/arch/mvme68k/include/cpu.h	Thu Jan 18 05:12:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.53 2024/01/16 01:26:34 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.54 2024/01/18 05:12:30 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,6 +44,7 @@
 #if defined(_KERNEL_OPT)
 #include "opt_lockdebug.h"
 #include "opt_m68k_arch.h"
+#include "opt_mvmeconf.h"
 #endif
 
 /*
@@ -80,7 +81,6 @@ struct clockframe {
  */
 #define	CLKF_INTR(framep)	(idepth > 1)
 
-
 /*
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
@@ -107,31 +107,8 @@ struct clockframe {
 extern int astpending;		/* need to trap before returning to user mode */
 #define aston() (astpending++)
 
-/*
- * Associate MVME models with CPU types.
- */
-#define	MVME68K		1	
-
-/*
- * MVME-147; 68030 CPU
- */
-#if defined(MVME147) && !defined(M68030)
-#define M68030
-#endif
-
-/*
- * MVME-162/166/167; 68040 CPU
- */
-#if (defined(MVME162) || defined(MVME167)) && !defined(M68040)
-#define M68040
-#endif
+#define	MVME68K		1	/* XXX */
 
-/*
- * MVME-172/177; 68060 CPU
- */
-#if (defined(MVME172) || defined(MVME177)) && !defined(M68060)
-#define M68060
-#endif
 #endif /* _KERNEL */
 
 /*

Index: src/sys/arch/mvme68k/mvme68k/autoconf.c
diff -u src/sys/arch/mvme68k/mvme68k/autoconf.c:1.47 src/sys/arch/mvme68k/mvme68k/autoconf.c:1.48
--- src/sys/arch/mvme68k/mvme68k/autoconf.c:1.47	Sat Oct 27 17:18:04 2012
+++ src/sys/arch/mvme68k/mvme68k/autoconf.c	Thu Jan 18 05:12:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.47 2012/10/27 17:18:04 chs Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.48 2024/01/18 05:12:30 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -45,7 +45,9 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.47 2012/10/27 17:18:04 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.48 2024/01/18 05:12:30 thorpej Exp $");
+
+#include "opt_mvmeconf.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>

Index: src/sys/arch/mvme68k/mvme68k/locore.s
diff -u src/sys/arch/mvme68k/mvme68k/locore.s:1.130 src/sys/arch/mvme68k/mvme68k/locore.s:1.131
--- src/sys/arch/mvme68k/mvme68k/locore.s:1.130	Wed Jan 17 12:33:50 2024
+++ src/sys/arch/mvme68k/mvme68k/locore.s	Thu Jan 18 05:12:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.130 2024/01/17 12:33:50 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.131 2024/01/18 05:12:30 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -45,6 +45,7 @@
 #include "opt_kgdb.h"
 #include "opt_lockdebug.h"
 #include "opt_m68k_arch.h"
+#include "opt_mvmeconf.h"
 
 #include "assym.h"
 #include <machine/asm.h>

Index: src/sys/arch/mvme68k/mvme68k/machdep.c
diff -u src/sys/arch/mvme68k/mvme68k/machdep.c:1.163 src/sys/arch/mvme68k/mvme68k/machdep.c:1.164
--- src/sys/arch/mvme68k/mvme68k/machdep.c:1.163	Tue Jan 16 01:26:34 2024
+++ src/sys/arch/mvme68k/mvme68k/machdep.c	Thu Jan 18 05:12:30 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.163 2024/01/16 01:26:34 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.164 2024/01/18 05:12:30 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,13 +39,14 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.163 2024/01/16 01:26:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.164 2024/01/18 05:12:30 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_m060sp.h"
 #include "opt_modular.h"
 #include "opt_panicbutton.h"
 #include "opt_m68k_arch.h"
+#include "opt_mvmeconf.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>

Reply via email to