lkml.org 
[lkml]   [2020]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] reboot: allow to override reboot type if quirks are found
On Mon 2020-11-30 18:37:16, Matteo Croce wrote:
> From: Matteo Croce <mcroce@microsoft.com>
>
> 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.

Strictly speaking this is not necessary. The quirks are proceed
in core_initcall() while the sysfs interface is created in
late_initcall(). By other words, the quirks are uses before
the default can be modified by the sysfs interface.

On the other hand, it does not harm. Better be on the safe
side for eventual future changes.

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr

\
 
 \ /
  Last update: 2020-12-01 11:51    [W:0.068 / U:2.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site