arch/powerpc/include/asm/spu.h
Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/spu.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/include/asm/spu.h- Extension
.h- Size
- 23975 bytes
- Lines
- 680
- 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
linux/workqueue.hlinux/device.hlinux/mutex.hasm/reg.hasm/copro.h
Detected Declarations
struct spu_contextstruct spu_runqueuestruct spu_lscsastruct device_nodestruct spustruct cbe_spu_infostruct mm_structstruct spu_syscall_blockstruct filestruct coredump_paramsstruct spufs_callsstruct mfc_cq_srstruct spu_problemstruct spu_priv2struct spu_priv1enum spu_utilization_state
Annotated Snippet
struct spu {
const char *name;
unsigned long local_store_phys;
u8 *local_store;
unsigned long problem_phys;
struct spu_problem __iomem *problem;
struct spu_priv2 __iomem *priv2;
struct list_head cbe_list;
struct list_head full_list;
enum { SPU_FREE, SPU_USED } alloc_state;
int number;
unsigned int irqs[3];
u32 node;
unsigned long flags;
u64 class_0_pending;
u64 class_0_dar;
u64 class_1_dar;
u64 class_1_dsisr;
size_t ls_size;
unsigned int slb_replace;
struct mm_struct *mm;
struct spu_context *ctx;
struct spu_runqueue *rq;
unsigned long long timestamp;
pid_t pid;
pid_t tgid;
spinlock_t register_lock;
void (* wbox_callback)(struct spu *spu);
void (* ibox_callback)(struct spu *spu);
void (* stop_callback)(struct spu *spu, int irq);
void (* mfc_callback)(struct spu *spu);
char irq_c0[8];
char irq_c1[8];
char irq_c2[8];
u64 spe_id;
void* pdata; /* platform private data */
/* of based platforms only */
struct device_node *devnode;
/* native only */
struct spu_priv1 __iomem *priv1;
/* beat only */
u64 shadow_int_mask_RW[3];
struct device dev;
int has_mem_affinity;
struct list_head aff_list;
struct {
/* protected by interrupt reentrancy */
enum spu_utilization_state util_state;
unsigned long long tstamp;
unsigned long long times[SPU_UTIL_MAX];
unsigned long long vol_ctx_switch;
unsigned long long invol_ctx_switch;
unsigned long long min_flt;
unsigned long long maj_flt;
unsigned long long hash_flt;
unsigned long long slb_flt;
unsigned long long class2_intr;
unsigned long long libassist;
} stats;
};
struct cbe_spu_info {
struct mutex list_mutex;
struct list_head spus;
int n_spus;
int nr_active;
atomic_t busy_spus;
atomic_t reserved_spus;
};
extern struct cbe_spu_info cbe_spu_info[];
void spu_init_channels(struct spu *spu);
void spu_irq_setaffinity(struct spu *spu, int cpu);
void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa,
void *code, int code_size);
extern void spu_invalidate_slbs(struct spu *spu);
extern void spu_associate_mm(struct spu *spu, struct mm_struct *mm);
Annotation
- Immediate include surface: `linux/workqueue.h`, `linux/device.h`, `linux/mutex.h`, `asm/reg.h`, `asm/copro.h`.
- Detected declarations: `struct spu_context`, `struct spu_runqueue`, `struct spu_lscsa`, `struct device_node`, `struct spu`, `struct cbe_spu_info`, `struct mm_struct`, `struct spu_syscall_block`, `struct file`, `struct coredump_params`.
- 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.