reset.c 484 B

1234567891011121314151617181920212223242526272829303132
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (C) 2012 Regents of the University of California
  4. */
  5. #include <linux/reboot.h>
  6. #include <linux/pm.h>
  7. static void default_power_off(void)
  8. {
  9. while (1)
  10. wait_for_interrupt();
  11. }
  12. void (*pm_power_off)(void) = default_power_off;
  13. EXPORT_SYMBOL(pm_power_off);
  14. void machine_restart(char *cmd)
  15. {
  16. do_kernel_restart(cmd);
  17. while (1);
  18. }
  19. void machine_halt(void)
  20. {
  21. pm_power_off();
  22. }
  23. void machine_power_off(void)
  24. {
  25. pm_power_off();
  26. }