This patch fixes the "too much work for irq4" problems caused by the fact that
we never set the UART_IIR_NO_INT flag in the emulation layer. This makes the
interrupt handler in the guest kernel process as much as possible which
triggers a warning.
Signed-off-by: Pekka Enberg <penberg@kernel.org>
uint8_t mcr;
uint8_t lsr;
uint8_t scr;
+
+ uint8_t counter;
};
static struct serial8250_device devices[] = {
[1] = {
.iobase = 0x2f8,
.irq = 3,
+
+ .iir = UART_IIR_NO_INT,
},
/* ttyS2 */
[2] = {
.iobase = 0x3e8,
.irq = 4,
+
+ .iir = UART_IIR_NO_INT,
},
};
}
fflush(stdout);
+ if (dev->counter++ > 10) {
+ dev->iir = UART_IIR_NO_INT;
+ dev->counter = 0;
+ }
+
break;
}
case UART_IER:
switch (offset) {
case UART_TX:
if (dev->lsr & UART_LSR_DR) {
+ dev->iir = UART_IIR_NO_INT;
+
dev->lsr &= ~UART_LSR_DR;
ioport__write8(data, dev->thr);
}