Module Name:    src
Committed By:   jdc
Date:           Sat Sep  2 05:51:57 UTC 2023

Modified Files:
        src/sys/arch/sparc64/dev: fdc.c
        src/sys/arch/sparc64/include: intr.h psl.h
        src/sys/arch/sparc64/sparc64: autoconf.c

Log Message:
sparc64: fix interrupt level mapping for disk and and parallel devices
on SBUS-based machines
Change the mapping from PIL_SCSI to PIL_BIO, so that they interrupt above
the highest soft interrupt (softserial)
Remove unused PIL_SCSI, PIL_FDSOFT, PIL_AUSOFT and fix the printf in fdc.c
Add "socal" and "SUNW,bpp" to the interrupt map.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/sparc64/dev/fdc.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc64/include/intr.h
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/sparc64/include/psl.h
cvs rdiff -u -r1.238 -r1.239 src/sys/arch/sparc64/sparc64/autoconf.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/sparc64/dev/fdc.c
diff -u src/sys/arch/sparc64/dev/fdc.c:1.51 src/sys/arch/sparc64/dev/fdc.c:1.52
--- src/sys/arch/sparc64/dev/fdc.c:1.51	Sat Aug  7 16:19:05 2021
+++ src/sys/arch/sparc64/dev/fdc.c	Sat Sep  2 05:51:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdc.c,v 1.51 2021/08/07 16:19:05 thorpej Exp $	*/
+/*	$NetBSD: fdc.c,v 1.52 2023/09/02 05:51:57 jdc Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdc.c,v 1.51 2021/08/07 16:19:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdc.c,v 1.52 2023/09/02 05:51:57 jdc Exp $");
 
 #include "opt_ddb.h"
 #include "opt_md.h"
@@ -825,7 +825,7 @@ fdcattach(struct fdc_softc *fdc, int pri
 #ifdef SUN4
 	printf(" softpri %d: chip 8207%c\n", IPL_SOFTFDC, code);
 #elif SUN4U
-	printf(" softpri %d: chip 8207%c", PIL_FDSOFT, code);
+	printf(" softpri %d: chip 8207%c", IPL_BIO, code);
 	if (fdc->sc_flags & FDC_NOEJECT)
 		printf(": manual eject");
 	printf("\n");

Index: src/sys/arch/sparc64/include/intr.h
diff -u src/sys/arch/sparc64/include/intr.h:1.31 src/sys/arch/sparc64/include/intr.h:1.32
--- src/sys/arch/sparc64/include/intr.h:1.31	Fri Jul 27 05:36:12 2012
+++ src/sys/arch/sparc64/include/intr.h	Sat Sep  2 05:51:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.31 2012/07/27 05:36:12 matt Exp $ */
+/*	$NetBSD: intr.h,v 1.32 2023/09/02 05:51:57 jdc Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -54,7 +54,6 @@
 #define	IPL_HIGH	PIL_HIGH	/* everything */
 #define	IPL_HALT	5		/* cpu stop-self */
 #define	IPL_PAUSE	13		/* pause cpu */
-#define	IPL_FDSOFT	PIL_FDSOFT	/* floppy */
 
 /*
  * IPL_SAFEPRI is a safe priority for sleep to set for a spin-wait

Index: src/sys/arch/sparc64/include/psl.h
diff -u src/sys/arch/sparc64/include/psl.h:1.63 src/sys/arch/sparc64/include/psl.h:1.64
--- src/sys/arch/sparc64/include/psl.h:1.63	Tue Jul 11 11:02:07 2023
+++ src/sys/arch/sparc64/include/psl.h	Sat Sep  2 05:51:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: psl.h,v 1.63 2023/07/11 11:02:07 martin Exp $ */
+/*	$NetBSD: psl.h,v 1.64 2023/09/02 05:51:57 jdc Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -73,9 +73,6 @@
 #define PSR_BITS "\20\16EC\15EF\10S\7PS\6ET"
 
 /* Interesting spl()s */
-#define PIL_SCSI	3
-#define PIL_FDSOFT	4
-#define PIL_AUSOFT	4
 #define PIL_BIO		5
 #define PIL_VIDEO	5
 #define PIL_TTY		6
@@ -514,12 +511,6 @@ SPLHOLD(splsoftint, 1)
 
 SPLHOLD(splsoftserial, 4)
 
-/* audio software interrupts are at software level 4 */
-SPLHOLD(splausoft, PIL_AUSOFT)
-
-/* floppy software interrupts are at software level 4 too */
-SPLHOLD(splfdsoft, PIL_FDSOFT)
-
 /*
  * Memory allocation (must be as high as highest network, tty, or disk device)
  */

Index: src/sys/arch/sparc64/sparc64/autoconf.c
diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.238 src/sys/arch/sparc64/sparc64/autoconf.c:1.239
--- src/sys/arch/sparc64/sparc64/autoconf.c:1.238	Sat Jan 22 11:49:17 2022
+++ src/sys/arch/sparc64/sparc64/autoconf.c	Sat Sep  2 05:51:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.238 2022/01/22 11:49:17 thorpej Exp $ */
+/*	$NetBSD: autoconf.c,v 1.239 2023/09/02 05:51:57 jdc Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.238 2022/01/22 11:49:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.239 2023/09/02 05:51:57 jdc Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -165,19 +165,22 @@ int kernel_dtlb_slots;
 int kernel_itlb_slots;
 
 /* Global interrupt mappings for all device types.  Match against the OBP
- * 'device_type' property. 
+ * 'device_type' property.  Note, that the resulting PIL must be higher than
+ * the highest soft interrupt level (IPL_SOFTSERIAL).
  */
 struct intrmap intrmap[] = {
 	{ "block",	PIL_FD },	/* Floppy disk */
 	{ "serial",	PIL_SER },	/* zs */
-	{ "scsi",	PIL_SCSI },
-	{ "scsi-2",	PIL_SCSI },
+	{ "scsi",	PIL_BIO },
+	{ "scsi-2",	PIL_BIO },
 	{ "network",	PIL_NET },
 	{ "display",	PIL_VIDEO },
 	{ "audio",	PIL_AUD },
-	{ "ide",	PIL_SCSI },
+	{ "ide",	PIL_BIO },
+	{ "socal",	PIL_BIO },
 /* The following devices don't have device types: */
 	{ "SUNW,CS4231",	PIL_AUD },
+	{ "SUNW,bpp",	PIL_BIO },
 	{ NULL,		0 }
 };
 

Reply via email to