[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKMK7uHO43-O+bPkJMhuv5HNh-PS7+wm6==n-7VQfRu2zq8xvQ@mail.gmail.com>
Date: Sun, 24 May 2020 12:01:20 +0200
From: Daniel Vetter <daniel.vetter@...ll.ch>
To: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc: Alper Nebi Yasak <alpernebiyasak@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>, Petr Mladek <pmladek@...e.com>,
linux-serial@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Arvind Sankar <nivedita@...m.mit.edu>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
"David S. Miller" <davem@...emloft.net>,
Feng Tang <feng.tang@...el.com>
Subject: Re: [RFC PATCH v2 1/3] printk: Add function to set console to
preferred console's driver
On Wed, May 13, 2020 at 7:35 AM Sergey Senozhatsky
<sergey.senozhatsky@...il.com> wrote:
>
> On (20/04/30 19:14), Alper Nebi Yasak wrote:
> [..]
> > +int update_console_to_preferred(void)
> > +{
> > + struct console_cmdline *c = NULL;
> > + struct console *con = NULL;
> > + struct console *tmp = NULL;
> > +
> > + if (preferred_console >= 0)
> > + c = &console_cmdline[preferred_console];
> > +
> > + if (!c || !c->name[0])
> > + return 0;
> > +
> > + for_each_console(con) {
> > + if (!con->next || !(con->next->flags & CON_ENABLED))
> > + continue;
> > + if (strcmp(c->name, con->next->name) != 0)
> > + continue;
>
> This matches the consoles by exact name. Consoles can have aliases,
> but matching by alias is rather complex and it has some side effects.
>
> Let me Cc more people on this. VT has a console takeover logic,
> I wonder if we can extend the takeover code somehow.
>
> Daniel, any thoughts?
Apologies for late reply, but nope, no thoughts. I have some ideas for
the locking in the console subsystem, but that's just to untangle it
from gpu drivers as much as possible. Otherwise I'm trying to stay
away from it as far as I can :-)
Cheers, Daniel
>
> https://lore.kernel.org/lkml/20200430161438.17640-1-alpernebiyasak@gmail.com
>
> -ss
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
Powered by blists - more mailing lists