[PATCH 4/4] Uartlite: speed up console output

Peter Korsgaard jacmet at sunsite.dk
Thu Nov 1 01:45:02 EST 2007

>>>>> "Grant" == Grant Likely <grant.likely at secretlab.ca> writes:


 Grant> From: Grant Likely <grant.likely at secretlab.ca>
 Grant> Change the wait_tx routine to call cpu_relax() instead of udelay() to
 Grant> reduce console output latency and test for the TXFULL bit instead of
 Grant> TXEMPTY.  That way the FIFO doesn't need to by 100% flushed before
 Grant> writing the next character.

Sorry for the slow response - I had a misunderstanding with the
phone company, and I'm now without inet :/

Looks good to me. I gave it a quick spin to check the speed

[    0.453101] Freeing unused kernel memory: 52k init

[    0.433686] Freeing unused kernel memory: 52k init

So it shaves off ~20ms (~4%) of bootup.

It ofcause means that the console routines return before the data is
actually transmitted on the wire, but I guess you have to screw
seriously up for the UART to die before emptying it's FIFO.

 Grant> Signed-off-by: Grant Likely <grant.likely at secretlab.ca>

Acked-by: Peter Korsgaard <jacmet at sunsite.dk>

Bye, Peter Korsgaard

More information about the Linuxppc-dev mailing list