blob: 04c17be9b5fdab86845999cc594634558fec18e3 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
H. Peter Anvin1965aae2008-10-22 22:26:29 -07002#ifndef _ASM_X86_REBOOT_H
3#define _ASM_X86_REBOOT_H
Jeremy Fitzhardinge07f33312007-05-02 19:27:11 +02004
Eduardo Habkostc370e5e2008-11-12 11:34:41 -02005#include <linux/kdebug.h>
6
Jeremy Fitzhardinge07f33312007-05-02 19:27:11 +02007struct pt_regs;
8
Joe Perches78db4c62008-03-23 01:03:18 -07009struct machine_ops {
Jeremy Fitzhardinge07f33312007-05-02 19:27:11 +020010 void (*restart)(char *cmd);
11 void (*halt)(void);
12 void (*power_off)(void);
13 void (*shutdown)(void);
14 void (*crash_shutdown)(struct pt_regs *);
15 void (*emergency_restart)(void);
16};
17
18extern struct machine_ops machine_ops;
Xunlei Pang5bc32952017-03-13 10:50:19 +010019extern int crashing_cpu;
Jeremy Fitzhardinge07f33312007-05-02 19:27:11 +020020
Glauber Costaed23dc62008-03-17 16:08:38 -030021void native_machine_crash_shutdown(struct pt_regs *regs);
Glauber Costa3c62c622008-03-17 16:08:39 -030022void native_machine_shutdown(void);
H. Peter Anvin65051392012-06-16 21:47:37 -070023void __noreturn machine_real_restart(unsigned int type);
24/* These must match dispatch in arch/x86/realmore/rm/reboot.S */
H. Peter Anvin3d35ac32011-02-14 18:36:03 -080025#define MRR_BIOS 0
26#define MRR_APM 1
Jeremy Fitzhardinge07f33312007-05-02 19:27:11 +020027
Don Zickus9c48f1c2011-09-30 15:06:21 -040028typedef void (*nmi_shootdown_cb)(int, struct pt_regs*);
Yi Wang89f579c2018-11-22 10:04:09 +080029void nmi_panic_self_stop(struct pt_regs *regs);
Eduardo Habkostc370e5e2008-11-12 11:34:41 -020030void nmi_shootdown_cpus(nmi_shootdown_cb callback);
Hidehiro Kawaib279d672015-12-14 11:19:13 +010031void run_crash_ipi_callback(struct pt_regs *regs);
Eduardo Habkostc370e5e2008-11-12 11:34:41 -020032
H. Peter Anvin1965aae2008-10-22 22:26:29 -070033#endif /* _ASM_X86_REBOOT_H */