Compare commits

...

4 Commits

Author SHA1 Message Date
Shubham Gaur
c641954bc1
Merge 0401bbf56d into 2004cef11e 2024-09-19 22:14:29 +05:30
Shubham Gaur
0401bbf56d
Merge branch 'torvalds:master' into master 2024-09-19 14:05:40 +05:30
Shubham Gaur
f1bc834141
Update reboot.c 2024-09-18 16:48:43 +05:30
Shubham Gaur
5049ddba25
reboot.c : changed reboot_default
Made two changes:
1. ARM64 now defaults to hard reboot on kernel panic.
2. reboot_default` flag is now a boolean for better clarity.
2024-08-30 11:27:39 +05:30

View File

@ -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
@ -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;
@ -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;
@ -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;
}
@ -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;
@ -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;
}
@ -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;