Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1664818

[PATCH 0/3] printk/console: Simplify the logic and always have a preferred console

From Petr Mladek <pmladek@suse.com>
Newsgroups linux.kernel
Subject [PATCH 0/3] printk/console: Simplify the logic and always have a preferred console
Date 2017-06-13 15:00 +0200
Message-ID <tRTAl-859-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


The regression caused by the commit cf39bf58afdaabc0b ("printk: fix
double printing with earlycon") made me to investigate the console
registration code from many angles. And it was not an easy reading.

Especially the logic around the preferred console was somehow
twisted. The first two patches try to make it more straightforward.
The good thing is that they should not change the behavior.

Another problem was inconsistency in handling a fallback for
the preferred console. This is solved by the 3rd patch.
Also it solves a bug report related to "showconsole" that
I got 2 weeks ago. This fix slightly changes the order
of non-preferred consoles. But I believe that it is behind
the border when we need to take care of backward compatibility.

Sadly, we had to revert the fix of the duplicated output. It is
not solved by this patch set. I consider this a cosmetic issue.
A proper solution would be quite complicated. It might involve
rework of the console->match() functions and allow to match
aliases without side effects. Alternative solution would be
an additional command line option that would force handling
of CON_PRINTBUFFER flag and "never", "auto", or "always"
reply the buffer for newly registered consoles. But I am
not sure if it is worth it.


Petr Mladek (3):
  printk/console: Remove superfluous setting of has_preferred state
    value
  printk/console: Clean up logic around fallback console
  printk/console: Always have a preferred console

 kernel/printk/printk.c | 48 ++++++++++++++++++++----------------------------
 1 file changed, 20 insertions(+), 28 deletions(-)

-- 
1.8.5.6

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] printk/console: Simplify the logic and always have a preferred console Petr Mladek <pmladek@suse.com> - 2017-06-13 15:00 +0200
  [PATCH 2/3] printk/console: Clean up logic around fallback console Petr Mladek <pmladek@suse.com> - 2017-06-13 15:00 +0200
    Re: [PATCH 2/3] printk/console: Clean up logic around fallback  console Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-06-14 10:50 +0200
      Re: [PATCH 2/3] printk/console: Clean up logic around fallback  console Petr Mladek <pmladek@suse.com> - 2017-06-15 17:40 +0200
        Re: [PATCH 2/3] printk/console: Clean up logic around fallback  console Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-06-16 04:10 +0200
  [PATCH 3/3] printk/console: Always have a preferred console Petr Mladek <pmladek@suse.com> - 2017-06-13 15:00 +0200
    Re: [PATCH 3/3] printk/console: Always have a preferred console Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-06-14 11:20 +0200
      Re: [PATCH 3/3] printk/console: Always have a preferred console Petr Mladek <pmladek@suse.com> - 2017-06-15 17:00 +0200
        Re: [PATCH 3/3] printk/console: Always have a preferred console Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-06-16 04:10 +0200

csiph-web