Re: [Linux-fbdev-devel] [PATCH] VT locking

From: Geert Uytterhoeven
Date: Tue Jan 06 2004 - 11:35:09 EST


On Tue, 6 Jan 2004, Benjamin Herrenschmidt wrote:
> --- linux-2.5/kernel/printk.c 2004-01-06 10:07:08.640948328 +1100
> +++ linuxppc-2.5-benh/kernel/printk.c 2003-12-31 17:01:25.000000000 +1100
> @@ -479,6 +493,9 @@
> char *p;
> static char printk_buf[1024];
> static int log_level_unknown = 1;
> +#ifdef CONFIG_BOOTX_TEXT
> + extern int force_printk_to_btext;
> +#endif
>
> if (oops_in_progress) {
> /* If a crash is occurring, make sure we can't deadlock */
> @@ -494,6 +511,10 @@
> va_start(args, fmt);
> printed_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
> va_end(args);
> +#ifdef CONFIG_BOOTX_TEXT
> + if (force_printk_to_btext)
> + btext_drawstring(printk_buf);
> +#endif /* CONFIG_BOOTX_TEXT */

Looks like a nice opportunity to introduce an arch-specific printk() stub:

void *arch_printk(const char *args);

if (arch_printk)
arch_printk(printk_buf);

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/