drivers/misc/sgi-xp/xpc.h
Source file repositories/reference/linux-study-clean/drivers/misc/sgi-xp/xpc.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/misc/sgi-xp/xpc.h- Extension
.h- Size
- 26079 bytes
- Lines
- 733
- Domain
- Driver Families
- Bucket
- drivers/misc
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- 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/wait.hlinux/completion.hlinux/timer.hlinux/sched.hxp.h
Detected Declarations
struct xpc_rsvd_pagestruct xpc_heartbeat_uvstruct xpc_gru_mq_uvstruct xpc_activate_mq_msghdr_uvstruct xpc_activate_mq_msg_uvstruct xpc_activate_mq_msg_activate_req_uvstruct xpc_activate_mq_msg_deactivate_req_uvstruct xpc_activate_mq_msg_chctl_closerequest_uvstruct xpc_activate_mq_msg_chctl_closereply_uvstruct xpc_activate_mq_msg_chctl_openrequest_uvstruct xpc_activate_mq_msg_chctl_openreply_uvstruct xpc_activate_mq_msg_chctl_opencomplete_uvstruct xpc_openclose_argsstruct xpc_fifo_entry_uvstruct xpc_fifo_head_uvstruct xpc_notify_mq_msghdr_uvstruct xpc_notify_mq_msg_uvstruct xpc_send_msg_slot_uvstruct xpc_channel_uvstruct xpc_channelstruct xpc_partition_uvstruct xpc_partitionstruct xpc_arch_operationsfunction xpc_any_openclose_chctl_flags_setfunction xpc_any_msg_chctl_flags_setfunction xpc_wakeup_channel_mgrfunction xpc_msgqueue_reffunction xpc_msgqueue_dereffunction xpc_disconnect_channelfunction xpc_part_ref
Annotated Snippet
struct xpc_rsvd_page {
u64 SAL_signature; /* SAL: unique signature */
u64 SAL_version; /* SAL: version */
short SAL_partid; /* SAL: partition ID */
short max_npartitions; /* value of XPC_MAX_PARTITIONS */
u8 version;
u8 pad1[3]; /* align to next u64 in 1st 64-byte cacheline */
unsigned long ts_jiffies; /* timestamp when rsvd pg was setup by XPC */
union {
struct {
unsigned long heartbeat_gpa; /* phys addr */
unsigned long activate_gru_mq_desc_gpa; /* phys addr */
} uv;
} sn;
u64 pad2[9]; /* align to last u64 in 2nd 64-byte cacheline */
u64 SAL_nasids_size; /* SAL: size of each nasid mask in bytes */
};
#define XPC_RP_VERSION _XPC_VERSION(3, 0) /* version 3.0 of the reserved page */
/* the reserved page sizes and offsets */
#define XPC_RP_HEADER_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_rsvd_page))
#define XPC_RP_PART_NASIDS(_rp) ((unsigned long *)((u8 *)(_rp) + \
XPC_RP_HEADER_SIZE))
#define XPC_RP_MACH_NASIDS(_rp) (XPC_RP_PART_NASIDS(_rp) + \
xpc_nasid_mask_nlongs)
/*
* The following structure describes the partition's heartbeat info which
* will be periodically read by other partitions to determine whether this
* XPC is still 'alive'.
*/
struct xpc_heartbeat_uv {
unsigned long value;
unsigned long offline; /* if 0, heartbeat should be changing */
};
/*
* Info pertinent to a GRU message queue using a watch list for irq generation.
*/
struct xpc_gru_mq_uv {
void *address; /* address of GRU message queue */
unsigned int order; /* size of GRU message queue as a power of 2 */
int irq; /* irq raised when message is received in mq */
int mmr_blade; /* blade where watchlist was allocated from */
unsigned long mmr_offset; /* offset of irq mmr located on mmr_blade */
unsigned long mmr_value; /* value of irq mmr located on mmr_blade */
int watchlist_num; /* number of watchlist allocatd by BIOS */
void *gru_mq_desc; /* opaque structure used by the GRU driver */
};
/*
* The activate_mq is used to send/receive GRU messages that affect XPC's
* partition active state and channel state. This is uv only.
*/
struct xpc_activate_mq_msghdr_uv {
unsigned int gru_msg_hdr; /* FOR GRU INTERNAL USE ONLY */
short partid; /* sender's partid */
u8 act_state; /* sender's act_state at time msg sent */
u8 type; /* message's type */
unsigned long rp_ts_jiffies; /* timestamp of sender's rp setup by XPC */
};
/* activate_mq defined message types */
#define XPC_ACTIVATE_MQ_MSG_SYNC_ACT_STATE_UV 0
#define XPC_ACTIVATE_MQ_MSG_ACTIVATE_REQ_UV 1
#define XPC_ACTIVATE_MQ_MSG_DEACTIVATE_REQ_UV 2
#define XPC_ACTIVATE_MQ_MSG_CHCTL_CLOSEREQUEST_UV 3
#define XPC_ACTIVATE_MQ_MSG_CHCTL_CLOSEREPLY_UV 4
#define XPC_ACTIVATE_MQ_MSG_CHCTL_OPENREQUEST_UV 5
#define XPC_ACTIVATE_MQ_MSG_CHCTL_OPENREPLY_UV 6
#define XPC_ACTIVATE_MQ_MSG_CHCTL_OPENCOMPLETE_UV 7
#define XPC_ACTIVATE_MQ_MSG_MARK_ENGAGED_UV 8
#define XPC_ACTIVATE_MQ_MSG_MARK_DISENGAGED_UV 9
struct xpc_activate_mq_msg_uv {
struct xpc_activate_mq_msghdr_uv hdr;
};
struct xpc_activate_mq_msg_activate_req_uv {
struct xpc_activate_mq_msghdr_uv hdr;
unsigned long rp_gpa;
unsigned long heartbeat_gpa;
unsigned long activate_gru_mq_desc_gpa;
Annotation
- Immediate include surface: `linux/wait.h`, `linux/completion.h`, `linux/timer.h`, `linux/sched.h`, `xp.h`.
- Detected declarations: `struct xpc_rsvd_page`, `struct xpc_heartbeat_uv`, `struct xpc_gru_mq_uv`, `struct xpc_activate_mq_msghdr_uv`, `struct xpc_activate_mq_msg_uv`, `struct xpc_activate_mq_msg_activate_req_uv`, `struct xpc_activate_mq_msg_deactivate_req_uv`, `struct xpc_activate_mq_msg_chctl_closerequest_uv`, `struct xpc_activate_mq_msg_chctl_closereply_uv`, `struct xpc_activate_mq_msg_chctl_openrequest_uv`.
- Atlas domain: Driver Families / drivers/misc.
- 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.