blob: fc62ba8dce933d3bb1ec0262b7d4851bcc5fee26 [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_REBOOT_H
2#define _ASM_X86_REBOOT_H
Jeremy Fitzhardinge07f33312007-05-02 19:27:11 +02003
Eduardo Habkostc370e5e2008-11-12 11:34:41 -02004#include <linux/kdebug.h>
5
Jeremy Fitzhardinge07f33312007-05-02 19:27:11 +02006struct pt_regs;
7
Joe Perches78db4c62008-03-23 01:03:18 -07008struct machine_ops {
Jeremy Fitzhardinge07f33312007-05-02 19:27:11 +02009 void (*restart)(char *cmd);
10 void (*halt)(void);
11 void (*power_off)(void);
12 void (*shutdown)(void);
13 void (*crash_shutdown)(struct pt_regs *);
14 void (*emergency_restart)(void);
15};
16
17extern struct machine_ops machine_ops;
Xunlei Pangfdfc3fa2017-03-13 10:50:19 +010018extern int crashing_cpu;
Jeremy Fitzhardinge07f33312007-05-02 19:27:11 +020019
Glauber Costaed23dc62008-03-17 16:08:38 -030020void native_machine_crash_shutdown(struct pt_regs *regs);
Glauber Costa3c62c622008-03-17 16:08:39 -030021void native_machine_shutdown(void);
H. Peter Anvin65051392012-06-16 21:47:37 -070022void __noreturn machine_real_restart(unsigned int type);
23/* These must match dispatch in arch/x86/realmore/rm/reboot.S */
H. Peter Anvin3d35ac32011-02-14 18:36:03 -080024#define MRR_BIOS 0
25#define MRR_APM 1
Jeremy Fitzhardinge07f33312007-05-02 19:27:11 +020026
Don Zickus9c48f1c2011-09-30 15:06:21 -040027typedef void (*nmi_shootdown_cb)(int, struct pt_regs*);
Eduardo Habkostc370e5e2008-11-12 11:34:41 -020028void nmi_shootdown_cpus(nmi_shootdown_cb callback);
Hidehiro Kawaib279d672015-12-14 11:19:13 +010029void run_crash_ipi_callback(struct pt_regs *regs);
Eduardo Habkostc370e5e2008-11-12 11:34:41 -020030
H. Peter Anvin1965aae2008-10-22 22:26:29 -070031#endif /* _ASM_X86_REBOOT_H */