Thread (3 messages) 3 messages, 3 authors, 2014-12-28

Re: rfc: remove early_printk from a few arches? (blackfin, m68k, mips)

From: Måns Rullgård <hidden>
Date: 2014-12-19 10:33:54
Also in: linux-m68k, linux-mips, lkml

Possibly related (same subject, not in this thread)

Joe Perches [off-list ref] writes:
On Fri, 2014-12-19 at 01:43 +0000, Måns Rullgård wrote:
quoted
What exactly are you proposing to remove?
Optionally compile out
kernel/printk/printk.c:early_printk()
even if CONFIG_EARLY_PRINTK is enabled.
quoted
I see no unused code related
to early printk (in any variant) under arch/mips.
I think there could be yet another CONFIG option
to specifically enable the early_printk function
for the arches that use it.
Why bother?  On MIPS it would save 132 bytes of compiled code.
The kernel/printk/early_printk() function seems
used only by arm/microblaze/tile/x86.
Rather than introduce more config complexity, you could try to remove
the 7 remaining uses of early_printk().

- arch/arm/mach-socfpga
  Single early_printk("Early printk initialized\n") call serving no
  apparent purpose can probably be safely deleted.  Since there are no
  other early_printk() calls, this information seems rather useless.

- arch/microblaze, arch/tile, arch/x86
  These all do a register_console() for the early console, so regular
  printk() should work.  Moreover, x86 allows multiple early consoles,
  but calling early_printk() will only output to the last one specified.

-- 
Måns Rullgård
mans@mansr.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help