arch/powerpc/kernel/epapr_hcalls.S
Source file repositories/reference/linux-study-clean/arch/powerpc/kernel/epapr_hcalls.S
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/kernel/epapr_hcalls.S- Extension
.S- Size
- 1227 bytes
- Lines
- 59
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
linux/export.hlinux/threads.hasm/epapr_hcalls.hasm/reg.hasm/page.hasm/cputable.hasm/thread_info.hasm/ppc_asm.hasm/asm-compat.hasm/asm-offsets.h
Detected Declarations
export epapr_hypercall_start
Annotated Snippet
#include <linux/export.h>
#include <linux/threads.h>
#include <asm/epapr_hcalls.h>
#include <asm/reg.h>
#include <asm/page.h>
#include <asm/cputable.h>
#include <asm/thread_info.h>
#include <asm/ppc_asm.h>
#include <asm/asm-compat.h>
#include <asm/asm-offsets.h>
#ifndef CONFIG_PPC64
/* epapr_ev_idle() was derived from e500_idle() */
_GLOBAL(epapr_ev_idle)
PPC_LL r4, TI_LOCAL_FLAGS(r2) /* set napping bit */
ori r4, r4,_TLF_NAPPING /* so when we take an exception */
PPC_STL r4, TI_LOCAL_FLAGS(r2) /* it will return to our caller */
#ifdef CONFIG_BOOKE
wrteei 1
#else
mfmsr r4
ori r4, r4, MSR_EE
mtmsr r4
#endif
idle_loop:
LOAD_REG_IMMEDIATE(r11, EV_HCALL_TOKEN(EV_IDLE))
.global epapr_ev_idle_start
epapr_ev_idle_start:
li r3, -1
nop
nop
nop
/*
* Guard against spurious wakeups from a hypervisor --
* only interrupt will cause us to return to LR due to
* _TLF_NAPPING.
*/
b idle_loop
#endif
/* Hypercall entry point. Will be patched with device tree instructions. */
.global epapr_hypercall_start
epapr_hypercall_start:
li r3, -1
nop
nop
nop
blr
EXPORT_SYMBOL(epapr_hypercall_start)
Annotation
- Immediate include surface: `linux/export.h`, `linux/threads.h`, `asm/epapr_hcalls.h`, `asm/reg.h`, `asm/page.h`, `asm/cputable.h`, `asm/thread_info.h`, `asm/ppc_asm.h`.
- Detected declarations: `export epapr_hypercall_start`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: integration 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.