freebsd-dev/sys/powerpc
John Birrell 3d068827c2 Add a cnputs() function to write a string to the console with
a lock to prevent interspersed strings written from different CPUs
at the same time.

To avoid putting a buffer on the stack or having to malloc one,
space is incorporated in the per-cpu structure. The buffer
size if 128 bytes; chosen because it's the next power of 2 size
up from 80 characters.

String writes to the console are buffered up the end of the line
or until the buffer fills. Then the buffer is flushed to all
console devices.

Existing low level console output via cnputc() is unaffected by
this change. ithread calls to log() are also unaffected to avoid
blocking those threads.

A minor change to the behaviour in a panic situation is that
console output will still be buffered, but won't be written to
a tty as before. This should prevent interspersed panic output
as a number of CPUs panic before we end up single threaded
running ddb.

Reviewed by:	scottl, jhb
MFC after:	2 weeks
2006-11-01 04:54:51 +00:00
..
aim Make KSE a kernel option, turned on by default in all GENERIC 2006-10-26 21:42:22 +00:00
compile
conf Remove the KSE option now that it's in DEFAULTS on these arches/machines. 2006-10-26 22:11:35 +00:00
include PR: 2006-10-04 21:37:10 +00:00
ofw - Make pcib_devclass private to sys/dev/pci/pci_pci.c and change all the 2006-01-06 19:22:19 +00:00
powermac Set the rid for any resource obtained from rman_resource_reserve. 2006-04-20 04:19:10 +00:00
powerpc Add a cnputs() function to write a string to the console with 2006-11-01 04:54:51 +00:00
psim Turn this into an uart(4) bus attachment. 2006-07-26 19:39:55 +00:00