News: 0001585546

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux 6.18-rc2 Will Make Sure To Wipe Stale Information About AMD System Reboots

([AMD] 3 Hours Ago Linux 6.18-rc2)


Linux 6.16 introduced the ability to [1]report the cause of AMD system resets/reboots thanks to specialized information available on AMD Zen platforms for indicating the detected cause of previous resets. This is a handy addition and the information is automatically reported to the kernel log on the next system boot, but in some instances that information could be stale/inaccurate. Today's Linux 6.18-rc2 will fix that.

Sent out today were the [2]x86/urgent changes for Linux 6.18-rc2 , which is due to be released later today. There are a few x86 fixes for the week while worth mentioning is the change to reset the "why-the-system-rebooted" register on AMD Zen platforms to avoid stale bits around previous boots.

The fix by AMD engineer Rong Zhang [3]explains how sometimes the bits might not be cleared by the hardware or in some rare code paths the register not updated. In those cases it could lead to stale/inaccurate information being reported:

"The S5_RESET_STATUS register is parsed on boot and printed to kmsg. However, this could sometimes be misleading and lead to users wasting a lot of time on meaningless debugging for two reasons:

* Some bits are never cleared by hardware. It's the software's responsibility to clear them as per the Processor Programming Reference.

* Some rare hardware-initiated platform resets do not update the register at all.

In both cases, a previous reboot could leave its trace in the register, resulting in users seeing unrelated reboot reasons while debugging random reboots afterward.

Write the read value back to the register in order to clear all reason bits since they are write-1-to-clear while the others must be preserved."

This change is set to be merged today ahead of the Linux 6.18-rc2 release. It's also marked for back-porting to stable, which means going back to just the Linux 6.17 series as Linux 6.16 is already EOL.



[1] https://www.phoronix.com/news/AMD-Report-Previous-Reset-Cause

[2] https://lore.kernel.org/lkml/20251019110512.GAaPTF6LixGcvVysQ7@fat_crate.local/

[3] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=e6416c2dfe23c9a6fec881fda22ebb9ae486cfc5



The earth is like a tiny grain of sand, only much, much heavier.