arch/x86/include/asm/mwait.h
Source file repositories/reference/linux-study-clean/arch/x86/include/asm/mwait.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/include/asm/mwait.h- Extension
.h- Size
- 4718 bytes
- Lines
- 151
- Domain
- Architecture Layer
- Bucket
- arch/x86
- 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.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
Dependency Surface
linux/sched.hlinux/sched/idle.hasm/cpufeature.hasm/nospec-branch.h
Detected Declarations
function __monitorfunction __monitorxfunction __mwaitfunction unusedfunction __sti_mwaitfunction MWAITfunction __tpause
Annotated Snippet
if (ecx & 1) {
__mwait(eax, ecx);
} else {
__sti_mwait(eax, ecx);
raw_local_irq_disable();
}
}
out:
current_clr_polling();
}
/*
* Caller can specify whether to enter C0.1 (low latency, less
* power saving) or C0.2 state (saves more power, but longer wakeup
* latency). This may be overridden by the IA32_UMWAIT_CONTROL MSR
* which can force requests for C0.2 to be downgraded to C0.1.
*/
static inline void __tpause(u32 ecx, u32 edx, u32 eax)
{
/* "tpause %ecx" */
asm volatile(".byte 0x66, 0x0f, 0xae, 0xf1"
:: "c" (ecx), "d" (edx), "a" (eax));
}
#endif /* _ASM_X86_MWAIT_H */
Annotation
- Immediate include surface: `linux/sched.h`, `linux/sched/idle.h`, `asm/cpufeature.h`, `asm/nospec-branch.h`.
- Detected declarations: `function __monitor`, `function __monitorx`, `function __mwait`, `function unused`, `function __sti_mwait`, `function MWAIT`, `function __tpause`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.