aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/ia32/ia32entry.S8
-rw-r--r--arch/x86_64/ia32/sys_ia32.c5
-rw-r--r--arch/x86_64/kernel/reboot.c31
3 files changed, 23 insertions, 21 deletions
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
index cc935427d532..c45d6a05b984 100644
--- a/arch/x86_64/ia32/ia32entry.S
+++ b/arch/x86_64/ia32/ia32entry.S
@@ -591,11 +591,15 @@ ia32_sys_call_table:
591 .quad compat_sys_mq_getsetattr 591 .quad compat_sys_mq_getsetattr
592 .quad compat_sys_kexec_load /* reserved for kexec */ 592 .quad compat_sys_kexec_load /* reserved for kexec */
593 .quad compat_sys_waitid 593 .quad compat_sys_waitid
594 .quad quiet_ni_syscall /* sys_altroot */ 594 .quad quiet_ni_syscall /* 285: sys_altroot */
595 .quad sys_add_key 595 .quad sys_add_key
596 .quad sys_request_key 596 .quad sys_request_key
597 .quad sys_keyctl 597 .quad sys_keyctl
598 /* don't forget to change IA32_NR_syscalls */ 598 .quad sys_ioprio_set
599 .quad sys_ioprio_get /* 290 */
600 .quad sys_inotify_init
601 .quad sys_inotify_add_watch
602 .quad sys_inotify_rm_watch
599ia32_syscall_end: 603ia32_syscall_end:
600 .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8 604 .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8
601 .quad ni_syscall 605 .quad ni_syscall
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
index 68a9ab06ee7c..be996d1b691e 100644
--- a/arch/x86_64/ia32/sys_ia32.c
+++ b/arch/x86_64/ia32/sys_ia32.c
@@ -61,6 +61,7 @@
61#include <linux/ptrace.h> 61#include <linux/ptrace.h>
62#include <linux/highuid.h> 62#include <linux/highuid.h>
63#include <linux/vmalloc.h> 63#include <linux/vmalloc.h>
64#include <linux/fsnotify.h>
64#include <asm/mman.h> 65#include <asm/mman.h>
65#include <asm/types.h> 66#include <asm/types.h>
66#include <asm/uaccess.h> 67#include <asm/uaccess.h>
@@ -984,8 +985,10 @@ asmlinkage long sys32_open(const char __user * filename, int flags, int mode)
984 if (IS_ERR(f)) { 985 if (IS_ERR(f)) {
985 put_unused_fd(fd); 986 put_unused_fd(fd);
986 fd = error; 987 fd = error;
987 } else 988 } else {
989 fsnotify_open(f->f_dentry);
988 fd_install(fd, f); 990 fd_install(fd, f);
991 }
989 } 992 }
990 putname(tmp); 993 putname(tmp);
991 } 994 }
diff --git a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c
index 57e71dbdfd69..47f95687905f 100644
--- a/arch/x86_64/kernel/reboot.c
+++ b/arch/x86_64/kernel/reboot.c
@@ -109,23 +109,10 @@ void machine_shutdown(void)
109 local_irq_enable(); 109 local_irq_enable();
110} 110}
111 111
112void machine_restart(char * __unused) 112void machine_emergency_restart(void)
113{ 113{
114 int i; 114 int i;
115 115
116 printk("machine restart\n");
117
118 machine_shutdown();
119
120 if (!reboot_force) {
121 local_irq_disable();
122#ifndef CONFIG_SMP
123 disable_local_APIC();
124#endif
125 disable_IO_APIC();
126 local_irq_enable();
127 }
128
129 /* Tell the BIOS if we want cold or warm reboot */ 116 /* Tell the BIOS if we want cold or warm reboot */
130 *((unsigned short *)__va(0x472)) = reboot_mode; 117 *((unsigned short *)__va(0x472)) = reboot_mode;
131 118
@@ -150,18 +137,26 @@ void machine_restart(char * __unused)
150 } 137 }
151} 138}
152 139
153EXPORT_SYMBOL(machine_restart); 140void machine_restart(char * __unused)
141{
142 printk("machine restart\n");
143
144 if (!reboot_force) {
145 machine_shutdown();
146 }
147 machine_emergency_restart();
148}
154 149
155void machine_halt(void) 150void machine_halt(void)
156{ 151{
157} 152}
158 153
159EXPORT_SYMBOL(machine_halt);
160
161void machine_power_off(void) 154void machine_power_off(void)
162{ 155{
156 if (!reboot_force) {
157 machine_shutdown();
158 }
163 if (pm_power_off) 159 if (pm_power_off)
164 pm_power_off(); 160 pm_power_off();
165} 161}
166 162
167EXPORT_SYMBOL(machine_power_off);