On Fri, Mar 8, 2013 at 5:11 PM, Paul Gortmaker
<[email protected]> wrote:
> From: Thomas Gleixner <[email protected]>
>
> The early console implementations are the same all over the place. Move
> the print function to kernel/printk and get rid of the copies.
>
> Signed-off-by: Thomas Gleixner <[email protected]>
> Cc: Russell King <[email protected]>
> Acked-by: Mike Frysinger <[email protected]>
> Cc: Michal Simek <[email protected]>
> Cc: Ralf Baechle <[email protected]>
> Cc: Benjamin Herrenschmidt <[email protected]>
> Cc: Paul Mundt <[email protected]>
> Cc: "David S. Miller" <[email protected]>
> Cc: Chris Metcalf <[email protected]>
> Cc: Richard Weinberger <[email protected]>
> Reviewed-by: Ingo Molnar <[email protected]>
> Signed-off-by: Paul Gortmaker <[email protected]>
> ---
>
> [v3: drop sparc bits as suggested by tglx, redo build tests on sparc
> sparc32, Randy's randconfig, ppc, mips, arm...]
>
> [v2: essentially unchanged since v1, so I've left the acked/reviewed
> tags. There was a compile fail[1] for a randconfig with EARLY_PRINTK=y
> and PRINTK=n, because the early_console struct and early_printk calls
> were nested within an #ifdef CONFIG_PRINTK -- moving that whole block
> exactly as-is to be outside the #ifdef CONFIG_PRINTK fixes the randconfig
> and still works for everyday sane configs too.]
> [1] http://marc.info/?l=linux-next&m=136219350914998&w=2
> --- a/arch/sh/kernel/sh_bios.c
> +++ b/arch/sh/kernel/sh_bios.c
> @@ -144,8 +144,6 @@ static struct console bios_console = {
> .index = -1,
> };
>
> -static struct console *early_console;
This one wasn't protected by #ifdef CONFIG_EARLY_PRINTK...
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -1724,6 +1717,29 @@ static size_t cont_print_text(char *text, size_t size)
> { return 0; }
>
> #endif /* CONFIG_PRINTK */
>
> +#ifdef CONFIG_EARLY_PRINTK
> +struct console *early_console;
... but this one is, causing
arch/sh/kernel/built-in.o: In function `setup_early_printk':
sh_bios.c:(.init.text+0xc80): undefined reference to `early_console'
Cfr. e.g. http://kisskb.ellerman.id.au/kisskb/buildresult/8433720/
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/