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.

Dependency Surface

Detected Declarations

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

Implementation Notes