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>
This commit is contained in:

committed by
Catalin Marinas

parent
2b5fe07a78
commit
c4bc34d202
@@ -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 */
|
||||
|
Reference in New Issue
Block a user