arch/powerpc/include/asm/plpar_wrappers.h
Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/plpar_wrappers.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/include/asm/plpar_wrappers.h- Extension
.h- Size
- 16268 bytes
- Lines
- 677
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/string.hlinux/irqflags.hlinux/delay.hasm/hvcall.hasm/paca.hasm/lppaca.hasm/page.h
Detected Declarations
function poll_pendingfunction cede_processorfunction vpa_callfunction unregister_vpafunction register_vpafunction unregister_slb_shadowfunction register_slb_shadowfunction unregister_dtlfunction register_dtlfunction htm_callfunction htm_hcall_wrapperfunction plpar_pte_enterfunction plpar_pte_removefunction plpar_pte_remove_rawfunction plpar_pte_readfunction plpar_pte_read_rawfunction plpar_pte_read_4function plpar_pte_read_4_rawfunction plpar_pte_protectfunction plpar_resize_hpt_preparefunction plpar_resize_hpt_commitfunction plpar_tce_getfunction plpar_tce_putfunction plpar_tce_put_indirectfunction plpar_tce_stufffunction plpar_set_modefunction enable_reloc_on_exceptionsfunction disable_reloc_on_exceptionsfunction enable_big_endian_exceptionsfunction enable_little_endian_exceptionsfunction plpar_set_ciabrfunction plpar_set_watchpoint0function plpar_set_watchpoint1function plpar_signal_sys_resetfunction plpar_get_cpu_characteristicsfunction plpar_guest_createfunction plpar_guest_create_vcpufunction plpar_guest_set_statefunction plpar_guest_get_statefunction plpar_guest_run_vcpufunction plpar_guest_deletefunction plpar_guest_set_capabilitiesfunction plpar_guest_get_capabilitiesfunction BUGfunction plpar_set_ciabrfunction plpar_pte_read_4function pseries_rpt_invalidatefunction plpar_guest_create_vcpu
Annotated Snippet
static inline long disable_reloc_on_exceptions(void) {
return plpar_set_mode(0, H_SET_MODE_RESOURCE_ADDR_TRANS_MODE, 0, 0);
}
/*
* Take exceptions in big endian mode on this partition
*
* Note: this call has a partition wide scope and can take a while to complete.
* If it returns H_LONG_BUSY_* it should be retried periodically until it
* returns H_SUCCESS.
*/
static inline long enable_big_endian_exceptions(void)
{
/* mflags = 0: big endian exceptions */
return plpar_set_mode(0, H_SET_MODE_RESOURCE_LE, 0, 0);
}
/*
* Take exceptions in little endian mode on this partition
*
* Note: this call has a partition wide scope and can take a while to complete.
* If it returns H_LONG_BUSY_* it should be retried periodically until it
* returns H_SUCCESS.
*/
static inline long enable_little_endian_exceptions(void)
{
/* mflags = 1: little endian exceptions */
return plpar_set_mode(1, H_SET_MODE_RESOURCE_LE, 0, 0);
}
static inline long plpar_set_ciabr(unsigned long ciabr)
{
return plpar_set_mode(0, H_SET_MODE_RESOURCE_SET_CIABR, ciabr, 0);
}
static inline long plpar_set_watchpoint0(unsigned long dawr0, unsigned long dawrx0)
{
return plpar_set_mode(0, H_SET_MODE_RESOURCE_SET_DAWR0, dawr0, dawrx0);
}
static inline long plpar_set_watchpoint1(unsigned long dawr1, unsigned long dawrx1)
{
return plpar_set_mode(0, H_SET_MODE_RESOURCE_SET_DAWR1, dawr1, dawrx1);
}
static inline long plpar_signal_sys_reset(long cpu)
{
return plpar_hcall_norets(H_SIGNAL_SYS_RESET, cpu);
}
static inline long plpar_get_cpu_characteristics(struct h_cpu_char_result *p)
{
unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
long rc;
rc = plpar_hcall(H_GET_CPU_CHARACTERISTICS, retbuf);
if (rc == H_SUCCESS) {
p->character = retbuf[0];
p->behaviour = retbuf[1];
}
return rc;
}
static inline long plpar_guest_create(unsigned long flags, unsigned long *guest_id)
{
unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
unsigned long token;
long rc;
token = -1UL;
do {
rc = plpar_hcall(H_GUEST_CREATE, retbuf, flags, token);
if (rc == H_SUCCESS)
*guest_id = retbuf[0];
if (rc == H_BUSY) {
token = retbuf[0];
cond_resched();
}
if (H_IS_LONG_BUSY(rc)) {
token = retbuf[0];
msleep(get_longbusy_msecs(rc));
rc = H_BUSY;
}
} while (rc == H_BUSY);
return rc;
Annotation
- Immediate include surface: `linux/string.h`, `linux/irqflags.h`, `linux/delay.h`, `asm/hvcall.h`, `asm/paca.h`, `asm/lppaca.h`, `asm/page.h`.
- Detected declarations: `function poll_pending`, `function cede_processor`, `function vpa_call`, `function unregister_vpa`, `function register_vpa`, `function unregister_slb_shadow`, `function register_slb_shadow`, `function unregister_dtl`, `function register_dtl`, `function htm_call`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.