summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-12-24 01:25:02 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-12-24 01:25:02 +0000
commit6eb67d93d85c203064d7fdb81bd4daa5c123fe32 (patch)
tree4e9a0d604b667e929bf63096f5e3404b21103ee7 /sys/arch
parent4d5358fd7c257f9f2610a68567e988f001a69287 (diff)
change schizo/psycho interrupts to be xname:what instead of ugly names
seen previously; discussed with kettenis
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/dev/psycho.c4
-rw-r--r--sys/arch/sparc64/dev/schizo.c17
2 files changed, 15 insertions, 6 deletions
diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c
index 7ef0c4dd07f..34539f093e3 100644
--- a/sys/arch/sparc64/dev/psycho.c
+++ b/sys/arch/sparc64/dev/psycho.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: psycho.c,v 1.48 2006/12/14 17:36:12 kettenis Exp $ */
+/* $OpenBSD: psycho.c,v 1.49 2006/12/24 01:25:01 deraadt Exp $ */
/* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */
/*
@@ -627,7 +627,7 @@ psycho_set_intr(struct psycho_softc *sc, int ipl, void *handler,
ih->ih_pil = (1 << ipl);
ih->ih_number = INTVEC(*(ih->ih_map));
snprintf(ih->ih_name, sizeof(ih->ih_name),
- "%s_%s", sc->sc_dev.dv_xname, suffix);
+ "%s:%s", sc->sc_dev.dv_xname, suffix);
DPRINTF(PDB_INTR, (
"\ninstalling handler %p arg %p for %s with number %x pil %u",
diff --git a/sys/arch/sparc64/dev/schizo.c b/sys/arch/sparc64/dev/schizo.c
index c5947838872..501db2ab7b0 100644
--- a/sys/arch/sparc64/dev/schizo.c
+++ b/sys/arch/sparc64/dev/schizo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: schizo.c,v 1.37 2006/12/14 17:36:12 kettenis Exp $ */
+/* $OpenBSD: schizo.c,v 1.38 2006/12/24 01:25:01 deraadt Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -252,8 +252,10 @@ schizo_init(struct schizo_softc *sc, int busa)
schizo_pbm_write(pbm, SCZ_PCI_DIAG, reg);
/* double mapped */
- schizo_set_intr(sc, pbm, PIL_HIGH, schizo_ue, sc, SCZ_UE_INO, "ue");
- schizo_set_intr(sc, pbm, PIL_HIGH, schizo_ce, sc, SCZ_CE_INO, "ce");
+ schizo_set_intr(sc, pbm, PIL_HIGH, schizo_ue, sc, SCZ_UE_INO,
+ "ue");
+ schizo_set_intr(sc, pbm, PIL_HIGH, schizo_ce, sc, SCZ_CE_INO,
+ "ce");
schizo_set_intr(sc, pbm, PIL_HIGH, schizo_safari_error, sc,
SCZ_SERR_INO, "safari");
@@ -434,16 +436,23 @@ schizo_set_intr(struct schizo_softc *sc, struct schizo_pbm *pbm, int ipl,
struct intrhand *ih;
volatile u_int64_t *map, *clr;
struct schizo_pbm_regs *pbmreg;
+ char *name;
+ int nlen;
pbmreg = bus_space_vaddr(pbm->sp_regt, pbm->sp_regh);
map = &pbmreg->imap[ino];
clr = &pbmreg->iclr[ino];
ino |= sc->sc_ign;
+ nlen = strlen(sc->sc_dv.dv_xname) + 1 + strlen(what) + 1;
+ name = malloc(nlen, M_DEVBUF, M_WAITOK);
+ snprintf(name, nlen, "%s:%s", sc->sc_dv.dv_xname, what);
+
ih = bus_intr_allocate(pbm->sp_regt, handler, arg, ino, ipl,
- map, clr, what);
+ map, clr, name);
if (ih == NULL) {
printf("set_intr failed...\n");
+ free(name, M_DEVBUF);
return;
}