diff options
author | Suzuki K Poulose <suzuki.poulose@arm.com> | 2016-02-23 11:31:39 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2016-02-24 18:17:44 +0100 |
commit | c4bc34d20273db698c51951a1951dba0a722e162 (patch) | |
tree | 2c453a2ceef319fab387415016f9c7cb6039f979 /arch/arm64/include | |
parent | arm64: efi: invoke EFI_RNG_PROTOCOL to supply KASLR randomness (diff) | |
download | linux-c4bc34d20273db698c51951a1951dba0a722e162.tar.xz linux-c4bc34d20273db698c51951a1951dba0a722e162.zip |
arm64: Add a helper for parking CPUs in a loop
Adds a routine which can be used to park CPUs (spinning in kernel)
when they can't be killed.
Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/smp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h index 2013a4dc5124..b93eb3303131 100644 --- a/arch/arm64/include/asm/smp.h +++ b/arch/arm64/include/asm/smp.h @@ -78,4 +78,12 @@ extern int __cpu_disable(void); extern void __cpu_die(unsigned int cpu); extern void cpu_die(void); +static inline void cpu_park_loop(void) +{ + for (;;) { + wfe(); + wfi(); + } +} + #endif /* ifndef __ASM_SMP_H */ |