On Fri, 11 Apr 2014, Geert Uytterhoeven wrote:
>
> > +#ifdef CONFIG_MVME16X
> > +static struct console early_console_instance = {
> > +#else
> > static struct console early_console_instance __initdata = {
> > +#endif
>
> > + if (MACH_IS_MVME16x)
> > + early_console_instance.write = mvme16x_cons_write;
> > + else
> > + early_console_instance.write = debug_cons_write;
>
> > + if (!early_console || MACH_IS_MVME16x)
> > return 0;
>
> I don't like these tests for MVME16X in (presumably) generic code.
> Is there a way we can avoid this?
>
Some alternative approaches:
1) Somehow make the tests more precise: "are we running on MVME?"
becomes "is the console output code not in .init.text?"
I don't know that this is feasible.
2) Mark the MVME console output routine __init (making it less useful).
If we make all users of earlyprintk lose the boot console at
__late_initcall() time, then we can call mvme16x_cons_write() from
debug_cons_write().
3) Move all of the head.S console code and data out of .init sections, for
all platforms. Not practical I think.
4) If the bloat is acceptable, maybe we could scrap the __init attributes
for early_console_instance and debug_cons_write(). And call
mvme16x_cons_write() from debug_cons_write(). Then hide all these
routines and the __late_initcall within
#if defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || ...
#endif
Thoughts?
--
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html