Re: [PATCH 3/3] riscv: Allow to enable PREEMPT_RT.

From: John Ogness
Date: Thu Oct 10 2024 - 04:58:25 EST


On 2024-10-09, Palmer Dabbelt <palmer@xxxxxxxxxxx> wrote:
> and it breaks my boot test script. Looks like it's actually working
> mostly fine, I'm just not getting the "reboot: System halted" message
> that I'm checking for to make sure the system actually went down
> cleanly.
>
> I'm not sure if this is expected behavior in RT land, or if we've got
> some sort of bug. It sort of smells like we're losing the last printk()
> line...

For PREEMPT_RT, the console printing is done via a thread. On
shutdown/reboot, the threads are no longer active to print the final
messages. There is a new console driver type (NBCON) that is available
for this. However, currently in mainline there are no console drivers
that have been converted to NBCON yet.

I am currently working [0] to get an NBCON console driver for the 8250
uart in mainline. But that will not help your case if you are using some
other console driver.

John Ogness

[0] https://lore.kernel.org/lkml/20240913140538.221708-1-john.ogness@xxxxxxxxxxxxx