Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ EXPORT_SYMBOL(cad_pid);
#endif
enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE;
EXPORT_SYMBOL_GPL(reboot_mode);
#if defined(CONFIG_ARM64)
enum reboot_mode panic_reboot_mode = REBOOT_HARD;
#else
enum reboot_mode panic_reboot_mode = REBOOT_UNDEFINED;
#endif

/*
* This variable is used privately to keep track of whether or not
Expand All @@ -43,7 +47,7 @@ enum reboot_mode panic_reboot_mode = REBOOT_UNDEFINED;
* suppress DMI scanning for reboot quirks. Without it, it's
* impossible to override a faulty reboot quirk without recompiling.
*/
int reboot_default = 1;
bool reboot_default = true;
int reboot_cpu;
enum reboot_type reboot_type = BOOT_ACPI;
int reboot_force;
Expand Down Expand Up @@ -1016,10 +1020,10 @@ static int __init reboot_setup(char *str)

/*
* Having anything passed on the command line via
* reboot= will cause us to disable DMI checking
* reboot= will cause us to skip DMI checking
* below.
*/
reboot_default = 0;
reboot_default = false;

if (!strncmp(str, "panic_", 6)) {
mode = &panic_reboot_mode;
Expand Down Expand Up @@ -1151,7 +1155,7 @@ static ssize_t mode_store(struct kobject *kobj, struct kobj_attribute *attr,
else
return -EINVAL;

reboot_default = 0;
reboot_default = false;

return count;
}
Expand All @@ -1173,7 +1177,7 @@ static ssize_t force_store(struct kobject *kobj, struct kobj_attribute *attr,
if (kstrtobool(buf, &res))
return -EINVAL;

reboot_default = 0;
reboot_default = false;
reboot_force = res;

return count;
Expand Down Expand Up @@ -1230,7 +1234,7 @@ static ssize_t type_store(struct kobject *kobj, struct kobj_attribute *attr,
else
return -EINVAL;

reboot_default = 0;
reboot_default = false;

return count;
}
Expand Down Expand Up @@ -1259,7 +1263,7 @@ static ssize_t cpu_store(struct kobject *kobj, struct kobj_attribute *attr,
if (cpunum >= num_possible_cpus())
return -ERANGE;

reboot_default = 0;
reboot_default = false;
reboot_cpu = cpunum;

return count;
Expand Down