+ reboot-allow-to-override-reboot-type-if-quirks-are-found.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: reboot: allow to override reboot type if quirks are found
has been added to the -mm tree.  Its filename is
     reboot-allow-to-override-reboot-type-if-quirks-are-found.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/reboot-allow-to-override-reboot-type-if-quirks-are-found.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/reboot-allow-to-override-reboot-type-if-quirks-are-found.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Matteo Croce <mcroce@xxxxxxxxxxxxx>
Subject: 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@xxxxxxxxxxxxxxxxxxx
Link: https://lkml.kernel.org/r/20201130173717.198952-2-mcroce@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Matteo Croce <mcroce@xxxxxxxxxxxxx>
Cc: Petr Mladek <pmladek@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/reboot.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/kernel/reboot.c~reboot-allow-to-override-reboot-type-if-quirks-are-found
+++ a/kernel/reboot.c
@@ -660,6 +660,8 @@ static ssize_t mode_store(struct kobject
 	else
 		return -EINVAL;
 
+	reboot_default = 0;
+
 	return count;
 }
 static struct kobj_attribute reboot_mode_attr = __ATTR_RW(mode);
@@ -714,6 +716,8 @@ static ssize_t type_store(struct kobject
 	else
 		return -EINVAL;
 
+	reboot_default = 0;
+
 	return count;
 }
 static struct kobj_attribute reboot_type_attr = __ATTR_RW(type);
@@ -739,6 +743,7 @@ static ssize_t cpu_store(struct kobject
 	if (cpunum >= num_possible_cpus())
 		return -ERANGE;
 
+	reboot_default = 0;
 	reboot_cpu = cpunum;
 
 	return count;
@@ -760,6 +765,7 @@ static ssize_t force_store(struct kobjec
 	if (kstrtobool(buf, &res))
 		return -EINVAL;
 
+	reboot_default = 0;
 	reboot_force = res;
 
 	return count;
_

Patches currently in -mm which might be from mcroce@xxxxxxxxxxxxx are

reboot-refactor-and-comment-the-cpu-selection-code.patch
reboot-allow-to-specify-reboot-mode-via-sysfs.patch
reboot-remove-cf9_safe-from-allowed-types-and-rename-cf9_force.patch
reboot-allow-to-override-reboot-type-if-quirks-are-found.patch
reboot-hide-from-sysfs-not-applicable-settings.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux