system_misc.h 1005 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_ARM_SYSTEM_MISC_H
  3. #define __ASM_ARM_SYSTEM_MISC_H
  4. #ifndef __ASSEMBLY__
  5. #include <linux/compiler.h>
  6. #include <linux/linkage.h>
  7. #include <linux/irqflags.h>
  8. #include <linux/reboot.h>
  9. #include <linux/percpu.h>
  10. extern void cpu_init(void);
  11. void soft_restart(unsigned long);
  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 */