From: John Ogness <john.ogness@linutronix.de>
To: Jon Hunter <jonathanh@nvidia.com>, Petr Mladek <pmladek@suse.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: "Jiri Slaby" <jirislaby@kernel.org>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
linux-kernel@vger.kernel.org,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Hugo Villeneuve" <hvilleneuve@dimonoff.com>,
"Kees Cook" <kees@kernel.org>,
"Stepan Ionichev" <sozdayvek@gmail.com>,
"Xin Zhao" <jackzxcui1989@163.com>,
"Osama Abdelkader" <osama.abdelkader@gmail.com>,
"Fushuai Wang" <wangfushuai@baidu.com>,
"Marco Felsch" <m.felsch@pengutronix.de>,
linux-serial@vger.kernel.org,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH tty v11 1/2] serial: 8250: Switch to nbcon console, take 2
Date: Wed, 26 Aug 2026 00:08:46 +0206 [thread overview]
Message-ID: <87pkz56epl.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <d058012e-2be7-4e70-9c10-5e4c00a23b05@nvidia.com>
On 2026-08-25, Jon Hunter <jonathanh@nvidia.com> wrote:
>>> With this I see a little more output on the console, but it still
>>> appears to hang later and never fully boots.
>>>
>>> Boot log here: https://pastebin.com/Xe1vmeUj
>>
>> Thanks, this information is helpful. Below is another hack, to be used
>> on the unmodified linux-next. For whatever reason, I think the queuing
>> of irqwork is causing problems. Perhaps the irqwork is actually firing
>> even though interrupts are supposed to be disabled here.
>>
>> The following hack will disable the queuing during the cpuidle. Please
>> give this a try:
>>
>> ===== BEGIN CPUIDLE HACK =====
>> diff --git a/drivers/cpuidle/cpuidle-tegra.c b/drivers/cpuidle/cpuidle-tegra.c
>> index aca907a62bb5d..1dca9d6defbff 100644
>> --- a/drivers/cpuidle/cpuidle-tegra.c
>> +++ b/drivers/cpuidle/cpuidle-tegra.c
>> @@ -226,6 +226,7 @@ static int tegra_cpuidle_adjust_state_index(int index, unsigned int cpu)
>> return index;
>> }
>>
>> +extern bool console_irqwork_blocked;
>> static __cpuidle int tegra_cpuidle_enter(struct cpuidle_device *dev,
>> struct cpuidle_driver *drv,
>> int index)
>> @@ -238,6 +239,8 @@ static __cpuidle int tegra_cpuidle_enter(struct cpuidle_device *dev,
>> if (dev->states_usage[index].disable)
>> return -1;
>>
>> + console_irqwork_blocked = true;
>> +
>> if (index == TEGRA_C1) {
>> if (do_rcu)
>> ct_cpuidle_enter();
>> @@ -256,6 +259,8 @@ static __cpuidle int tegra_cpuidle_enter(struct cpuidle_device *dev,
>> index = ret;
>> }
>>
>> + console_irqwork_blocked = false;
>> +
>> return index;
>> }
>> ===== END CPUIDLE HACK =====
>
> Yes that does boot.
Your results surprise me a bit because in previous attempts it seemed
you were also getting hangs related to printk's not produced within
cpuidle. This would lead me to believe that cpuidle is entered while
irq_work from a directly preceeding printk (from outside cpuidle) was
pending and caused a problem.
Does this hack really work reliably, without using keep_bootcon or any
other patches?
Also, although this hack will avoid queuing irq_work from within
cpuidle, it does not prevent the 8250 console driver from queuing
irq_work for MSR handling during atomic printing. There is no generic
console callback to deal with that (other than suspending the console).
I suspect it is a general irq_work problem on tegra regarding
suspend/cpuidle. Really the problem should be fixed there. But I would
need hardware to investigate the issue.
As for this 8250 "switch to nbcon" series, I am uncertain how to
proceed. Is it really printk's job (and, by extension, the console
driver's job) to decipher when it is allowed to queue irq_work?
John
next prev parent reply other threads:[~2026-08-25 22:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260729120439.281252-1-john.ogness@linutronix.de>
[not found] ` <20260729120439.281252-2-john.ogness@linutronix.de>
2026-08-18 6:25 ` [PATCH tty v11 1/2] serial: 8250: Switch to nbcon console, take 2 Jon Hunter
2026-08-18 7:01 ` Sebastian Andrzej Siewior
2026-08-18 7:51 ` Petr Mladek
2026-08-18 12:19 ` Jon Hunter
2026-08-18 15:53 ` Petr Mladek
2026-08-20 9:15 ` Jon Hunter
2026-08-20 12:40 ` John Ogness
2026-08-20 23:37 ` Jon Hunter
2026-08-22 0:32 ` John Ogness
2026-08-24 21:26 ` Jon Hunter
2026-08-25 13:58 ` John Ogness
2026-08-25 15:35 ` Jon Hunter
2026-08-25 22:02 ` John Ogness [this message]
2026-08-26 7:35 ` Petr Mladek
2026-08-26 7:59 ` Sebastian Andrzej Siewior
2026-08-20 11:20 ` John Ogness
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=87pkz56epl.fsf@jogness.linutronix.de \
--to=john.ogness@linutronix.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=hvilleneuve@dimonoff.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jackzxcui1989@163.com \
--cc=jirislaby@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=osama.abdelkader@gmail.com \
--cc=pmladek@suse.com \
--cc=sozdayvek@gmail.com \
--cc=wangfushuai@baidu.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox