From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> To: Petr Mladek <pmladek@suse.com> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>, David Gow <davidgow@google.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Shuah Khan <skhan@linuxfoundation.org>, Brendan Higgins <brendanhiggins@google.com>, KUnit Development <kunit-dev@googlegroups.com>, "open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@vger.kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Guenter Roeck <linux@roeck-us.net>, Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>, linux-um <linux-um@lists.infradead.org> Subject: Re: kunit stopped working Date: Thu, 7 Jan 2021 16:15:04 +0900 [thread overview] Message-ID: <X/a0+Cb6xFZOEk7x@jagdpanzerIV.localdomain> (raw) In-Reply-To: <X/W2sl7RMvfaV4Ru@alley> On (21/01/06 14:10), Petr Mladek wrote: > > > > > > But I am not completely sure that it is the right solution. > > > > Wow, hmm, puzzled. Why does it help? > > I have been as well. But it seems that I got it, see below. Thanks! [..] > > Alternative solution is to ignore ttynull as the fallback console > in register_console(). I mean the following: I personally would prefer a very explicit fix (IOW, the patch below), rather than relying on some initcall trickery (which has already failed on us) > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index ffdd0dc7ec6d..cdb77903b0af 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -2816,8 +2816,12 @@ void register_console(struct console *newcon) > * See if we want to use this console driver. If we > * didn't select a console we take the first one > * that registers here. > + * > + * Ignore ttynull console. It should be used only > + * when explicitly configured or as an ultimate > + * fallback when no better console gets registered at all. > */ > - if (!has_preferred_console) { > + if (!has_preferred_console && strcmp(newcon->name, "ttynull") != 0) { > if (newcon->index < 0) > newcon->index = 0; > if (newcon->setup == NULL || So IIUC in case of ttynull fallback (console= ) we still end up setting CON_CONSDEV on nulltty console, but we do it in try_enable_new_console(). Feel free to add Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> -ss
WARNING: multiple messages have this Message-ID (diff)
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> To: Petr Mladek <pmladek@suse.com> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>, "open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@vger.kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Brendan Higgins <brendanhiggins@google.com>, linux-um <linux-um@lists.infradead.org>, Sergey Senozhatsky <sergey.senozhatsky@gmail.com>, David Gow <davidgow@google.com>, Shuah Khan <skhan@linuxfoundation.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Guenter Roeck <linux@roeck-us.net>, KUnit Development <kunit-dev@googlegroups.com> Subject: Re: kunit stopped working Date: Thu, 7 Jan 2021 16:15:04 +0900 [thread overview] Message-ID: <X/a0+Cb6xFZOEk7x@jagdpanzerIV.localdomain> (raw) In-Reply-To: <X/W2sl7RMvfaV4Ru@alley> On (21/01/06 14:10), Petr Mladek wrote: > > > > > > But I am not completely sure that it is the right solution. > > > > Wow, hmm, puzzled. Why does it help? > > I have been as well. But it seems that I got it, see below. Thanks! [..] > > Alternative solution is to ignore ttynull as the fallback console > in register_console(). I mean the following: I personally would prefer a very explicit fix (IOW, the patch below), rather than relying on some initcall trickery (which has already failed on us) > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index ffdd0dc7ec6d..cdb77903b0af 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -2816,8 +2816,12 @@ void register_console(struct console *newcon) > * See if we want to use this console driver. If we > * didn't select a console we take the first one > * that registers here. > + * > + * Ignore ttynull console. It should be used only > + * when explicitly configured or as an ultimate > + * fallback when no better console gets registered at all. > */ > - if (!has_preferred_console) { > + if (!has_preferred_console && strcmp(newcon->name, "ttynull") != 0) { > if (newcon->index < 0) > newcon->index = 0; > if (newcon->setup == NULL || So IIUC in case of ttynull fallback (console= ) we still end up setting CON_CONSDEV on nulltty console, but we do it in try_enable_new_console(). Feel free to add Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> -ss _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um
next prev parent reply other threads:[~2021-01-07 7:16 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-21 14:43 kunit stopped working Andy Shevchenko 2020-12-21 14:45 ` Andy Shevchenko 2020-12-21 18:37 ` Shuah Khan 2020-12-21 19:27 ` Andy Shevchenko 2020-12-21 19:40 ` Andy Shevchenko 2020-12-21 20:03 ` Andy Shevchenko 2020-12-22 1:43 ` David Gow 2020-12-22 1:43 ` David Gow 2020-12-22 7:26 ` David Gow 2020-12-22 7:26 ` David Gow 2020-12-22 13:34 ` Andy Shevchenko 2020-12-22 13:34 ` Andy Shevchenko 2020-12-27 19:58 ` Brendan Higgins 2020-12-27 19:58 ` Brendan Higgins 2021-01-05 16:17 ` Petr Mladek 2021-01-05 16:17 ` Petr Mladek 2021-01-05 16:49 ` Petr Mladek 2021-01-05 16:49 ` Petr Mladek 2021-01-06 4:04 ` Sergey Senozhatsky 2021-01-06 4:04 ` Sergey Senozhatsky 2021-01-06 13:10 ` Petr Mladek 2021-01-06 13:10 ` Petr Mladek 2021-01-07 7:15 ` Sergey Senozhatsky [this message] 2021-01-07 7:15 ` Sergey Senozhatsky
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=X/a0+Cb6xFZOEk7x@jagdpanzerIV.localdomain \ --to=sergey.senozhatsky@gmail.com \ --cc=andriy.shevchenko@linux.intel.com \ --cc=brendanhiggins@google.com \ --cc=davidgow@google.com \ --cc=gregkh@linuxfoundation.org \ --cc=kunit-dev@googlegroups.com \ --cc=linux-kselftest@vger.kernel.org \ --cc=linux-um@lists.infradead.org \ --cc=linux@roeck-us.net \ --cc=pmladek@suse.com \ --cc=sergey.senozhatsky.work@gmail.com \ --cc=skhan@linuxfoundation.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.