diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2018-06-22 21:20:35 +0200 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2018-06-22 21:20:35 +0200 | 
| commit | 7731b8bc94e599c9a79e428f3359ff2c34b7576a (patch) | |
| tree | 879f18ccbe274122f2d4f095b43cbc7f953e0ada /arch/arm/include/asm/system_misc.h | |
| parent | 48e315618dc4dc8904182cd221e3d395d5d97005 (diff) | |
| parent | 9ffc59d57228d74809700be6f7ecb1db10292f05 (diff) | |
Merge branch 'linus' into x86/urgent
Required to queue a dependent fix.
Diffstat (limited to 'arch/arm/include/asm/system_misc.h')
| -rw-r--r-- | arch/arm/include/asm/system_misc.h | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/include/asm/system_misc.h b/arch/arm/include/asm/system_misc.h index 78f6db114faf..8e76db83c498 100644 --- a/arch/arm/include/asm/system_misc.h +++ b/arch/arm/include/asm/system_misc.h @@ -8,6 +8,7 @@  #include <linux/linkage.h>  #include <linux/irqflags.h>  #include <linux/reboot.h> +#include <linux/percpu.h>  extern void cpu_init(void); @@ -15,6 +16,20 @@ void soft_restart(unsigned long);  extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);  extern void (*arm_pm_idle)(void); +#ifdef CONFIG_HARDEN_BRANCH_PREDICTOR +typedef void (*harden_branch_predictor_fn_t)(void); +DECLARE_PER_CPU(harden_branch_predictor_fn_t, harden_branch_predictor_fn); +static inline void harden_branch_predictor(void) +{ +	harden_branch_predictor_fn_t fn = per_cpu(harden_branch_predictor_fn, +						  smp_processor_id()); +	if (fn) +		fn(); +} +#else +#define harden_branch_predictor() do { } while (0) +#endif +  #define UDBG_UNDEFINED	(1 << 0)  #define UDBG_SYSCALL	(1 << 1)  #define UDBG_BADABORT	(1 << 2)  | 
