[PATCH] proposed changes to hvc_console for interrupt driven console
rsa at us.ibm.com
Thu Apr 1 08:16:37 EST 2004
The patch located at:
contains proposed changes to the hvc_console device driver. I would
appreciate any comments that could be given.
This patch adds an interrupt driven console I/O mechanism along side the
polling I/O mechanism that is already in place in the hvc_console
driver. The interrupt driven mechanism is initialized to execute in
place of the polling mechanism if the hardware supports virtual terminal
interrupts (i.e. Power5). The polling mechanism will continue to
function on legacy hardware.
Additionally this patch fixes a latent data loss bug when writing to the
driver's tty interface during massive console output. This bug is
easily reproducible on Power5 hardware using the HMC's terminal console
and a simple "ls -la /dev" output test.
There is one nuisance that I'd like some help looking at. I have
enabled the "Sleep-inside-spinlock checking" kernel config option. When
I boot a kernel with the patched driver I get the following output
message in the bootlog even though the console works fine:
Debug: sleeping function called from invalid context at mm/slab.c:1931
This seems to be due to requesting an irq inside of hvc_open() [patch
line 58]. I request the irq outside of a spinlock and the tty_open()
invoking function doesn't hold a spinlock when it calls hvc_open(). So
I don't see the problem.
Barring resolution of the previous problem I will checked these changes
into the Ameslab bitkeeper tree in the near future if there are no
The patch is against Linux-2.6.5-rc2-ames kernel source.
Ryan S. Arnold
IBM Linux Technology Center
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev