diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2017-02-19 10:18:42 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2017-02-19 10:18:42 +0000 |
commit | 826195240bd0cb0866c0b424140e23ba59053d55 (patch) | |
tree | bf99073b978bcc5828326fe7a8bbacd3f9d3fd98 /sys/arch | |
parent | cbce13405c2ba27a23bd185de455609a2ada903d (diff) |
Suppress messages about spurious UART interrupts on MP systems.
A similar workaround was added in r1.8 of cn30xxuart.c because
of the same root cause.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/loongson/dev/com_leioc.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/arch/loongson/dev/com_leioc.c b/sys/arch/loongson/dev/com_leioc.c index 2c4399cee1a..da4d32d66da 100644 --- a/sys/arch/loongson/dev/com_leioc.c +++ b/sys/arch/loongson/dev/com_leioc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_leioc.c,v 1.1 2016/11/17 14:41:21 visa Exp $ */ +/* $OpenBSD: com_leioc.c,v 1.2 2017/02/19 10:18:41 visa Exp $ */ /* * Copyright (c) 2016 Visa Hankala @@ -38,6 +38,7 @@ int com_leioc_match(struct device *, void *, void *); void com_leioc_attach(struct device *, struct device *, void *); +int com_leioc_intr(void *); const struct cfattach com_leioc_ca = { sizeof(struct com_softc), com_leioc_match, com_leioc_attach @@ -90,10 +91,24 @@ com_leioc_attach(struct device *parent, struct device *self, void *aux) com_attach_subr(sc); - loongson3_intr_establish(LS3_IRQ_LPC, IPL_TTY, comintr, sc, + loongson3_intr_establish(LS3_IRQ_LPC, IPL_TTY, com_leioc_intr, sc, sc->sc_dev.dv_xname); } +int +com_leioc_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; +} + void leioc_cons_setup(void) { |