diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2018-12-03 13:46:31 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2018-12-03 13:46:31 +0000 |
commit | 798347746d418852a49db888a9f7e7ea46304599 (patch) | |
tree | 13e52dbd0e45eef08ce3df73f7f0f124367f820d | |
parent | 1ca13b49444ee39ee9f29fc75bcf836349d1c7e5 (diff) |
Remove the unused interrupt type (edge/level) from the mace interrupt
handler registration. The code is inherited from isa(4), but on the O2,
although some interrupt sources on CRIME are edge-triggered, all
the MACE interrupts are level-triggered.
From miod@
-rw-r--r-- | sys/arch/sgi/dev/if_mec.c | 4 | ||||
-rw-r--r-- | sys/arch/sgi/dev/mavb.c | 4 | ||||
-rw-r--r-- | sys/arch/sgi/dev/mkbc.c | 4 | ||||
-rw-r--r-- | sys/arch/sgi/dev/power.c | 4 | ||||
-rw-r--r-- | sys/arch/sgi/localbus/com_lbus.c | 4 | ||||
-rw-r--r-- | sys/arch/sgi/localbus/macebus.c | 8 | ||||
-rw-r--r-- | sys/arch/sgi/localbus/macebusvar.h | 4 | ||||
-rw-r--r-- | sys/arch/sgi/pci/macepcibridge.c | 6 |
8 files changed, 17 insertions, 21 deletions
diff --git a/sys/arch/sgi/dev/if_mec.c b/sys/arch/sgi/dev/if_mec.c index 8475133d729..117470982b7 100644 --- a/sys/arch/sgi/dev/if_mec.c +++ b/sys/arch/sgi/dev/if_mec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mec.c,v 1.37 2017/01/22 10:17:37 dlg Exp $ */ +/* $OpenBSD: if_mec.c,v 1.38 2018/12/03 13:46:30 visa Exp $ */ /* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */ /* @@ -467,7 +467,7 @@ mec_attach(struct device *parent, struct device *self, void *aux) /* Establish interrupt handler. */ macebus_intr_establish(maa->maa_intr, maa->maa_mace_intr, - IST_EDGE, IPL_NET, mec_intr, sc, sc->sc_dev.dv_xname); + IPL_NET, mec_intr, sc, sc->sc_dev.dv_xname); return; diff --git a/sys/arch/sgi/dev/mavb.c b/sys/arch/sgi/dev/mavb.c index 11a54d6282e..939d63dc51d 100644 --- a/sys/arch/sgi/dev/mavb.c +++ b/sys/arch/sgi/dev/mavb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mavb.c,v 1.20 2016/09/19 06:46:43 ratchov Exp $ */ +/* $OpenBSD: mavb.c,v 1.21 2018/12/03 13:46:30 visa Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -1101,7 +1101,7 @@ mavb_attach(struct device *parent, struct device *self, void *aux) /* Establish interrupt. */ macebus_intr_establish(maa->maa_intr, maa->maa_mace_intr, - IST_EDGE, IPL_AUDIO, mavb_intr, sc, sc->sc_dev.dv_xname); + IPL_AUDIO, mavb_intr, sc, sc->sc_dev.dv_xname); /* 2. Assert the RESET signal. */ bus_space_write_8(sc->sc_st, sc->sc_sh, MAVB_CONTROL, diff --git a/sys/arch/sgi/dev/mkbc.c b/sys/arch/sgi/dev/mkbc.c index cb3fe051241..982b5cd4171 100644 --- a/sys/arch/sgi/dev/mkbc.c +++ b/sys/arch/sgi/dev/mkbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkbc.c,v 1.13 2015/02/11 07:05:39 dlg Exp $ */ +/* $OpenBSD: mkbc.c,v 1.14 2018/12/03 13:46:30 visa Exp $ */ /* * Copyright (c) 2006, 2007, Joel Sing @@ -287,7 +287,7 @@ mkbc_attach(struct device *parent, struct device *self, void *aux) /* Establish interrupt handler. */ if (macebus_intr_establish(maa->maa_intr, maa->maa_mace_intr, - IST_EDGE, IPL_TTY, mkbcintr, msc, sc->sc_dv.dv_xname)) + IPL_TTY, mkbcintr, msc, sc->sc_dv.dv_xname)) printf("\n"); else printf(": unable to establish interrupt\n"); diff --git a/sys/arch/sgi/dev/power.c b/sys/arch/sgi/dev/power.c index 635c2700baa..8b38f7a20cb 100644 --- a/sys/arch/sgi/dev/power.c +++ b/sys/arch/sgi/dev/power.c @@ -1,4 +1,4 @@ -/* $OpenBSD: power.c,v 1.15 2014/07/11 08:18:30 guenther Exp $ */ +/* $OpenBSD: power.c,v 1.16 2018/12/03 13:46:30 visa Exp $ */ /* * Copyright (c) 2007 Jasper Lievisse Adriaanse <jasper@openbsd.org> @@ -64,7 +64,7 @@ power_macebus_attach(struct device *parent, struct device *self, void *aux) /* Establish interrupt handler. */ if (macebus_intr_establish(maa->maa_intr, maa->maa_mace_intr, - IST_EDGE, IPL_TTY, power_intr, self, self->dv_xname)) + IPL_TTY, power_intr, self, self->dv_xname)) printf("\n"); else printf(": unable to establish interrupt!\n"); diff --git a/sys/arch/sgi/localbus/com_lbus.c b/sys/arch/sgi/localbus/com_lbus.c index 7397f838c44..94acab3b3ce 100644 --- a/sys/arch/sgi/localbus/com_lbus.c +++ b/sys/arch/sgi/localbus/com_lbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_lbus.c,v 1.12 2012/10/03 22:46:09 miod Exp $ */ +/* $OpenBSD: com_lbus.c,v 1.13 2018/12/03 13:46:30 visa Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -96,5 +96,5 @@ com_macebus_attach(struct device *parent, struct device *self, void *aux) com_attach_subr(sc); macebus_intr_establish(maa->maa_intr, maa->maa_mace_intr, - IST_EDGE, IPL_TTY, comintr, (void *)sc, sc->sc_dev.dv_xname); + IPL_TTY, comintr, (void *)sc, sc->sc_dev.dv_xname); } diff --git a/sys/arch/sgi/localbus/macebus.c b/sys/arch/sgi/localbus/macebus.c index 4c25bc74374..aac2605514f 100644 --- a/sys/arch/sgi/localbus/macebus.c +++ b/sys/arch/sgi/localbus/macebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macebus.c,v 1.67 2018/02/24 11:42:31 visa Exp $ */ +/* $OpenBSD: macebus.c,v 1.68 2018/12/03 13:46:30 visa Exp $ */ /* * Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se) @@ -468,13 +468,9 @@ macebus_pa_to_device(paddr_t pa, int flags) * Establish an interrupt handler called from the dispatcher. * The interrupt function established should return zero if there was nothing * to serve (no int) and non-zero when an interrupt was serviced. - * - * Interrupts are numbered from 1 and up where 1 maps to HW int 0. - * XXX There is no reason to keep this... except for hardcoded interrupts - * XXX in kernel configuration files... */ void * -macebus_intr_establish(int irq, uint32_t mace_irqmask, int type, int level, +macebus_intr_establish(int irq, uint32_t mace_irqmask, int level, int (*ih_fun)(void *), void *ih_arg, const char *ih_what) { struct crime_intrhand **p, *q, *ih; diff --git a/sys/arch/sgi/localbus/macebusvar.h b/sys/arch/sgi/localbus/macebusvar.h index 687571a7aaf..39b93d4dbee 100644 --- a/sys/arch/sgi/localbus/macebusvar.h +++ b/sys/arch/sgi/localbus/macebusvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: macebusvar.h,v 1.1 2009/10/26 18:01:40 miod Exp $ */ +/* $OpenBSD: macebusvar.h,v 1.2 2018/12/03 13:46:30 visa Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -45,7 +45,7 @@ struct macebus_attach_args { uint32_t maa_mace_intr; /* narrowing mace intr mask */ }; -void *macebus_intr_establish(int, uint32_t, int, int, int (*)(void *), +void *macebus_intr_establish(int, uint32_t, int, int (*)(void *), void *, const char *); void macebus_intr_disestablish(void *); diff --git a/sys/arch/sgi/pci/macepcibridge.c b/sys/arch/sgi/pci/macepcibridge.c index a7c156b15d3..532e304cbdc 100644 --- a/sys/arch/sgi/pci/macepcibridge.c +++ b/sys/arch/sgi/pci/macepcibridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macepcibridge.c,v 1.48 2017/05/11 15:47:45 visa Exp $ */ +/* $OpenBSD: macepcibridge.c,v 1.49 2018/12/03 13:46:30 visa Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -252,7 +252,7 @@ mace_pcibrattach(struct device *parent, struct device *self, void *aux) /* Register the PCI ERROR interrupt handler */ macebus_intr_establish(maa->maa_intr, maa->maa_mace_intr, - IST_LEVEL, IPL_HIGH, mace_pcibr_errintr, sc, sc->sc_dev.dv_xname); + IPL_HIGH, mace_pcibr_errintr, sc, sc->sc_dev.dv_xname); bcopy(&mace_pci_chipset, &sc->sc_pc, sizeof(mace_pci_chipset)); sc->sc_pc.pc_conf_v = sc; @@ -509,7 +509,7 @@ void * mace_pcibr_intr_establish(void *lcv, pci_intr_handle_t ih, int level, int (*func)(void *), void *arg, const char *name) { - return macebus_intr_establish(ih, 0, IST_LEVEL, level, func, arg, name); + return macebus_intr_establish(ih, 0, level, func, arg, name); } void |