arch/powerpc/kernel/static_call.c
Source file repositories/reference/linux-study-clean/arch/powerpc/kernel/static_call.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/kernel/static_call.c- Extension
.c- Size
- 1719 bytes
- Lines
- 66
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
Dependency Surface
linux/memory.hlinux/static_call.hasm/text-patching.h
Detected Declarations
function arch_static_call_transformexport arch_static_call_transform
Annotated Snippet
if (func && !is_short) {
err = patch_ulong(tramp + PPC_SCT_DATA, _func);
if (err)
goto out;
}
if (!func)
err = patch_instruction(tramp, ppc_inst(PPC_RAW_BLR()));
else if (is_ret0)
err = patch_branch(tramp, _ret0, 0);
else if (is_short)
err = patch_branch(tramp, _func, 0);
else
err = patch_instruction(tramp, ppc_inst(PPC_RAW_NOP()));
} else {
err = 0;
}
out:
mutex_unlock(&text_mutex);
if (err)
panic("%s: patching failed %pS at %pS\n", __func__, func, tramp);
}
EXPORT_SYMBOL_GPL(arch_static_call_transform);
Annotation
- Immediate include surface: `linux/memory.h`, `linux/static_call.h`, `asm/text-patching.h`.
- Detected declarations: `function arch_static_call_transform`, `export arch_static_call_transform`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.