projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ACPI] merge 3549 4320 4485 4588 4980 5483 5651 acpica asus fops pnpacpi branches...
[firefly-linux-kernel-4.4.55.git]
/
arch
/
x86_64
/
kernel
/
reboot.c
diff --git
a/arch/x86_64/kernel/reboot.c
b/arch/x86_64/kernel/reboot.c
index 47f95687905fd22d417d54632a40b784d186ed82..57117b8beb2bfd14e7fc51a618f56fff36176826 100644
(file)
--- a/
arch/x86_64/kernel/reboot.c
+++ b/
arch/x86_64/kernel/reboot.c
@@
-6,6
+6,7
@@
#include <linux/kernel.h>
#include <linux/ctype.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/ctype.h>
#include <linux/string.h>
+#include <linux/pm.h>
#include <asm/io.h>
#include <asm/kdebug.h>
#include <asm/delay.h>
#include <asm/io.h>
#include <asm/kdebug.h>
#include <asm/delay.h>
@@
-77,6
+78,7
@@
static inline void kb_wait(void)
void machine_shutdown(void)
{
void machine_shutdown(void)
{
+ unsigned long flags;
/* Stop the cpus and apics */
#ifdef CONFIG_SMP
int reboot_cpu_id;
/* Stop the cpus and apics */
#ifdef CONFIG_SMP
int reboot_cpu_id;
@@
-98,7
+100,7
@@
void machine_shutdown(void)
smp_send_stop();
#endif
smp_send_stop();
#endif
- local_irq_
disable(
);
+ local_irq_
save(flags
);
#ifndef CONFIG_SMP
disable_local_APIC();
#ifndef CONFIG_SMP
disable_local_APIC();
@@
-106,7
+108,7
@@
void machine_shutdown(void)
disable_IO_APIC();
disable_IO_APIC();
- local_irq_
enable(
);
+ local_irq_
restore(flags
);
}
void machine_emergency_restart(void)
}
void machine_emergency_restart(void)
@@
-120,7
+122,7
@@
void machine_emergency_restart(void)
/* Could also try the reset bit in the Hammer NB */
switch (reboot_type) {
case BOOT_KBD:
/* Could also try the reset bit in the Hammer NB */
switch (reboot_type) {
case BOOT_KBD:
- for (i=0; i<10
0
; i++) {
+ for (i=0; i<10; i++) {
kb_wait();
udelay(50);
outb(0xfe,0x64); /* pulse reset low */
kb_wait();
udelay(50);
outb(0xfe,0x64); /* pulse reset low */
@@
-153,10
+155,11
@@
void machine_halt(void)
void machine_power_off(void)
{
void machine_power_off(void)
{
- if (
!reboot_force
) {
- machine_shutdown();
- }
- if (pm_power_off)
+ if (
pm_power_off
) {
+ if (!reboot_force) {
+ machine_shutdown();
+ }
pm_power_off();
pm_power_off();
+ }
}
}