* [PATCH] x86/reboot: Add call to do_kernel_restart()
@ 2026-02-20 12:29 Martin Schiller
2026-02-25 5:32 ` Borislav Petkov
0 siblings, 1 reply; 4+ messages in thread
From: Martin Schiller @ 2026-02-20 12:29 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin
Cc: linux-kernel, Florian Eckert, Martin Schiller
SoC devices like the Intel / MaxLinear Lightning Mountain must be reset
by the 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.
So we must call do_kernel_restart() when a reboot is performed. This has
long been common practice for other architectures.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
---
arch/x86/kernel/reboot.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 6032fa9ec753ce938b1b523a7eab76370ee802de..ddff25a1efbe71171ca22ec21f50541517c1a464 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -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,
--
Martin Schiller <ms@dev.tdt.de>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/reboot: Add call to do_kernel_restart()
2026-02-20 12:29 [PATCH] x86/reboot: Add call to do_kernel_restart() Martin Schiller
@ 2026-02-25 5:32 ` Borislav Petkov
2026-02-25 6:27 ` Martin Schiller
0 siblings, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2026-02-25 5:32 UTC (permalink / raw)
To: Martin Schiller
Cc: Thomas Gleixner, Ingo Molnar, Dave Hansen, x86, H. Peter Anvin,
linux-kernel, Florian Eckert
On Fri, Feb 20, 2026 at 01:29:01PM +0100, Martin Schiller wrote:
> SoC devices like the Intel / MaxLinear Lightning Mountain must be reset
> by the RCU instead of using "normal" x86 mechanisms like ACPI, BIOS,
Read-Copy-Update?
I'm relatively sure you don't mean that.
> 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.
>
> So we must call do_kernel_restart() when a reboot is performed. This has
Who's "we"?
> long been common practice for other architectures.
>
> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
> ---
> arch/x86/kernel/reboot.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
> index 6032fa9ec753ce938b1b523a7eab76370ee802de..ddff25a1efbe71171ca22ec21f50541517c1a464 100644
> --- a/arch/x86/kernel/reboot.c
> +++ b/arch/x86/kernel/reboot.c
> @@ -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);
I guess we can do that - the other arches do it already...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/reboot: Add call to do_kernel_restart()
2026-02-25 5:32 ` Borislav Petkov
@ 2026-02-25 6:27 ` Martin Schiller
2026-02-25 7:25 ` Borislav Petkov
0 siblings, 1 reply; 4+ messages in thread
From: Martin Schiller @ 2026-02-25 6:27 UTC (permalink / raw)
To: Borislav Petkov
Cc: Thomas Gleixner, Ingo Molnar, Dave Hansen, x86, H. Peter Anvin,
linux-kernel, Florian Eckert
On 2026-02-25 06:32, Borislav Petkov wrote:
> On Fri, Feb 20, 2026 at 01:29:01PM +0100, Martin Schiller wrote:
>> SoC devices like the Intel / MaxLinear Lightning Mountain must be
>> reset
>> by the RCU instead of using "normal" x86 mechanisms like ACPI, BIOS,
>
> Read-Copy-Update?
Sorry, I forgot to explain the abbreviation.
RCU is short for Reset Control Unit. That's what it's called in the
Intel / MaxLinear world.
>
> I'm relatively sure you don't mean that.
>
>> 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.
>>
>> So we must call do_kernel_restart() when a reboot is performed. This
>> has
>
> Who's "we"?
I don't mean anyone in particular. I just wanted to express that the
function must be called.
>
>> long been common practice for other architectures.
>>
>> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
>> ---
>> arch/x86/kernel/reboot.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
>> index
>> 6032fa9ec753ce938b1b523a7eab76370ee802de..ddff25a1efbe71171ca22ec21f50541517c1a464
>> 100644
>> --- a/arch/x86/kernel/reboot.c
>> +++ b/arch/x86/kernel/reboot.c
>> @@ -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);
>
> I guess we can do that - the other arches do it already...
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/reboot: Add call to do_kernel_restart()
2026-02-25 6:27 ` Martin Schiller
@ 2026-02-25 7:25 ` Borislav Petkov
0 siblings, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2026-02-25 7:25 UTC (permalink / raw)
To: Martin Schiller
Cc: Thomas Gleixner, Ingo Molnar, Dave Hansen, x86, H. Peter Anvin,
linux-kernel, Florian Eckert
On February 25, 2026 6:27:51 AM UTC, Martin Schiller <ms@dev.tdt.de> wrote:
>
>I don't mean anyone in particular. I just wanted to express that the
>function must be called.
Then please correct your commit message to not have ambiguous pronouns but rather use passive voice, concentrating solely on the need for the change.
Thx.
--
Small device. Typos and formatting crap
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-25 7:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20 12:29 [PATCH] x86/reboot: Add call to do_kernel_restart() Martin Schiller
2026-02-25 5:32 ` Borislav Petkov
2026-02-25 6:27 ` Martin Schiller
2026-02-25 7:25 ` Borislav Petkov
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.