From: Petr Mladek <pmladek@suse.com>
To: Matteo Croce <mcroce@linux.microsoft.com>
Cc: linux-kernel@vger.kernel.org, Mike Rapoport <rppt@kernel.org>,
Guenter Roeck <linux@roeck-us.net>, Arnd Bergmann <arnd@arndb.de>,
Pavel Tatashin <pasha.tatashin@soleen.com>,
Kees Cook <keescook@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
Tyler Hicks <tyhicks@linux.microsoft.com>
Subject: Re: [PATCH v3] reboot: allow to specify reboot mode via sysfs
Date: Tue, 10 Nov 2020 15:58:34 +0100 [thread overview]
Message-ID: <20201110145834.GE20201@alley> (raw)
In-Reply-To: <20201109164538.18934-1-mcroce@linux.microsoft.com>
On Mon 2020-11-09 17:45:38, Matteo Croce wrote:
> From: Matteo Croce <mcroce@microsoft.com>
>
> The kernel cmdline reboot= option offers some sort of control
> on how the reboot is issued.
> Add handles in sysfs to allow setting these reboot options, so they
> can be changed when the system is booted, other than at boot time.
>
> The handlers are under <sysfs>/kernel/reboot, can be read to
> get the current configuration and written to alter it.
>
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-kernel-reboot
> @@ -0,0 +1,31 @@
> +What: /sys/kernel/reboot
> +Date: November 2020
> +KernelVersion: 5.11
> +Contact: Matteo Croce <mcroce@microsoft.com>
> +Description: Interface to set the kernel reboot mode, similarly to
> + what can be done via the reboot= cmdline option.
> + (see Documentation/admin-guide/kernel-parameters.txt)
> +
s/reboot mode/reboot behavior/
The reboot mode is only one of the modified parameters.
> +What: /sys/kernel/reboot/mode
> +Date: November 2020
> +KernelVersion: 5.11
> +Contact: Matteo Croce <mcroce@microsoft.com>
> +Description: Reboot mode. Valid values are: cold warm hard soft gpio
> +
> +What: /sys/kernel/reboot/type
> +Date: November 2020
> +KernelVersion: 5.11
> +Contact: Matteo Croce <mcroce@microsoft.com>
> +Description: Reboot type. Valid values are: bios acpi kbd triple efi pci
> +
> +What: /sys/kernel/reboot/cpu
> +Date: November 2020
> +KernelVersion: 5.11
> +Contact: Matteo Croce <mcroce@microsoft.com>
> +Description: CPU number to use to reboot.
> +
> +What: /sys/kernel/reboot/force
> +Date: November 2020
> +KernelVersion: 5.11
> +Contact: Matteo Croce <mcroce@microsoft.com>
> +Description: Force an immediate reboot.
This makes me feel like that the kernel will reboot
immediately when you write "1". It would deserve a better
explanation that would make it clear, something like:
Description: Use forced reboot that does not contact the init system.
Otherwise, it looks good to me. With the two above updates:
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards,
Petr
next prev parent reply other threads:[~2020-11-10 14:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 16:45 [PATCH v3] reboot: allow to specify reboot mode via sysfs Matteo Croce
2020-11-10 14:58 ` Petr Mladek [this message]
2020-11-10 17:36 ` Matteo Croce
2020-11-11 9:22 ` Petr Mladek
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=20201110145834.GE20201@alley \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mcroce@linux.microsoft.com \
--cc=pasha.tatashin@soleen.com \
--cc=rppt@kernel.org \
--cc=tyhicks@linux.microsoft.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;
as well as URLs for NNTP newsgroup(s).