summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2001-04-08 05:00:28 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2001-04-08 05:00:28 +0000
commit03d2d346e8b0a5363b29cdc3cf789502fd551281 (patch)
treecd75ec5814778010d49aaf7d682159ef3737d9c1 /sys
parentef163d7101a542564e54270a789bb3623ce015cd (diff)
Attempt at tracking interrupt source better than "irqN", with this
change, when the interrupt is established, the string will be changed from irqN to irqN/dvrname. Some drivers establish nice names, "usb0" some do not, "wdc_obio".
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/powerpc/mac/macintr.c6
-rw-r--r--sys/arch/powerpc/mac/openpic.c5
-rw-r--r--sys/arch/powerpc/powerpc/locore.S4
-rw-r--r--sys/arch/powerpc/powerpc/machdep.c33
4 files changed, 43 insertions, 5 deletions
diff --git a/sys/arch/powerpc/mac/macintr.c b/sys/arch/powerpc/mac/macintr.c
index c0ed02dbd22..75d92f9f42d 100644
--- a/sys/arch/powerpc/mac/macintr.c
+++ b/sys/arch/powerpc/mac/macintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macintr.c,v 1.6 2000/07/31 03:47:35 rahnds Exp $ */
+/* $OpenBSD: macintr.c,v 1.7 2001/04/08 05:00:26 drahn Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -224,6 +224,8 @@ fakeintr(arg)
return 0;
}
+void nameinterrupt( int replace, char *newstr);
+
/*
* Register an interrupt handler.
*/
@@ -248,7 +250,7 @@ macintr_establish(lcv, irq, type, level, ih_fun, ih_arg, name)
printf("macintr_establish, hI %d L %d ", irq, type);
printf("addr reg0 %x\n", INT_STATE_REG0);
#endif
-
+ nameinterrupt(irq, name);
irq = mapirq(irq);
#if 0
printf("vI %d ", irq);
diff --git a/sys/arch/powerpc/mac/openpic.c b/sys/arch/powerpc/mac/openpic.c
index e7004707b72..4cd4a15e35a 100644
--- a/sys/arch/powerpc/mac/openpic.c
+++ b/sys/arch/powerpc/mac/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.9 2001/02/20 04:20:35 drahn Exp $ */
+/* $OpenBSD: openpic.c,v 1.10 2001/04/08 05:00:26 drahn Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -222,6 +222,8 @@ fakeintr(arg)
return 0;
}
+void nameinterrupt( int replace, char *newstr);
+
/*
* Register an interrupt handler.
*/
@@ -246,6 +248,7 @@ openpic_intr_establish(lcv, irq, type, level, ih_fun, ih_arg, name)
printf("mac_intr_establish, hI %d L %d ", irq, type);
#endif
+ nameinterrupt(irq, name);
irq = mapirq(irq);
#if 0
printf("vI %d ", irq);
diff --git a/sys/arch/powerpc/powerpc/locore.S b/sys/arch/powerpc/powerpc/locore.S
index b17a013fed7..76d6f5a1daa 100644
--- a/sys/arch/powerpc/powerpc/locore.S
+++ b/sys/arch/powerpc/powerpc/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.14 2001/03/10 23:14:32 drahn Exp $ */
+/* $OpenBSD: locore.S,v 1.15 2001/04/08 05:00:27 drahn Exp $ */
/* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */
/*
@@ -1256,6 +1256,7 @@ _C_LABEL(esigcode):
+ .data
.globl _C_LABEL(intrnames)
.type _C_LABEL(intrnames),@object
.globl _C_LABEL(eintrnames)
@@ -1278,6 +1279,7 @@ _C_LABEL(intrnames):
.string "irq56" "irq57" "irq58" "irq59"
.string "irq60" "irq61" "irq62" "irq63"
.string "clock"
+ .space 512
_C_LABEL(eintrnames):
.align 4
.globl _C_LABEL(intrcnt)
diff --git a/sys/arch/powerpc/powerpc/machdep.c b/sys/arch/powerpc/powerpc/machdep.c
index ca9c1681dc5..2fe792f6f17 100644
--- a/sys/arch/powerpc/powerpc/machdep.c
+++ b/sys/arch/powerpc/powerpc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.55 2001/03/29 19:02:06 drahn Exp $ */
+/* $OpenBSD: machdep.c,v 1.56 2001/04/08 05:00:27 drahn Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -1482,3 +1482,34 @@ kcopy(from, to, size)
return 0;
}
+void
+nameinterrupt(replace, newstr)
+ int replace;
+ char *newstr;
+{
+#define NENTRIES 66
+ char intrname[NENTRIES][30];
+ char *p, *src;
+ int i;
+ extern char intrnames[];
+ extern char eintrnames[];
+
+ if (replace > NENTRIES) {
+ return;
+ }
+ src = intrnames;
+
+ for (i = 0; i < NENTRIES; i++) {
+ src += strlcpy(intrname[i], src, 30);
+ src+=1; /* skip the NUL */
+ }
+
+ strcat(intrname[replace], "/");
+ strcat(intrname[replace], newstr);
+
+ p = intrnames;
+ for (i = 0; i < NENTRIES; i++) {
+ p += strlcpy(p, intrname[i], eintrnames - p);
+ p += 1; /* skip the NUL */
+ }
+}