qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] PATCH: serial.c


From: Tristan Gingold
Subject: Re: [Qemu-devel] PATCH: serial.c
Date: Fri, 4 May 2007 16:04:13 +0200


On May 4, 2007, at 3:34 PM, Wessel, Jason wrote:

Tristan,

I do not believe that is actually the problem, and arguably QEMU is
correct with timing accuracy set aside. The root of the issue is a more of a timing problem because the clear/set can happen atomically in QEMU with respect to the cpu clock vs the real hardware which takes multiple
clock cycles for this to happen.  Even Linux can fall victim to this
with heavy printk (if you have ever seen the message "too much work for
interrupt....").
I think this is a different issue: QEMU serial baudrate is almost infinite and linux interrupt
handler detects IRQ storm IIRC.

You should instead consider fixing the BSP i8250Sio.c, because it clears
reads the iir and jumps out of the main serial loop if there is if it
has done enough work, vs checking if it has done enough work and jumping
out of the loop before reading the iir.
I don't agree because IIR is not cleared when read.
Yes the handler first reads IIR and then jump out of the loop if it has done enough work but the interrupt is not cleared (because the xmit register is still empty) and cpu should enter into the interrupt
function as soon as the interrupts are still enabled.

IMHO changing the code (ie inverting the tests) is a (valuable) work- around.

Tristan.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]