arch/sparc/kernel/ds.c
Source file repositories/reference/linux-study-clean/arch/sparc/kernel/ds.c
File Facts
- System
- Linux kernel
- Corpus path
arch/sparc/kernel/ds.c- Extension
.c- Size
- 26325 bytes
- Lines
- 1273
- Domain
- Architecture Layer
- Bucket
- arch/sparc
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/types.hlinux/string.hlinux/slab.hlinux/sched.hlinux/sched/clock.hlinux/delay.hlinux/mutex.hlinux/kthread.hlinux/reboot.hlinux/cpu.hasm/hypervisor.hasm/ldc.hasm/vio.hasm/mdesc.hasm/head.hasm/irq.hkernel.h
Detected Declarations
struct ds_msg_tagstruct ds_versionstruct ds_ver_reqstruct ds_ver_ackstruct ds_ver_nackstruct ds_reg_reqstruct ds_reg_ackstruct ds_reg_nackstruct ds_unreg_reqstruct ds_unreg_ackstruct ds_unreg_nackstruct ds_datastruct ds_data_nackstruct ds_infostruct ds_cap_statestruct ds_infostruct ds_md_update_reqstruct ds_md_update_resstruct ds_shutdown_reqstruct ds_shutdown_resstruct ds_panic_reqstruct ds_panic_resstruct dr_cpu_tagstruct dr_cpu_resp_entrystruct ds_pri_msgstruct ds_var_hdrstruct ds_var_set_msgstruct ds_var_delete_msgstruct ds_var_respstruct ds_queue_entryfunction __ds_sendfunction ds_sendfunction md_update_datafunction domain_shutdown_datafunction domain_panic_datafunction __dr_cpu_send_errorfunction dr_cpu_send_errorfunction purge_dupsfunction dr_cpu_size_responsefunction dr_cpu_init_responsefunction dr_cpu_markfunction dr_cpu_configurefunction for_each_cpufunction dr_cpu_unconfigurefunction for_each_cpufunction dr_cpu_datafunction ds_pri_datafunction ds_var_data
Annotated Snippet
struct ds_msg_tag {
__u32 type;
#define DS_INIT_REQ 0x00
#define DS_INIT_ACK 0x01
#define DS_INIT_NACK 0x02
#define DS_REG_REQ 0x03
#define DS_REG_ACK 0x04
#define DS_REG_NACK 0x05
#define DS_UNREG_REQ 0x06
#define DS_UNREG_ACK 0x07
#define DS_UNREG_NACK 0x08
#define DS_DATA 0x09
#define DS_NACK 0x0a
__u32 len;
};
/* Result codes */
#define DS_OK 0x00
#define DS_REG_VER_NACK 0x01
#define DS_REG_DUP 0x02
#define DS_INV_HDL 0x03
#define DS_TYPE_UNKNOWN 0x04
struct ds_version {
__u16 major;
__u16 minor;
};
struct ds_ver_req {
struct ds_msg_tag tag;
struct ds_version ver;
};
struct ds_ver_ack {
struct ds_msg_tag tag;
__u16 minor;
};
struct ds_ver_nack {
struct ds_msg_tag tag;
__u16 major;
};
struct ds_reg_req {
struct ds_msg_tag tag;
__u64 handle;
__u16 major;
__u16 minor;
char svc_id[];
};
struct ds_reg_ack {
struct ds_msg_tag tag;
__u64 handle;
__u16 minor;
};
struct ds_reg_nack {
struct ds_msg_tag tag;
__u64 handle;
__u16 major;
};
struct ds_unreg_req {
struct ds_msg_tag tag;
__u64 handle;
};
struct ds_unreg_ack {
struct ds_msg_tag tag;
__u64 handle;
};
struct ds_unreg_nack {
struct ds_msg_tag tag;
__u64 handle;
};
struct ds_data {
struct ds_msg_tag tag;
__u64 handle;
};
struct ds_data_nack {
struct ds_msg_tag tag;
__u64 handle;
__u64 result;
};
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/types.h`, `linux/string.h`, `linux/slab.h`, `linux/sched.h`, `linux/sched/clock.h`, `linux/delay.h`.
- Detected declarations: `struct ds_msg_tag`, `struct ds_version`, `struct ds_ver_req`, `struct ds_ver_ack`, `struct ds_ver_nack`, `struct ds_reg_req`, `struct ds_reg_ack`, `struct ds_reg_nack`, `struct ds_unreg_req`, `struct ds_unreg_ack`.
- Atlas domain: Architecture Layer / arch/sparc.
- 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.