arch/powerpc/include/asm/spu_csa.h
Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/spu_csa.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/include/asm/spu_csa.h- Extension
.h- Size
- 6167 bytes
- Lines
- 248
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct spu_reg128struct spu_lscsastruct spu_problem_collapsedstruct spu_priv1_collapsedstruct spu_priv2_collapsedstruct spu_state
Annotated Snippet
struct spu_reg128 {
u32 slot[4];
};
/**
* struct spu_lscsa - Local Store Context Save Area.
* @gprs: Array of saved registers.
* @fpcr: Saved floating point status control register.
* @decr: Saved decrementer value.
* @decr_status: Indicates software decrementer status flags.
* @ppu_mb: Saved PPU mailbox data.
* @ppuint_mb: Saved PPU interrupting mailbox data.
* @tag_mask: Saved tag group mask.
* @event_mask: Saved event mask.
* @srr0: Saved SRR0.
* @stopped_status: Conditions to be recreated by restore.
* @ls: Saved contents of Local Storage Area.
*
* The LSCSA represents state that is primarily saved and
* restored by SPU-side code.
*/
struct spu_lscsa {
struct spu_reg128 gprs[128];
struct spu_reg128 fpcr;
struct spu_reg128 decr;
struct spu_reg128 decr_status;
struct spu_reg128 ppu_mb;
struct spu_reg128 ppuint_mb;
struct spu_reg128 tag_mask;
struct spu_reg128 event_mask;
struct spu_reg128 srr0;
struct spu_reg128 stopped_status;
/*
* 'ls' must be page-aligned on all configurations.
* Since we don't want to rely on having the spu-gcc
* installed to build the kernel and this structure
* is used in the SPU-side code, make it 64k-page
* aligned for now.
*/
unsigned char ls[LS_SIZE] __attribute__((aligned(65536)));
};
#ifndef __SPU__
/*
* struct spu_problem_collapsed - condensed problem state area, w/o pads.
*/
struct spu_problem_collapsed {
u64 spc_mssync_RW;
u32 mfc_lsa_W;
u32 unused_pad0;
u64 mfc_ea_W;
union mfc_tag_size_class_cmd mfc_union_W;
u32 dma_qstatus_R;
u32 dma_querytype_RW;
u32 dma_querymask_RW;
u32 dma_tagstatus_R;
u32 pu_mb_R;
u32 spu_mb_W;
u32 mb_stat_R;
u32 spu_runcntl_RW;
u32 spu_status_R;
u32 spu_spc_R;
u32 spu_npc_RW;
u32 signal_notify1;
u32 signal_notify2;
u32 unused_pad1;
};
/*
* struct spu_priv1_collapsed - condensed privileged 1 area, w/o pads.
*/
struct spu_priv1_collapsed {
u64 mfc_sr1_RW;
u64 mfc_lpid_RW;
u64 spu_idr_RW;
u64 mfc_vr_RO;
u64 spu_vr_RO;
u64 int_mask_class0_RW;
u64 int_mask_class1_RW;
u64 int_mask_class2_RW;
u64 int_stat_class0_RW;
u64 int_stat_class1_RW;
u64 int_stat_class2_RW;
u64 int_route_RW;
u64 mfc_atomic_flush_RW;
u64 resource_allocation_groupID_RW;
u64 resource_allocation_enable_RW;
u64 mfc_fir_R;
u64 mfc_fir_status_or_W;
Annotation
- Detected declarations: `struct spu_reg128`, `struct spu_lscsa`, `struct spu_problem_collapsed`, `struct spu_priv1_collapsed`, `struct spu_priv2_collapsed`, `struct spu_state`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: source 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.