arch/riscv/include/asm/cpuidle.h

Source file repositories/reference/linux-study-clean/arch/riscv/include/asm/cpuidle.h

File Facts

System
Linux kernel
Corpus path
arch/riscv/include/asm/cpuidle.h
Extension
.h
Size
450 bytes
Lines
25
Domain
Architecture Layer
Bucket
arch/riscv
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _ASM_RISCV_CPUIDLE_H
#define _ASM_RISCV_CPUIDLE_H

#include <asm/barrier.h>
#include <asm/processor.h>

static inline void cpu_do_idle(void)
{
	/*
	 * Add mb() here to ensure that all
	 * IO/MEM accesses are completed prior
	 * to entering WFI.
	 */
	mb();
	wait_for_interrupt();
}

#endif

Annotation

Implementation Notes