diff options
Diffstat (limited to 'arch')
32 files changed, 33 insertions, 182 deletions
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 4933f3ce583..fa98dae3cd9 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c @@ -165,7 +165,6 @@ machine_restart(char *restart_cmd) common_shutdown(LINUX_REBOOT_CMD_RESTART, restart_cmd); } -EXPORT_SYMBOL(machine_restart); void machine_halt(void) @@ -173,7 +172,6 @@ machine_halt(void) common_shutdown(LINUX_REBOOT_CMD_HALT, NULL); } -EXPORT_SYMBOL(machine_halt); void machine_power_off(void) @@ -181,7 +179,6 @@ machine_power_off(void) common_shutdown(LINUX_REBOOT_CMD_POWER_OFF, NULL); } -EXPORT_SYMBOL(machine_power_off); /* Used by sysrq-p, among others. I don't believe r9-r15 are ever saved in the context it's used. */ diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index bbea636ff68..409db6d5ec9 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -131,7 +131,6 @@ void machine_halt(void) { } -EXPORT_SYMBOL(machine_halt); void machine_power_off(void) { @@ -139,7 +138,6 @@ void machine_power_off(void) pm_power_off(); } -EXPORT_SYMBOL(machine_power_off); void machine_restart(char * __unused) { @@ -169,8 +167,6 @@ void machine_restart(char * __unused) while (1); } -EXPORT_SYMBOL(machine_restart); - void __show_regs(struct pt_regs *regs) { unsigned long flags = condition_codes(regs); diff --git a/arch/arm26/kernel/process.c b/arch/arm26/kernel/process.c index 46aea6ac194..9eb9964d32a 100644 --- a/arch/arm26/kernel/process.c +++ b/arch/arm26/kernel/process.c @@ -103,9 +103,6 @@ void machine_power_off(void) { } -EXPORT_SYMBOL(machine_halt); -EXPORT_SYMBOL(machine_power_off); - void machine_restart(char * __unused) { /* @@ -136,8 +133,6 @@ void machine_restart(char * __unused) while (1); } -EXPORT_SYMBOL(machine_restart); - void show_regs(struct pt_regs * regs) { unsigned long flags; diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c index 9f7cad7c784..a5ad2b67585 100644 --- a/arch/cris/kernel/process.c +++ b/arch/cris/kernel/process.c @@ -113,6 +113,7 @@ #include <linux/user.h> #include <linux/elfcore.h> #include <linux/mqueue.h> +#include <linux/reboot.h> //#define DEBUG @@ -208,13 +209,11 @@ void cpu_idle (void) void hard_reset_now (void); -void machine_restart(void) +void machine_restart(char *cmd) { hard_reset_now(); } -EXPORT_SYMBOL(machine_restart); - /* * Similar to machine_power_off, but don't shut off power. Add code * here to freeze the system for e.g. post-mortem debug purpose when @@ -225,16 +224,12 @@ void machine_halt(void) { } -EXPORT_SYMBOL(machine_halt); - /* If or when software power-off is implemented, add code here. */ void machine_power_off(void) { } -EXPORT_SYMBOL(machine_power_off); - /* * When a process does an "exec", machine state like FPU and debug * registers need to be reset. This is a hook function for that. diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index b5f83e9f04d..27f1fce64ce 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c @@ -90,8 +90,6 @@ void machine_restart(char * __unused) __asm__("jmp @@0"); } -EXPORT_SYMBOL(machine_restart); - void machine_halt(void) { local_irq_disable(); @@ -99,8 +97,6 @@ void machine_halt(void) for (;;); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off(void) { local_irq_disable(); @@ -108,8 +104,6 @@ void machine_power_off(void) for (;;); } -EXPORT_SYMBOL(machine_power_off); - void show_regs(struct pt_regs * regs) { printk("\nPC: %08lx Status: %02x", diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index 064211d5f41..d7811c4e8b5 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c @@ -911,14 +911,7 @@ static void apm_power_off(void) 0xcd, 0x15 /* int $0x15 */ }; - /* - * This may be called on an SMP machine. - */ -#ifdef CONFIG_SMP /* Some bioses don't like being called from CPU != 0 */ - set_cpus_allowed(current, cpumask_of_cpu(0)); - BUG_ON(smp_processor_id() != 0); -#endif if (apm_info.realmode_power_off) { (void)apm_save_cpus(); diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c index b3e58484996..c71fef31dc4 100644 --- a/arch/i386/kernel/reboot.c +++ b/arch/i386/kernel/reboot.c @@ -284,7 +284,7 @@ void machine_shutdown(void) reboot_cpu_id = 0; /* See if there has been given a command line override */ - if ((reboot_cpu_id != -1) && (reboot_cpu < NR_CPUS) && + if ((reboot_cpu != -1) && (reboot_cpu < NR_CPUS) && cpu_isset(reboot_cpu, cpu_online_map)) { reboot_cpu_id = reboot_cpu; } @@ -311,10 +311,8 @@ void machine_shutdown(void) #endif } -void machine_restart(char * __unused) +void machine_emergency_restart(void) { - machine_shutdown(); - if (!reboot_thru_bios) { if (efi_enabled) { efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL); @@ -337,23 +335,22 @@ void machine_restart(char * __unused) machine_real_restart(jump_to_bios, sizeof(jump_to_bios)); } -EXPORT_SYMBOL(machine_restart); +void machine_restart(char * __unused) +{ + machine_shutdown(); + machine_emergency_restart(); +} void machine_halt(void) { } -EXPORT_SYMBOL(machine_halt); - void machine_power_off(void) { - lapic_shutdown(); + machine_shutdown(); - if (efi_enabled) - efi.reset_system(EFI_RESET_SHUTDOWN, EFI_SUCCESS, 0, NULL); if (pm_power_off) pm_power_off(); } -EXPORT_SYMBOL(machine_power_off); diff --git a/arch/i386/mach-visws/reboot.c b/arch/i386/mach-visws/reboot.c index 95e4676594e..9e9296676f9 100644 --- a/arch/i386/mach-visws/reboot.c +++ b/arch/i386/mach-visws/reboot.c @@ -22,8 +22,6 @@ void machine_restart(char * __unused) outb(PIIX4_RESET_VAL, PIIX4_RESET_PORT); } -EXPORT_SYMBOL(machine_restart); - void machine_power_off(void) { unsigned short pm_status; @@ -43,10 +41,7 @@ void machine_power_off(void) outl(PIIX_SPECIAL_STOP, 0xCFC); } -EXPORT_SYMBOL(machine_power_off); - void machine_halt(void) { } -EXPORT_SYMBOL(machine_halt); diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c index 8680080a6a8..b3eda46e0fe 100644 --- a/arch/i386/mach-voyager/voyager_basic.c +++ b/arch/i386/mach-voyager/voyager_basic.c @@ -278,8 +278,6 @@ machine_restart(char *cmd) } } -EXPORT_SYMBOL(machine_restart); - void mca_nmi_hook(void) { @@ -315,12 +313,9 @@ machine_halt(void) machine_power_off(); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off(void) { if (pm_power_off) pm_power_off(); } -EXPORT_SYMBOL(machine_power_off); diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index e484910246a..66e84060980 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -807,16 +807,12 @@ machine_restart (char *restart_cmd) (*efi.reset_system)(EFI_RESET_WARM, 0, 0, NULL); } -EXPORT_SYMBOL(machine_restart); - void machine_halt (void) { cpu_halt(); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off (void) { @@ -825,4 +821,3 @@ machine_power_off (void) machine_halt(); } -EXPORT_SYMBOL(machine_power_off); diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index b556c3cf649..ea13a8f4d8b 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c @@ -115,8 +115,6 @@ void machine_restart(char *__unused) cpu_relax(); } -EXPORT_SYMBOL(machine_restart); - void machine_halt(void) { printk("Please push reset button!\n"); @@ -124,15 +122,11 @@ void machine_halt(void) cpu_relax(); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off(void) { /* M32R_FIXME */ } -EXPORT_SYMBOL(machine_power_off); - static int __init idle_setup (char *str) { if (!strncmp(str, "poll", 4)) { diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 93b043e2a43..11b1b90ba6b 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c @@ -113,8 +113,6 @@ void machine_restart(char * __unused) for (;;); } -EXPORT_SYMBOL(machine_restart); - void machine_halt(void) { if (mach_halt) @@ -122,8 +120,6 @@ void machine_halt(void) for (;;); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off(void) { if (mach_power_off) @@ -131,8 +127,6 @@ void machine_power_off(void) for (;;); } -EXPORT_SYMBOL(machine_power_off); - void show_regs(struct pt_regs * regs) { printk("\n"); diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index c4a33f265dc..82e7ec88880 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c @@ -80,8 +80,6 @@ void machine_restart(char * __unused) for (;;); } -EXPORT_SYMBOL(machine_restart); - void machine_halt(void) { if (mach_halt) @@ -89,8 +87,6 @@ void machine_halt(void) for (;;); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off(void) { if (mach_power_off) @@ -98,8 +94,6 @@ void machine_power_off(void) for (;;); } -EXPORT_SYMBOL(machine_power_off); - void show_regs(struct pt_regs * regs) { printk(KERN_NOTICE "\n"); diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c index 7e0a9821931..ae2ba67b7ef 100644 --- a/arch/mips/kernel/reset.c +++ b/arch/mips/kernel/reset.c @@ -26,18 +26,13 @@ void machine_restart(char *command) _machine_restart(command); } -EXPORT_SYMBOL(machine_restart); - void machine_halt(void) { _machine_halt(); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off(void) { _machine_power_off(); } -EXPORT_SYMBOL(machine_power_off); diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 46e4a6881f1..4fc04501d5e 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -150,8 +150,6 @@ void machine_restart(char *cmd) } -EXPORT_SYMBOL(machine_restart); - void machine_halt(void) { /* @@ -160,8 +158,6 @@ void machine_halt(void) */ } -EXPORT_SYMBOL(machine_halt); - /* * This routine is called from sys_reboot to actually turn off the @@ -187,8 +183,6 @@ void machine_power_off(void) KERN_EMERG "Please power this system off now."); } -EXPORT_SYMBOL(machine_power_off); - /* * Create a kernel thread diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index c42f7532693..929e5d1cc7f 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c @@ -121,8 +121,6 @@ void machine_restart(char *cmd) ppc_md.restart(cmd); } -EXPORT_SYMBOL(machine_restart); - void machine_power_off(void) { #ifdef CONFIG_NVRAM @@ -131,8 +129,6 @@ void machine_power_off(void) ppc_md.power_off(); } -EXPORT_SYMBOL(machine_power_off); - void machine_halt(void) { #ifdef CONFIG_NVRAM @@ -141,8 +137,6 @@ void machine_halt(void) ppc_md.halt(); } -EXPORT_SYMBOL(machine_halt); - void (*pm_power_off)(void) = machine_power_off; #ifdef CONFIG_TAU diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c index d1b33f0b26c..e80f10c8982 100644 --- a/arch/ppc64/kernel/setup.c +++ b/arch/ppc64/kernel/setup.c @@ -694,7 +694,6 @@ void machine_restart(char *cmd) local_irq_disable(); while (1) ; } -EXPORT_SYMBOL(machine_restart); void machine_power_off(void) { @@ -707,7 +706,6 @@ void machine_power_off(void) local_irq_disable(); while (1) ; } -EXPORT_SYMBOL(machine_power_off); void machine_halt(void) { @@ -720,7 +718,6 @@ void machine_halt(void) local_irq_disable(); while (1) ; } -EXPORT_SYMBOL(machine_halt); static int ppc64_panic_event(struct notifier_block *this, unsigned long event, void *ptr) diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index b6d740ac0e6..a12183989a7 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -299,24 +299,18 @@ void machine_restart(char *command) _machine_restart(command); } -EXPORT_SYMBOL(machine_restart); - void machine_halt(void) { console_unblank(); _machine_halt(); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off(void) { console_unblank(); _machine_power_off(); } -EXPORT_SYMBOL(machine_power_off); - static void __init add_memory_hole(unsigned long start, unsigned long end) { diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 3d024590c24..6dce9d0b81f 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c @@ -80,8 +80,6 @@ void machine_restart(char * __unused) "mov.l @%1, %0" : : "r" (0x10000000), "r" (0x80000001)); } -EXPORT_SYMBOL(machine_restart); - void machine_halt(void) { #if defined(CONFIG_SH_HS7751RVOIP) @@ -96,8 +94,6 @@ void machine_halt(void) cpu_sleep(); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off(void) { #if defined(CONFIG_SH_HS7751RVOIP) @@ -110,8 +106,6 @@ void machine_power_off(void) #endif } -EXPORT_SYMBOL(machine_power_off); - void show_regs(struct pt_regs * regs) { printk("\n"); diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index 2c216ffeea9..29e72b57d4f 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c @@ -158,8 +158,6 @@ void machine_halt(void) panic("Halt failed!"); } -EXPORT_SYMBOL(machine_halt); - void machine_restart(char * cmd) { char *p; @@ -180,8 +178,6 @@ void machine_restart(char * cmd) panic("Reboot failed!"); } -EXPORT_SYMBOL(machine_restart); - void machine_power_off(void) { #ifdef CONFIG_SUN_AUXIO @@ -191,8 +187,6 @@ void machine_power_off(void) machine_halt(); } -EXPORT_SYMBOL(machine_power_off); - static DEFINE_SPINLOCK(sparc_backtrace_lock); void __show_backtrace(unsigned long fp) diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c index 533104c7907..946cee0257e 100644 --- a/arch/sparc64/kernel/power.c +++ b/arch/sparc64/kernel/power.c @@ -69,8 +69,6 @@ void machine_power_off(void) machine_halt(); } -EXPORT_SYMBOL(machine_power_off); - #ifdef CONFIG_PCI static int powerd(void *__unused) { diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index cffb1c8ab4f..07424b07593 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c @@ -124,8 +124,6 @@ void machine_halt(void) panic("Halt failed!"); } -EXPORT_SYMBOL(machine_halt); - void machine_alt_power_off(void) { if (!serial_console && prom_palette) @@ -154,8 +152,6 @@ void machine_restart(char * cmd) panic("Reboot failed!"); } -EXPORT_SYMBOL(machine_restart); - static void show_regwindow32(struct pt_regs *regs) { struct reg_window32 __user *rw; diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c index fcec51da1d3..a637e885c58 100644 --- a/arch/um/kernel/reboot.c +++ b/arch/um/kernel/reboot.c @@ -49,23 +49,17 @@ void machine_restart(char * __unused) CHOOSE_MODE(reboot_tt(), reboot_skas()); } -EXPORT_SYMBOL(machine_restart); - void machine_power_off(void) { uml_cleanup(); CHOOSE_MODE(halt_tt(), halt_skas()); } -EXPORT_SYMBOL(machine_power_off); - void machine_halt(void) { machine_power_off(); } -EXPORT_SYMBOL(machine_halt); - /* * Overrides for Emacs so that we follow Linus's tabbing style. * Emacs will notice this stuff at the end of the file and automatically diff --git a/arch/v850/kernel/anna.c b/arch/v850/kernel/anna.c index 6aaeab5e8a4..d0502e14243 100644 --- a/arch/v850/kernel/anna.c +++ b/arch/v850/kernel/anna.c @@ -132,8 +132,6 @@ void machine_restart (char *__unused) asm ("jmp r0"); /* Jump to the reset vector. */ } -EXPORT_SYMBOL(machine_restart); - void machine_halt (void) { #ifdef CONFIG_RESET_GUARD @@ -145,15 +143,11 @@ void machine_halt (void) asm ("halt; nop; nop; nop; nop; nop"); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off (void) { machine_halt (); } -EXPORT_SYMBOL(machine_power_off); - /* Called before configuring an on-chip UART. */ void anna_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) { diff --git a/arch/v850/kernel/as85ep1.c b/arch/v850/kernel/as85ep1.c index 4059b1df11b..d78c5e4ea9b 100644 --- a/arch/v850/kernel/as85ep1.c +++ b/arch/v850/kernel/as85ep1.c @@ -160,8 +160,6 @@ void machine_restart (char *__unused) asm ("jmp r0"); /* Jump to the reset vector. */ } -EXPORT_SYMBOL(machine_restart); - void machine_halt (void) { #ifdef CONFIG_RESET_GUARD @@ -173,15 +171,11 @@ void machine_halt (void) asm ("halt; nop; nop; nop; nop; nop"); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off (void) { machine_halt (); } -EXPORT_SYMBOL(machine_power_off); - /* Called before configuring an on-chip UART. */ void as85ep1_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) { diff --git a/arch/v850/kernel/fpga85e2c.c b/arch/v850/kernel/fpga85e2c.c index 4bac5149b3c..d8094519ad8 100644 --- a/arch/v850/kernel/fpga85e2c.c +++ b/arch/v850/kernel/fpga85e2c.c @@ -121,22 +121,16 @@ void machine_halt (void) } } -EXPORT_SYMBOL(machine_halt); - void machine_restart (char *__unused) { machine_halt (); } -EXPORT_SYMBOL(machine_restart); - void machine_power_off (void) { machine_halt (); } -EXPORT_SYMBOL(machine_power_off); - /* Interrupts */ diff --git a/arch/v850/kernel/rte_cb.c b/arch/v850/kernel/rte_cb.c index 7ba397f77ac..0c794b9e0f9 100644 --- a/arch/v850/kernel/rte_cb.c +++ b/arch/v850/kernel/rte_cb.c @@ -67,8 +67,6 @@ void machine_restart (char *__unused) asm ("jmp r0"); /* Jump to the reset vector. */ } -EXPORT_SYMBOL(machine_restart); - /* This says `HALt.' in LEDese. */ static unsigned char halt_leds_msg[] = { 0x76, 0x77, 0x38, 0xF8 }; @@ -89,15 +87,11 @@ void machine_halt (void) asm ("halt; nop; nop; nop; nop; nop"); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off (void) { machine_halt (); } -EXPORT_SYMBOL(machine_power_off); - /* Animated LED display for timer tick. */ diff --git a/arch/v850/kernel/sim.c b/arch/v850/kernel/sim.c index 4f31da96263..e2cc5580fa2 100644 --- a/arch/v850/kernel/sim.c +++ b/arch/v850/kernel/sim.c @@ -104,24 +104,18 @@ void machine_restart (char *__unused) V850_SIM_SYSCALL (exit, 0); } -EXPORT_SYMBOL(machine_restart); - void machine_halt (void) { V850_SIM_SYSCALL (write, 1, "HALT\n", 5); V850_SIM_SYSCALL (exit, 0); } -EXPORT_SYMBOL(machine_halt); - void machine_power_off (void) { V850_SIM_SYSCALL (write, 1, "POWER OFF\n", 10); V850_SIM_SYSCALL (exit, 0); } -EXPORT_SYMBOL(machine_power_off); - /* Load data from a file called NAME into ram. The address and length of the data image are returned in ADDR and LEN. */ diff --git a/arch/v850/kernel/sim85e2.c b/arch/v850/kernel/sim85e2.c index 93a722b516b..9111613fb53 100644 --- a/arch/v850/kernel/sim85e2.c +++ b/arch/v850/kernel/sim85e2.c @@ -184,18 +184,13 @@ void machine_halt (void) for (;;) {} } -EXPORT_SYMBOL(machine_halt); - void machine_restart (char *__unused) { machine_halt (); } -EXPORT_SYMBOL(machine_restart); - void machine_power_off (void) { machine_halt (); } -EXPORT_SYMBOL(machine_power_off); diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index cc935427d53..c45d6a05b98 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S @@ -591,11 +591,15 @@ ia32_sys_call_table: .quad compat_sys_mq_getsetattr .quad compat_sys_kexec_load /* reserved for kexec */ .quad compat_sys_waitid - .quad quiet_ni_syscall /* sys_altroot */ + .quad quiet_ni_syscall /* 285: sys_altroot */ .quad sys_add_key .quad sys_request_key .quad sys_keyctl - /* don't forget to change IA32_NR_syscalls */ + .quad sys_ioprio_set + .quad sys_ioprio_get /* 290 */ + .quad sys_inotify_init + .quad sys_inotify_add_watch + .quad sys_inotify_rm_watch ia32_syscall_end: .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8 .quad ni_syscall diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c index 68a9ab06ee7..70caf89d4c2 100644 --- a/arch/x86_64/ia32/sys_ia32.c +++ b/arch/x86_64/ia32/sys_ia32.c @@ -61,6 +61,7 @@ #include <linux/ptrace.h> #include <linux/highuid.h> #include <linux/vmalloc.h> +#include <linux/fsnotify.> #include <asm/mman.h> #include <asm/types.h> #include <asm/uaccess.h> @@ -984,8 +985,10 @@ asmlinkage long sys32_open(const char __user * filename, int flags, int mode) if (IS_ERR(f)) { put_unused_fd(fd); fd = error; - } else + } else { + fsnotify_open(f->f_dentry); fd_install(fd, f); + } } putname(tmp); } diff --git a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c index 57e71dbdfd6..47f95687905 100644 --- a/arch/x86_64/kernel/reboot.c +++ b/arch/x86_64/kernel/reboot.c @@ -109,23 +109,10 @@ void machine_shutdown(void) local_irq_enable(); } -void machine_restart(char * __unused) +void machine_emergency_restart(void) { int i; - printk("machine restart\n"); - - machine_shutdown(); - - if (!reboot_force) { - local_irq_disable(); -#ifndef CONFIG_SMP - disable_local_APIC(); -#endif - disable_IO_APIC(); - local_irq_enable(); - } - /* Tell the BIOS if we want cold or warm reboot */ *((unsigned short *)__va(0x472)) = reboot_mode; @@ -150,18 +137,26 @@ void machine_restart(char * __unused) } } -EXPORT_SYMBOL(machine_restart); +void machine_restart(char * __unused) +{ + printk("machine restart\n"); + + if (!reboot_force) { + machine_shutdown(); + } + machine_emergency_restart(); +} void machine_halt(void) { } -EXPORT_SYMBOL(machine_halt); - void machine_power_off(void) { + if (!reboot_force) { + machine_shutdown(); + } if (pm_power_off) pm_power_off(); } -EXPORT_SYMBOL(machine_power_off); |