All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] printk/console: Registration code cleanup - part 1
@ 2021-11-22 13:26 Petr Mladek
  2021-11-22 13:26 ` [PATCH 1/5] printk/console: Split out code that enables default console Petr Mladek
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Petr Mladek @ 2021-11-22 13:26 UTC (permalink / raw)
  To: John Ogness, Sergey Senozhatsky, Steven Rostedt
  Cc: Benjamin Herrenschmidt, linux-kernel, Petr Mladek

The console registration code has several twists that are hard to follow.
It is result of various features added over the last few decades.

I have already spent many days to understand all the effects and
the desired behavior. I am always scared to touch the console registration
code even after years working as printk maintainer.

There were several changes in the code that had to be reverted because
they caused regression, for example:

   + commit dac8bbbae1d0ccba96402 ("Revert "printk: fix double printing
     with earlycon")

   + commit c6c7d83b9c9e6a8b3e6d ("Revert "console: don't prefer first
     registered if DT specifies stdout-path")


This patchset removes the most tricky twists from my POV. I have worked
on it when time permitted since January. I have spent most of the time
writing the commit message, understanding, and explaining the effects.
I am not sure if I succeeded but it is time to send this.


Behavior change:

There is one behavior change caused by 4th patch. I consider it bug fix.
It should be acceptable. See the commit message for more details.


Future plans:

I already have additional 18 patches that do further clean up of
the console registration code. They still need more love.

I send this 5 patchset first because they are clear win from my POV.
And I wanted to do it by smaller steps.

I would appreciate if anyone double checks logic of the changes.
Anyway, we could put it into linux-next and see. I am quite
confident and optimistic ;-)


Petr Mladek (5):
  printk/console: Split out code that enables default console
  printk/console: Rename has_preferred_console to need_default_console
  printk/console: Remove unnecessary need_default_console manipulation
  printk/console: Remove need_default_console variable
  printk/console: Clean up boot console handling in register_console()

 kernel/printk/printk.c | 104 +++++++++++++++++++++++------------------
 1 file changed, 58 insertions(+), 46 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-12-06 13:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 13:26 [PATCH 0/5] printk/console: Registration code cleanup - part 1 Petr Mladek
2021-11-22 13:26 ` [PATCH 1/5] printk/console: Split out code that enables default console Petr Mladek
2021-11-23  2:10   ` Sergey Senozhatsky
2021-11-23 10:21     ` Petr Mladek
2021-11-22 13:26 ` [PATCH 2/5] printk/console: Rename has_preferred_console to need_default_console Petr Mladek
2021-11-23  2:15   ` Sergey Senozhatsky
2021-11-23 10:51     ` Petr Mladek
2021-11-22 13:26 ` [PATCH 3/5] printk/console: Remove unnecessary need_default_console manipulation Petr Mladek
2021-11-22 13:26 ` [PATCH 4/5] printk/console: Remove need_default_console variable Petr Mladek
2021-11-22 13:26 ` [PATCH 5/5] printk/console: Clean up boot console handling in register_console() Petr Mladek
2021-12-06 13:54 ` [PATCH 0/5] printk/console: Registration code cleanup - part 1 Petr Mladek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.