// SPDX-License-Identifier: GPL-2.0-only1/*2* Low-level idle sequences3*/45#include <linux/cpu.h>6#include <linux/irqflags.h>78#include <asm/barrier.h>9#include <asm/cpuidle.h>10#include <asm/cpufeature.h>11#include <asm/sysreg.h>1213/*14* cpu_do_idle()15*16* Idle the processor (wait for interrupt).17*18* If the CPU supports priority masking we must do additional work to19* ensure that interrupts are not masked at the PMR (because the core will20* not wake up if we block the wake up signal in the interrupt controller).21*/22void __cpuidle cpu_do_idle(void)23{24struct arm_cpuidle_irq_context context;2526arm_cpuidle_save_irq_context(&context);2728dsb(sy);29wfi();3031arm_cpuidle_restore_irq_context(&context);32}3334/*35* This is our default idle handler.36*/37void __cpuidle arch_cpu_idle(void)38{39/*40* This should do all the clock switching and wait for interrupt41* tricks42*/43cpu_do_idle();44}454647