1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 29f97da78SDavid Howells #ifndef __ASM_ARM_SYSTEM_MISC_H 39f97da78SDavid Howells #define __ASM_ARM_SYSTEM_MISC_H 49f97da78SDavid Howells 59f97da78SDavid Howells #ifndef __ASSEMBLY__ 69f97da78SDavid Howells 79f97da78SDavid Howells #include <linux/compiler.h> 89f97da78SDavid Howells #include <linux/linkage.h> 99f97da78SDavid Howells #include <linux/irqflags.h> 107b6d864bSRobin Holt #include <linux/reboot.h> 11*f5fe12b1SRussell King #include <linux/percpu.h> 129f97da78SDavid Howells 139f97da78SDavid Howells extern void cpu_init(void); 149f97da78SDavid Howells 159f97da78SDavid Howells void soft_restart(unsigned long); 160195c002SLinus Torvalds extern void (*arm_pm_idle)(void); 179f97da78SDavid Howells 18*f5fe12b1SRussell King #ifdef CONFIG_HARDEN_BRANCH_PREDICTOR 19*f5fe12b1SRussell King typedef void (*harden_branch_predictor_fn_t)(void); 20*f5fe12b1SRussell King DECLARE_PER_CPU(harden_branch_predictor_fn_t, harden_branch_predictor_fn); harden_branch_predictor(void)21*f5fe12b1SRussell Kingstatic inline void harden_branch_predictor(void) 22*f5fe12b1SRussell King { 23*f5fe12b1SRussell King harden_branch_predictor_fn_t fn = per_cpu(harden_branch_predictor_fn, 24*f5fe12b1SRussell King smp_processor_id()); 25*f5fe12b1SRussell King if (fn) 26*f5fe12b1SRussell King fn(); 27*f5fe12b1SRussell King } 28*f5fe12b1SRussell King #else 29*f5fe12b1SRussell King #define harden_branch_predictor() do { } while (0) 30*f5fe12b1SRussell King #endif 31*f5fe12b1SRussell King 329f97da78SDavid Howells #define UDBG_UNDEFINED (1 << 0) 339f97da78SDavid Howells #define UDBG_SYSCALL (1 << 1) 349f97da78SDavid Howells #define UDBG_BADABORT (1 << 2) 359f97da78SDavid Howells #define UDBG_SEGV (1 << 3) 369f97da78SDavid Howells #define UDBG_BUS (1 << 4) 379f97da78SDavid Howells 389f97da78SDavid Howells extern unsigned int user_debug; 399f97da78SDavid Howells 409f97da78SDavid Howells #endif /* !__ASSEMBLY__ */ 419f97da78SDavid Howells 429f97da78SDavid Howells #endif /* __ASM_ARM_SYSTEM_MISC_H */ 43