1 // SPDX-License-Identifier: GPL-2.0-only
3 * Low-level idle sequences
7 #include <linux/irqflags.h>
9 #include <asm/barrier.h>
10 #include <asm/cpuidle.h>
11 #include <asm/cpufeature.h>
12 #include <asm/sysreg.h>
17 * Idle the processor (wait for interrupt).
19 * If the CPU supports priority masking we must do additional work to
20 * ensure that interrupts are not masked at the PMR (because the core will
21 * not wake up if we block the wake up signal in the interrupt controller).
23 void noinstr cpu_do_idle(void)
25 struct arm_cpuidle_irq_context context;
27 arm_cpuidle_save_irq_context(&context);
32 arm_cpuidle_restore_irq_context(&context);
36 * This is our default idle handler.
38 void noinstr arch_cpu_idle(void)
41 * This should do all the clock switching and wait for interrupt
45 raw_local_irq_enable();