reboot.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_X86_REBOOT_H
  3. #define _ASM_X86_REBOOT_H
  4. #include <linux/kdebug.h>
  5. struct pt_regs;
  6. struct machine_ops {
  7. void (*restart)(char *cmd);
  8. void (*halt)(void);
  9. void (*power_off)(void);
  10. void (*shutdown)(void);
  11. void (*crash_shutdown)(struct pt_regs *);
  12. void (*emergency_restart)(void);
  13. };
  14. extern struct machine_ops machine_ops;
  15. extern int crashing_cpu;
  16. void native_machine_crash_shutdown(struct pt_regs *regs);
  17. void native_machine_shutdown(void);
  18. void __noreturn machine_real_restart(unsigned int type);
  19. /* These must match dispatch in arch/x86/realmore/rm/reboot.S */
  20. #define MRR_BIOS 0
  21. #define MRR_APM 1
  22. typedef void crash_vmclear_fn(void);
  23. extern crash_vmclear_fn __rcu *crash_vmclear_loaded_vmcss;
  24. void cpu_emergency_disable_virtualization(void);
  25. typedef void (*nmi_shootdown_cb)(int, struct pt_regs*);
  26. void nmi_panic_self_stop(struct pt_regs *regs);
  27. void nmi_shootdown_cpus(nmi_shootdown_cb callback);
  28. void run_crash_ipi_callback(struct pt_regs *regs);
  29. #endif /* _ASM_X86_REBOOT_H */