summaryrefslogtreecommitdiff
path: root/sys/arch/octeon
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2016-04-14 13:49:28 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2016-04-14 13:49:28 +0000
commitf391e3c21cafdf6008377148fb58cf93405aeba0 (patch)
tree157f3f90472842e314828ab298815d91d03aaa3b /sys/arch/octeon
parent597cda2a5200ad191756010d6a34129a680910f3 (diff)
Wrap comintr() so that the interrupt handler always returns non-zero.
This prevents console clutter about spurious UART interrupts.
Diffstat (limited to 'sys/arch/octeon')
-rw-r--r--sys/arch/octeon/dev/cn30xxuart.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/arch/octeon/dev/cn30xxuart.c b/sys/arch/octeon/dev/cn30xxuart.c
index bfe37114085..8eae942454b 100644
--- a/sys/arch/octeon/dev/cn30xxuart.c
+++ b/sys/arch/octeon/dev/cn30xxuart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cn30xxuart.c,v 1.7 2015/02/05 23:29:33 uebayasi Exp $ */
+/* $OpenBSD: cn30xxuart.c,v 1.8 2016/04/14 13:49:27 visa Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -46,6 +46,7 @@
int cn30xxuart_probe(struct device *, void *, void *);
void cn30xxuart_attach(struct device *, struct device *, void *);
+int cn30xxuart_intr(void *);
struct cfattach cn30xxuart_ca = {
sizeof(struct com_softc), cn30xxuart_probe, cn30xxuart_attach
@@ -129,10 +130,24 @@ cn30xxuart_attach(struct device *parent, struct device *self, void *aux)
com_attach_subr(sc);
- octeon_intr_establish(uba->uba_intr, IPL_TTY, comintr,
+ octeon_intr_establish(uba->uba_intr, IPL_TTY, cn30xxuart_intr,
(void *)sc, sc->sc_dev.dv_xname);
}
+int
+cn30xxuart_intr(void *arg)
+{
+ comintr(arg);
+
+ /*
+ * Always return non-zero to prevent console clutter about spurious
+ * interrupts. comstart() enables the transmitter holding register
+ * empty interrupt before adding data to the FIFO, which can trigger
+ * a premature interrupt on the primary CPU in a multiprocessor system.
+ */
+ return 1;
+}
+
/*
* Early console routines.
*/