drm/nouveau: consume the return of large GSP message
[drm/drm-misc.git] / arch / arm64 / kernel / idle.c
blob05cfb347ec2679e262574e2763a7a79b47318f65
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Low-level idle sequences
4 */
6 #include <linux/cpu.h>
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>
15 * cpu_do_idle()
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 __cpuidle cpu_do_idle(void)
25 struct arm_cpuidle_irq_context context;
27 arm_cpuidle_save_irq_context(&context);
29 dsb(sy);
30 wfi();
32 arm_cpuidle_restore_irq_context(&context);
36 * This is our default idle handler.
38 void __cpuidle arch_cpu_idle(void)
41 * This should do all the clock switching and wait for interrupt
42 * tricks
44 cpu_do_idle();