system_misc.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef __ASM_ARM_SYSTEM_MISC_H
  2. #define __ASM_ARM_SYSTEM_MISC_H
  3. #ifndef __ASSEMBLY__
  4. #include <linux/compiler.h>
  5. #include <linux/linkage.h>
  6. #include <linux/irqflags.h>
  7. #include <linux/reboot.h>
  8. #include <linux/percpu.h>
  9. extern void cpu_init(void);
  10. void soft_restart(unsigned long);
  11. extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
  12. extern void (*arm_pm_idle)(void);
  13. #ifdef CONFIG_HARDEN_BRANCH_PREDICTOR
  14. typedef void (*harden_branch_predictor_fn_t)(void);
  15. DECLARE_PER_CPU(harden_branch_predictor_fn_t, harden_branch_predictor_fn);
  16. static inline void harden_branch_predictor(void)
  17. {
  18. harden_branch_predictor_fn_t fn = per_cpu(harden_branch_predictor_fn,
  19. smp_processor_id());
  20. if (fn)
  21. fn();
  22. }
  23. #else
  24. #define harden_branch_predictor() do { } while (0)
  25. #endif
  26. #define UDBG_UNDEFINED (1 << 0)
  27. #define UDBG_SYSCALL (1 << 1)
  28. #define UDBG_BADABORT (1 << 2)
  29. #define UDBG_SEGV (1 << 3)
  30. #define UDBG_BUS (1 << 4)
  31. extern unsigned int user_debug;
  32. #endif /* !__ASSEMBLY__ */
  33. #endif /* __ASM_ARM_SYSTEM_MISC_H */