Thread (29 messages) 29 messages, 7 authors, 2013-05-11

[PATCH -v8 11/11] Move arch/x86 reboot= handling to generic kernel.

From: Russell King - ARM Linux <hidden>
Date: 2013-05-09 13:37:29
Also in: lkml

On Thu, May 09, 2013 at 08:01:20AM -0500, Robin Holt wrote:
quoted hunk ↗ jump to hunk
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index 26cf11b..bc77231 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -15,6 +15,23 @@ enum reboot_mode {
+extern enum reboot_type reboot_type;
+
+extern int reboot_default;
+extern int reboot_cpu;
+extern int reboot_force;
Okay, these are globals...
quoted hunk ↗ jump to hunk
diff --git a/kernel/reboot.c b/kernel/reboot.c
index 0a97794..ff08af2 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -87,7 +88,7 @@ EXPORT_SYMBOL(unregister_reboot_notifier);
 static void migrate_to_reboot_cpu(void)
 {
 	/* The boot cpu is always logical cpu 0 */
-	int reboot_cpu = 0;
+	int reboot_cpu = reboot_cpu;
Hmm, are you sure about that?
quoted hunk ↗ jump to hunk
@@ -343,3 +344,80 @@ int orderly_poweroff(bool force)
 	return 0;
 }
 EXPORT_SYMBOL_GPL(orderly_poweroff);
+
+int reboot_default;
+enum reboot_mode reboot_mode = REBOOT_COLD;
+int reboot_cpu;
+enum reboot_type reboot_type = BOOT_ACPI;
+int reboot_force;
As you seem to want to reference these above, wouldn't it make sense to
move them higher in the file?
+		case 'c':
+		case 'h':
+			reboot_mode = REBOOT_COLD;
+			break;
I'm still not entirely convinced by making "hard" and "cold" mean the
same thing, likewise "soft" and "warm".  As I previously explained but
everyone seems to have ignored, solely focusing on the 's' problem
instead.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help