x86/reboot: Add call to do_kernel_restart()
PATCH v2 1/1 x86/reboot: Add call to do_kernel_restart()
SoC devices like the Intel / MaxLinear Lightning Mountain must be reset by the Reset Control Unit (RCU) instead of using "normal" x86 mechanisms like ACPI, BIOS, KBD, etc.
Therefore, the RCU driver (reset-intel-gw) registers a restart handler which triggers the global reset signal.
Unfortunately, this is of no use as long as the restart chain is not processed during reboot on x86 systems.
That's why do_kernel_restart() must be called when a reboot is performed. This has long been common practice for other architectures.
---
Changes in v2:
- Updated the commit message.
- Link to v1: https://lore.kernel.org/r/[email protected]
--- arch/x86/kernel/reboot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/kernel/reboot.c +4 -1
@@ -773,12 +773,15 @@ static void __machine_emergency_restart(int emergency) machine_ops.emergency_restart (); } -static void native_machine_restart (char *__unused) +static void native_machine_restart (char *command) {pr_notice ("machine restart\n" );if (!reboot_force)machine_shutdown (); + +do_kernel_restart (command); +__machine_emergency_restart (0 ); }
---
base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
change-id: 20260220-x86_do_kernel_restart-ac125c71c5c3
Best regards,
Signature · 1 line
Martin Schiller <[email protected]>
[tip: x86/misc] x86/reboot: Execute the kernel restart handler upon machine restart
The following commit has been merged into the x86/misc branch of tip:
The following commit has been merged into the x86/misc branch of tip:
Commit-ID: ae715818c5d7e486fe97806a734205cea63921e2 Gitweb: https://git.kernel.org/tip/ae715818c5d7e486fe97806a734205cea63921e2 Author: Martin Schiller <[email protected]> AuthorDate: Wed, 25 Feb 2026 08:46:09 +01:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Thu, 05 Mar 2026 16:22:43 +01:00
x86/reboot: Execute the kernel restart handler upon machine restart
SoC devices like the Intel / MaxLinear Lightning Mountain must be reset by the Reset Control Unit (RCU) instead of using "normal" x86 mechanisms like ACPI, BIOS, KBD, etc.
Therefore, the RCU driver (reset-intel-gw) registers a restart handler which triggers the global reset signal.
Unfortunately, this is of no use as long as the restart chain is not processed during reboot on x86 systems.
That's why do_kernel_restart() must be called when a reboot is performed. This has long been common practice for other architectures.
[ bp: Massage commit message. ]
--- arch/x86/kernel/reboot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/kernel/reboot.c +4 -1
@@ -773,12 +773,15 @@ static void __machine_emergency_restart(int emergency) machine_ops.emergency_restart (); } -static void native_machine_restart (char *__unused) +static void native_machine_restart (char *command) {pr_notice ("machine restart\n" );if (!reboot_force)machine_shutdown (); + +do_kernel_restart (command); +__machine_emergency_restart (0 ); }