aboutsummaryrefslogtreecommitdiff
path: root/include/linux/console.h
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-06-25 05:47:40 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 10:01:05 -0700
commit76a8ad293912cd2f01eca075d80cd0ddec30c627 (patch)
tree1ff683dcd5b1351b403d3efe701d0dd9eddcd773 /include/linux/console.h
parent8ae6e163c1b637e1cb125613726ffbd31ca44fdf (diff)
[PATCH] Make printk work for really early debugging
Currently printk is no use for early debugging because it refuses to actually print anything to the console unless cpu_online(smp_processor_id()) is true. The stated explanation is that console drivers may require per-cpu resources, or otherwise barf, because the system is not yet setup correctly. Fair enough. However some console drivers might be quite happy running early during boot, in fact we have one, and so it'd be nice if printk understood that. So I added a flag (which I would have called CON_BOOT, but that's taken) called CON_ANYTIME, which indicates that a console is happy to be called anytime, even if the cpu is not yet online. Tested on a Power 5 machine, with both a CON_ANYTIME driver and a bogus console driver that BUG()s if called while offline. No problems AFAICT. Built for i386 UP & SMP. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/console.h')
-rw-r--r--include/linux/console.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/console.h b/include/linux/console.h
index 08734e660d4..d0f8a800949 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -87,6 +87,7 @@ void give_up_console(const struct consw *sw);
#define CON_CONSDEV (2) /* Last on the command line */
#define CON_ENABLED (4)
#define CON_BOOT (8)
+#define CON_ANYTIME (16) /* Safe to call when cpu is offline */
struct console
{