arch/powerpc/platforms/powernv/copy-paste.h
Source file repositories/reference/linux-study-clean/arch/powerpc/platforms/powernv/copy-paste.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/platforms/powernv/copy-paste.h- Extension
.h- Size
- 817 bytes
- Lines
- 43
- 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.
Dependency Surface
asm/ppc-opcode.hasm/reg.h
Detected Declarations
function addressfunction vas_paste
Annotated Snippet
#include <asm/ppc-opcode.h>
#include <asm/reg.h>
/*
* Copy/paste instructions:
*
* copy RA,RB
* Copy contents of address (RA) + effective_address(RB)
* to internal copy-buffer.
*
* paste RA,RB
* Paste contents of internal copy-buffer to the address
* (RA) + effective_address(RB)
*/
static inline int vas_copy(void *crb, int offset)
{
asm volatile(PPC_COPY(%0, %1)";"
:
: "b" (offset), "b" (crb)
: "memory");
return 0;
}
static inline int vas_paste(void *paste_address, int offset)
{
u32 cr;
cr = 0;
asm volatile(PPC_PASTE(%1, %2)";"
"mfocrf %0, 0x80;"
: "=r" (cr)
: "b" (offset), "b" (paste_address)
: "memory", "cr0");
/* We mask with 0xE to ignore SO */
return (cr >> CR0_SHIFT) & 0xE;
}
Annotation
- Immediate include surface: `asm/ppc-opcode.h`, `asm/reg.h`.
- Detected declarations: `function address`, `function vas_paste`.
- 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.