@@ -36,22 +36,6 @@ void (*pm_power_off)(void);
3636EXPORT_SYMBOL (pm_power_off );
3737
3838static const struct desc_ptr no_idt = {};
39- static enum reboot_mode reboot_mode ;
40- enum reboot_type reboot_type = BOOT_ACPI ;
41- int reboot_force ;
42-
43- /*
44- * This variable is used privately to keep track of whether or not
45- * reboot_type is still set to its default value (i.e., reboot= hasn't
46- * been set on the command line). This is needed so that we can
47- * suppress DMI scanning for reboot quirks. Without it, it's
48- * impossible to override a faulty reboot quirk without recompiling.
49- */
50- static int reboot_default = 1 ;
51-
52- #ifdef CONFIG_SMP
53- static int reboot_cpu = -1 ;
54- #endif
5539
5640/*
5741 * This is set if we need to go through the 'emergency' path.
@@ -63,79 +47,6 @@ static int reboot_emergency;
6347/* This is set by the PCI code if either type 1 or type 2 PCI is detected */
6448bool port_cf9_safe = false;
6549
66- /*
67- * reboot=b[ios] | s[mp] | t[riple] | k[bd] | e[fi] [, [w]arm | [c]old] | p[ci]
68- * warm Don't set the cold reboot flag
69- * cold Set the cold reboot flag
70- * bios Reboot by jumping through the BIOS
71- * smp Reboot by executing reset on BSP or other CPU
72- * triple Force a triple fault (init)
73- * kbd Use the keyboard controller. cold reset (default)
74- * acpi Use the RESET_REG in the FADT
75- * efi Use efi reset_system runtime service
76- * pci Use the so-called "PCI reset register", CF9
77- * force Avoid anything that could hang.
78- */
79- static int __init reboot_setup (char * str )
80- {
81- for (;;) {
82- /*
83- * Having anything passed on the command line via
84- * reboot= will cause us to disable DMI checking
85- * below.
86- */
87- reboot_default = 0 ;
88-
89- switch (* str ) {
90- case 'w' :
91- reboot_mode = REBOOT_WARM ;
92- break ;
93-
94- case 'c' :
95- reboot_mode = REBOOT_COLD ;
96- break ;
97-
98- #ifdef CONFIG_SMP
99- case 's' :
100- if (isdigit (* (str + 1 ))) {
101- reboot_cpu = (int ) (* (str + 1 ) - '0' );
102- if (isdigit (* (str + 2 )))
103- reboot_cpu = reboot_cpu * 10 + (int )(* (str + 2 ) - '0' );
104- }
105- /*
106- * We will leave sorting out the final value
107- * when we are ready to reboot, since we might not
108- * have detected BSP APIC ID or smp_num_cpu
109- */
110- break ;
111- #endif /* CONFIG_SMP */
112-
113- case 'b' :
114- case 'a' :
115- case 'k' :
116- case 't' :
117- case 'e' :
118- case 'p' :
119- reboot_type = * str ;
120- break ;
121-
122- case 'f' :
123- reboot_force = 1 ;
124- break ;
125- }
126-
127- str = strchr (str , ',' );
128- if (str )
129- str ++ ;
130- else
131- break ;
132- }
133- return 1 ;
134- }
135-
136- __setup ("reboot=" , reboot_setup );
137-
138-
13950/*
14051 * Reboot options and system auto-detection code provided by
14152 * Dell Inc. so their systems "just work". :-)
@@ -616,26 +527,10 @@ void native_machine_shutdown(void)
616527{
617528 /* Stop the cpus and apics */
618529#ifdef CONFIG_SMP
619-
620- /* The boot cpu is always logical cpu 0 */
621- int reboot_cpu_id = 0 ;
622-
623- /* See if there has been given a command line override */
624- if ((reboot_cpu != -1 ) && (reboot_cpu < nr_cpu_ids ) &&
625- cpu_online (reboot_cpu ))
626- reboot_cpu_id = reboot_cpu ;
627-
628- /* Make certain the cpu I'm about to reboot on is online */
629- if (!cpu_online (reboot_cpu_id ))
630- reboot_cpu_id = smp_processor_id ();
631-
632- /* Make certain I only run on the appropriate processor */
633- set_cpus_allowed_ptr (current , cpumask_of (reboot_cpu_id ));
634-
635530 /*
636- * O.K Now that I'm on the appropriate processor, stop all of the
637- * others. Also disable the local irq to not receive the per-cpu
638- * timer interrupt which may trigger scheduler's load balance.
531+ * Stop all of the others. Also disable the local irq to
532+ * not receive the per-cpu timer interrupt which may trigger
533+ * scheduler's load balance.
639534 */
640535 local_irq_disable ();
641536 stop_other_cpus ();
0 commit comments