linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Matteo Croce <mcroce@linux.microsoft.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] reboot: allow to override reboot type if quirks are found
Date: Tue, 1 Dec 2020 11:46:50 +0100	[thread overview]
Message-ID: <X8YfGllCdPcyH1my@alley> (raw)
In-Reply-To: <20201130173717.198952-2-mcroce@linux.microsoft.com>

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

  reply	other threads:[~2020-12-01 10:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 17:37 [PATCH 0/2] reboot: sysfs improvements Matteo Croce
2020-11-30 17:37 ` [PATCH 1/2] reboot: allow to override reboot type if quirks are found Matteo Croce
2020-12-01 10:46   ` Petr Mladek [this message]
2020-11-30 17:37 ` [PATCH 2/2] reboot: hide from sysfs not applicable settings Matteo Croce
2020-12-01 10:52   ` 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=X8YfGllCdPcyH1my@alley \
    --to=pmladek@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcroce@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).