drivers/misc/sgi-xp/xp.h
Source file repositories/reference/linux-study-clean/drivers/misc/sgi-xp/xp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/misc/sgi-xp/xp.h- Extension
.h- Size
- 12363 bytes
- Lines
- 342
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mutex.hasm/uv/uv.h
Detected Declarations
struct xpc_registrationstruct xpc_interfaceenum xp_retvalfunction xpc_sendfunction xpc_send_notifyfunction xpc_receivedfunction xpc_partid_to_nasids
Annotated Snippet
struct xpc_registration {
struct mutex mutex;
xpc_channel_func func; /* function to call */
void *key; /* pointer to user's key */
u16 nentries; /* #of msg entries in local msg queue */
u16 entry_size; /* message queue's message entry size */
u32 assigned_limit; /* limit on #of assigned kthreads */
u32 idle_limit; /* limit on #of idle kthreads */
} ____cacheline_aligned;
#define XPC_CHANNEL_REGISTERED(_c) (xpc_registrations[_c].func != NULL)
/* the following are valid xpc_send() or xpc_send_notify() flags */
#define XPC_WAIT 0 /* wait flag */
#define XPC_NOWAIT 1 /* no wait flag */
struct xpc_interface {
void (*connect) (int);
void (*disconnect) (int);
enum xp_retval (*send) (short, int, u32, void *, u16);
enum xp_retval (*send_notify) (short, int, u32, void *, u16,
xpc_notify_func, void *);
void (*received) (short, int, void *);
enum xp_retval (*partid_to_nasids) (short, void *);
};
extern struct xpc_interface xpc_interface;
extern void xpc_set_interface(void (*)(int),
void (*)(int),
enum xp_retval (*)(short, int, u32, void *, u16),
enum xp_retval (*)(short, int, u32, void *, u16,
xpc_notify_func, void *),
void (*)(short, int, void *),
enum xp_retval (*)(short, void *));
extern void xpc_clear_interface(void);
extern enum xp_retval xpc_connect(int, xpc_channel_func, void *, u16,
u16, u32, u32);
extern void xpc_disconnect(int);
static inline enum xp_retval
xpc_send(short partid, int ch_number, u32 flags, void *payload,
u16 payload_size)
{
if (!xpc_interface.send)
return xpNotLoaded;
return xpc_interface.send(partid, ch_number, flags, payload,
payload_size);
}
static inline enum xp_retval
xpc_send_notify(short partid, int ch_number, u32 flags, void *payload,
u16 payload_size, xpc_notify_func func, void *key)
{
if (!xpc_interface.send_notify)
return xpNotLoaded;
return xpc_interface.send_notify(partid, ch_number, flags, payload,
payload_size, func, key);
}
static inline void
xpc_received(short partid, int ch_number, void *payload)
{
if (xpc_interface.received)
xpc_interface.received(partid, ch_number, payload);
}
static inline enum xp_retval
xpc_partid_to_nasids(short partid, void *nasids)
{
if (!xpc_interface.partid_to_nasids)
return xpNotLoaded;
return xpc_interface.partid_to_nasids(partid, nasids);
}
extern short xp_max_npartitions;
extern short xp_partition_id;
extern u8 xp_region_size;
extern unsigned long (*xp_pa) (void *);
extern unsigned long (*xp_socket_pa) (unsigned long);
extern enum xp_retval (*xp_remote_memcpy) (unsigned long, const unsigned long,
size_t);
extern int (*xp_cpu_to_nasid) (int);
extern enum xp_retval (*xp_expand_memprotect) (unsigned long, unsigned long);
extern enum xp_retval (*xp_restrict_memprotect) (unsigned long, unsigned long);
Annotation
- Immediate include surface: `linux/mutex.h`, `asm/uv/uv.h`.
- Detected declarations: `struct xpc_registration`, `struct xpc_interface`, `enum xp_retval`, `function xpc_send`, `function xpc_send_notify`, `function xpc_received`, `function xpc_partid_to_nasids`.
- Atlas domain: Driver Families / drivers/misc.
- Implementation status: source implementation candidate.
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.