#ifndef _DRIVERS_MISC_SGIXP_XPC_H
#define _DRIVERS_MISC_SGIXP_XPC_H
#include <linux/wait.h>
#include <linux/completion.h>
#include <linux/timer.h>
#include <linux/sched.h>
#include "xp.h"
#define _XPC_VERSION(_maj, _min) …
#define XPC_VERSION_MAJOR(_v) …
#define XPC_VERSION_MINOR(_v) …
#define XPC_HB_DEFAULT_INTERVAL …
#define XPC_HB_CHECK_DEFAULT_INTERVAL …
#define XPC_HB_CHECK_THREAD_NAME …
#define XPC_HB_CHECK_CPU …
#define XPC_DISCOVERY_THREAD_NAME …
struct xpc_rsvd_page { … };
#define XPC_RP_VERSION …
#define XPC_RP_HEADER_SIZE …
#define XPC_RP_PART_NASIDS(_rp) …
#define XPC_RP_MACH_NASIDS(_rp) …
struct xpc_heartbeat_uv { … };
struct xpc_gru_mq_uv { … };
struct xpc_activate_mq_msghdr_uv { … };
#define XPC_ACTIVATE_MQ_MSG_SYNC_ACT_STATE_UV …
#define XPC_ACTIVATE_MQ_MSG_ACTIVATE_REQ_UV …
#define XPC_ACTIVATE_MQ_MSG_DEACTIVATE_REQ_UV …
#define XPC_ACTIVATE_MQ_MSG_CHCTL_CLOSEREQUEST_UV …
#define XPC_ACTIVATE_MQ_MSG_CHCTL_CLOSEREPLY_UV …
#define XPC_ACTIVATE_MQ_MSG_CHCTL_OPENREQUEST_UV …
#define XPC_ACTIVATE_MQ_MSG_CHCTL_OPENREPLY_UV …
#define XPC_ACTIVATE_MQ_MSG_CHCTL_OPENCOMPLETE_UV …
#define XPC_ACTIVATE_MQ_MSG_MARK_ENGAGED_UV …
#define XPC_ACTIVATE_MQ_MSG_MARK_DISENGAGED_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 { … };
struct xpc_activate_mq_msg_chctl_openreply_uv { … };
struct xpc_activate_mq_msg_chctl_opencomplete_uv { … };
#define XPC_PACK_ARGS(_arg1, _arg2) …
#define XPC_UNPACK_ARG1(_args) …
#define XPC_UNPACK_ARG2(_args) …
struct xpc_openclose_args { … };
#define XPC_OPENCLOSE_ARGS_SIZE …
struct xpc_fifo_entry_uv { … };
struct xpc_fifo_head_uv { … };
struct xpc_notify_mq_msghdr_uv { … };
struct xpc_notify_mq_msg_uv { … };
#define XPC_N_CALL …
struct xpc_send_msg_slot_uv { … };
struct xpc_channel_uv { … };
struct xpc_channel { … } ____cacheline_aligned;
#define XPC_C_WASCONNECTED …
#define XPC_C_ROPENCOMPLETE …
#define XPC_C_OPENCOMPLETE …
#define XPC_C_ROPENREPLY …
#define XPC_C_OPENREPLY …
#define XPC_C_ROPENREQUEST …
#define XPC_C_OPENREQUEST …
#define XPC_C_SETUP …
#define XPC_C_CONNECTEDCALLOUT …
#define XPC_C_CONNECTEDCALLOUT_MADE …
#define XPC_C_CONNECTED …
#define XPC_C_CONNECTING …
#define XPC_C_RCLOSEREPLY …
#define XPC_C_CLOSEREPLY …
#define XPC_C_RCLOSEREQUEST …
#define XPC_C_CLOSEREQUEST …
#define XPC_C_DISCONNECTED …
#define XPC_C_DISCONNECTING …
#define XPC_C_DISCONNECTINGCALLOUT …
#define XPC_C_DISCONNECTINGCALLOUT_MADE …
#define XPC_C_WDISCONNECT …
xpc_channel_ctl_flags;
#define XPC_CHCTL_CLOSEREQUEST …
#define XPC_CHCTL_CLOSEREPLY …
#define XPC_CHCTL_OPENREQUEST …
#define XPC_CHCTL_OPENREPLY …
#define XPC_CHCTL_OPENCOMPLETE …
#define XPC_CHCTL_MSGREQUEST …
#define XPC_OPENCLOSE_CHCTL_FLAGS …
#define XPC_MSG_CHCTL_FLAGS …
static inline int
xpc_any_openclose_chctl_flags_set(union xpc_channel_ctl_flags *chctl)
{ … }
static inline int
xpc_any_msg_chctl_flags_set(union xpc_channel_ctl_flags *chctl)
{ … }
struct xpc_partition_uv { … };
#define XPC_P_CACHED_ACTIVATE_GRU_MQ_DESC_UV …
#define XPC_P_ENGAGED_UV …
#define XPC_P_ASR_ACTIVATE_UV …
#define XPC_P_ASR_REACTIVATE_UV …
#define XPC_P_ASR_DEACTIVATE_UV …
struct xpc_partition { … } ____cacheline_aligned;
struct xpc_arch_operations { … };
#define XPC_P_AS_INACTIVE …
#define XPC_P_AS_ACTIVATION_REQ …
#define XPC_P_AS_ACTIVATING …
#define XPC_P_AS_ACTIVE …
#define XPC_P_AS_DEACTIVATING …
#define XPC_DEACTIVATE_PARTITION(_p, _reason) …
#define XPC_P_SS_UNSET …
#define XPC_P_SS_SETUP …
#define XPC_P_SS_WTEARDOWN …
#define XPC_P_SS_TORNDOWN …
#define XPC_DISENGAGE_DEFAULT_TIMELIMIT …
#define XPC_DEACTIVATE_PRINTMSG_INTERVAL …
#define XPC_PARTID(_p) …
extern struct xpc_registration xpc_registrations[];
extern struct device *xpc_part;
extern struct device *xpc_chan;
extern struct xpc_arch_operations xpc_arch_ops;
extern int xpc_disengage_timelimit;
extern int xpc_disengage_timedout;
extern int xpc_activate_IRQ_rcvd;
extern spinlock_t xpc_activate_IRQ_rcvd_lock;
extern wait_queue_head_t xpc_activate_IRQ_wq;
extern void *xpc_kzalloc_cacheline_aligned(size_t, gfp_t, void **);
extern void xpc_activate_partition(struct xpc_partition *);
extern void xpc_activate_kthreads(struct xpc_channel *, int);
extern void xpc_create_kthreads(struct xpc_channel *, int, int);
extern void xpc_disconnect_wait(int);
extern int xpc_init_uv(void);
extern void xpc_exit_uv(void);
extern int xpc_exiting;
extern int xpc_nasid_mask_nlongs;
extern struct xpc_rsvd_page *xpc_rsvd_page;
extern unsigned long *xpc_mach_nasids;
extern struct xpc_partition *xpc_partitions;
extern void *xpc_kmalloc_cacheline_aligned(size_t, gfp_t, void **);
extern int xpc_setup_rsvd_page(void);
extern void xpc_teardown_rsvd_page(void);
extern int xpc_identify_activate_IRQ_sender(void);
extern int xpc_partition_disengaged(struct xpc_partition *);
extern int xpc_partition_disengaged_from_timer(struct xpc_partition *part);
extern enum xp_retval xpc_mark_partition_active(struct xpc_partition *);
extern void xpc_mark_partition_inactive(struct xpc_partition *);
extern void xpc_discovery(void);
extern enum xp_retval xpc_get_remote_rp(int, unsigned long *,
struct xpc_rsvd_page *,
unsigned long *);
extern void xpc_deactivate_partition(const int, struct xpc_partition *,
enum xp_retval);
extern enum xp_retval xpc_initiate_partid_to_nasids(short, void *);
extern void xpc_initiate_connect(int);
extern void xpc_initiate_disconnect(int);
extern enum xp_retval xpc_allocate_msg_wait(struct xpc_channel *);
extern enum xp_retval xpc_initiate_send(short, int, u32, void *, u16);
extern enum xp_retval xpc_initiate_send_notify(short, int, u32, void *, u16,
xpc_notify_func, void *);
extern void xpc_initiate_received(short, int, void *);
extern void xpc_process_sent_chctl_flags(struct xpc_partition *);
extern void xpc_connected_callout(struct xpc_channel *);
extern void xpc_deliver_payload(struct xpc_channel *);
extern void xpc_disconnect_channel(const int, struct xpc_channel *,
enum xp_retval, unsigned long *);
extern void xpc_disconnect_callout(struct xpc_channel *, enum xp_retval);
extern void xpc_partition_going_down(struct xpc_partition *, enum xp_retval);
static inline void
xpc_wakeup_channel_mgr(struct xpc_partition *part)
{ … }
static inline void
xpc_msgqueue_ref(struct xpc_channel *ch)
{ … }
static inline void
xpc_msgqueue_deref(struct xpc_channel *ch)
{ … }
#define XPC_DISCONNECT_CHANNEL(_ch, _reason, _irqflgs) …
static inline void
xpc_part_deref(struct xpc_partition *part)
{ … }
static inline int
xpc_part_ref(struct xpc_partition *part)
{ … }
#define XPC_SET_REASON(_p, _reason, _line) …
#endif