Skip to content
Commit 1a9d079f authored by Matteo Croce's avatar Matteo Croce Committed by Linus Torvalds
Browse files

reboot: allow to override reboot type if quirks are found



Patch series "reboot: sysfs improvements".

Some improvements to the sysfs reboot interface: hide not working settings
and support machines with known reboot quirks.

This patch (of 2):

On some machines a quirk can force a specific reboot type.  Quirks are
found during a DMI scan, the list of machines which need special reboot
handling is defined in reboot_dmi_table.

The kernel command line reboot= option overrides this via a global
variable `reboot_default`, so that the reboot type requested in the
command line is really performed.

This was not true when setting the reboot type via the new sysfs
interface.  Fix this by setting reboot_default upon the first change, like
reboot_setup() does for the command line.

Link: https://lkml.kernel.org/r/20201130173717.198952-1-mcroce@linux.microsoft.com
Link: https://lkml.kernel.org/r/20201130173717.198952-2-mcroce@linux.microsoft.com
Signed-off-by: default avatarMatteo Croce <mcroce@microsoft.com>
Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0c5c0179
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment