Linux Kernel
3.7.1
|
#include <linux/wait.h>
#include <linux/completion.h>
#include <linux/timer.h>
#include <linux/sched.h>
#include "xp.h"
Go to the source code of this file.
Data Structures | |
struct | xpc_rsvd_page |
struct | xpc_vars_sn2 |
struct | xpc_vars_part_sn2 |
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 |
struct | xpc_activate_mq_msg_chctl_openreply_uv |
struct | xpc_activate_mq_msg_chctl_opencomplete_uv |
struct | xpc_gp_sn2 |
struct | xpc_openclose_args |
struct | xpc_fifo_entry_uv |
struct | xpc_fifo_head_uv |
struct | xpc_msg_sn2 |
struct | xpc_notify_mq_msghdr_uv |
struct | xpc_notify_mq_msg_uv |
struct | xpc_notify_sn2 |
struct | xpc_send_msg_slot_uv |
struct | xpc_channel_sn2 |
struct | xpc_channel_uv |
struct | xpc_channel |
union | xpc_channel_ctl_flags |
struct | xpc_partition_sn2 |
struct | xpc_partition_uv |
struct | xpc_partition |
struct | xpc_arch_operations |
Macros | |
#define | _XPC_VERSION(_maj, _min) (((_maj) << 4) | ((_min) & 0xf)) |
#define | XPC_VERSION_MAJOR(_v) ((_v) >> 4) |
#define | XPC_VERSION_MINOR(_v) ((_v) & 0xf) |
#define | XPC_HB_DEFAULT_INTERVAL 5 /* incr HB every x secs */ |
#define | XPC_HB_CHECK_DEFAULT_INTERVAL 20 /* check HB every x secs */ |
#define | XPC_HB_CHECK_THREAD_NAME "xpc_hb" |
#define | XPC_HB_CHECK_CPU 0 |
#define | XPC_DISCOVERY_THREAD_NAME "xpc_discovery" |
#define | XPC_RP_VERSION _XPC_VERSION(3, 0) /* version 3.0 of the reserved page */ |
#define | XPC_V_VERSION _XPC_VERSION(3, 1) /* version 3.1 of the cross vars */ |
#define | XPC_VP_MAGIC1_SN2 0x0053524156435058L /* 'XPCVARS\0'L (little endian) */ |
#define | XPC_VP_MAGIC2_SN2 0x0073726176435058L /* 'XPCvars\0'L (little endian) */ |
#define | XPC_RP_HEADER_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_rsvd_page)) |
#define | XPC_RP_VARS_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_vars_sn2)) |
#define | XPC_RP_PART_NASIDS(_rp) |
#define | XPC_RP_MACH_NASIDS(_rp) |
#define | XPC_RP_VARS(_rp) |
#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 |
#define | XPC_PACK_ARGS(_arg1, _arg2) |
#define | XPC_UNPACK_ARG1(_args) (((u64)_args) & 0xffffffff) |
#define | XPC_UNPACK_ARG2(_args) ((((u64)_args) >> 32) & 0xffffffff) |
#define | XPC_GP_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_gp_sn2) * XPC_MAX_NCHANNELS) |
#define | XPC_OPENCLOSE_ARGS_SIZE |
#define | XPC_M_SN2_DONE 0x01 /* msg has been received/consumed */ |
#define | XPC_M_SN2_READY 0x02 /* msg is ready to be sent */ |
#define | XPC_M_SN2_INTERRUPT 0x04 /* send interrupt when msg consumed */ |
#define | XPC_N_CALL 0x01 /* notify function provided by user */ |
#define | XPC_C_WASCONNECTED 0x00000001 /* channel was connected */ |
#define | XPC_C_ROPENCOMPLETE 0x00000002 /* remote open channel complete */ |
#define | XPC_C_OPENCOMPLETE 0x00000004 /* local open channel complete */ |
#define | XPC_C_ROPENREPLY 0x00000008 /* remote open channel reply */ |
#define | XPC_C_OPENREPLY 0x00000010 /* local open channel reply */ |
#define | XPC_C_ROPENREQUEST 0x00000020 /* remote open channel request */ |
#define | XPC_C_OPENREQUEST 0x00000040 /* local open channel request */ |
#define | XPC_C_SETUP 0x00000080 /* channel's msgqueues are alloc'd */ |
#define | XPC_C_CONNECTEDCALLOUT 0x00000100 /* connected callout initiated */ |
#define | XPC_C_CONNECTEDCALLOUT_MADE 0x00000200 /* connected callout completed */ |
#define | XPC_C_CONNECTED 0x00000400 /* local channel is connected */ |
#define | XPC_C_CONNECTING 0x00000800 /* channel is being connected */ |
#define | XPC_C_RCLOSEREPLY 0x00001000 /* remote close channel reply */ |
#define | XPC_C_CLOSEREPLY 0x00002000 /* local close channel reply */ |
#define | XPC_C_RCLOSEREQUEST 0x00004000 /* remote close channel request */ |
#define | XPC_C_CLOSEREQUEST 0x00008000 /* local close channel request */ |
#define | XPC_C_DISCONNECTED 0x00010000 /* channel is disconnected */ |
#define | XPC_C_DISCONNECTING 0x00020000 /* channel is being disconnected */ |
#define | XPC_C_DISCONNECTINGCALLOUT 0x00040000 /* disconnecting callout initiated */ |
#define | XPC_C_DISCONNECTINGCALLOUT_MADE 0x00080000 /* disconnecting callout completed */ |
#define | XPC_C_WDISCONNECT 0x00100000 /* waiting for channel disconnect */ |
#define | XPC_CHCTL_CLOSEREQUEST 0x01 |
#define | XPC_CHCTL_CLOSEREPLY 0x02 |
#define | XPC_CHCTL_OPENREQUEST 0x04 |
#define | XPC_CHCTL_OPENREPLY 0x08 |
#define | XPC_CHCTL_OPENCOMPLETE 0x10 |
#define | XPC_CHCTL_MSGREQUEST 0x20 |
#define | XPC_OPENCLOSE_CHCTL_FLAGS |
#define | XPC_MSG_CHCTL_FLAGS XPC_CHCTL_MSGREQUEST |
#define | XPC_P_CACHED_ACTIVATE_GRU_MQ_DESC_UV 0x00000001 |
#define | XPC_P_ENGAGED_UV 0x00000002 |
#define | XPC_P_ASR_ACTIVATE_UV 0x01 |
#define | XPC_P_ASR_REACTIVATE_UV 0x02 |
#define | XPC_P_ASR_DEACTIVATE_UV 0x03 |
#define | XPC_P_AS_INACTIVE 0x00 /* partition is not active */ |
#define | XPC_P_AS_ACTIVATION_REQ 0x01 /* created thread to activate */ |
#define | XPC_P_AS_ACTIVATING 0x02 /* activation thread started */ |
#define | XPC_P_AS_ACTIVE 0x03 /* xpc_partition_up() was called */ |
#define | XPC_P_AS_DEACTIVATING 0x04 /* partition deactivation initiated */ |
#define | XPC_DEACTIVATE_PARTITION(_p, _reason) xpc_deactivate_partition(__LINE__, (_p), (_reason)) |
#define | XPC_P_SS_UNSET 0x00 /* infrastructure was never setup */ |
#define | XPC_P_SS_SETUP 0x01 /* infrastructure is setup */ |
#define | XPC_P_SS_WTEARDOWN 0x02 /* waiting to teardown infrastructure */ |
#define | XPC_P_SS_TORNDOWN 0x03 /* infrastructure is torndown */ |
#define | XPC_DROPPED_NOTIFY_IRQ_WAIT_INTERVAL (0.25 * HZ) |
#define | XPC_DISENGAGE_DEFAULT_TIMELIMIT 90 |
#define | XPC_DEACTIVATE_PRINTMSG_INTERVAL 10 |
#define | XPC_PARTID(_p) ((short)((_p) - &xpc_partitions[0])) |
#define | XPC_DISCONNECT_CHANNEL(_ch, _reason, _irqflgs) xpc_disconnect_channel(__LINE__, _ch, _reason, _irqflgs) |
#define | XPC_SET_REASON(_p, _reason, _line) |
#define _XPC_VERSION | ( | _maj, | |
_min | |||
) | (((_maj) << 4) | ((_min) & 0xf)) |
#define XPC_C_CLOSEREPLY 0x00002000 /* local close channel reply */ |
#define XPC_C_CLOSEREQUEST 0x00008000 /* local close channel request */ |
#define XPC_C_CONNECTED 0x00000400 /* local channel is connected */ |
#define XPC_C_CONNECTEDCALLOUT 0x00000100 /* connected callout initiated */ |
#define XPC_C_CONNECTEDCALLOUT_MADE 0x00000200 /* connected callout completed */ |
#define XPC_C_CONNECTING 0x00000800 /* channel is being connected */ |
#define XPC_C_DISCONNECTED 0x00010000 /* channel is disconnected */ |
#define XPC_C_DISCONNECTING 0x00020000 /* channel is being disconnected */ |
#define XPC_C_DISCONNECTINGCALLOUT 0x00040000 /* disconnecting callout initiated */ |
#define XPC_C_DISCONNECTINGCALLOUT_MADE 0x00080000 /* disconnecting callout completed */ |
#define XPC_C_OPENCOMPLETE 0x00000004 /* local open channel complete */ |
#define XPC_C_OPENREPLY 0x00000010 /* local open channel reply */ |
#define XPC_C_OPENREQUEST 0x00000040 /* local open channel request */ |
#define XPC_C_RCLOSEREPLY 0x00001000 /* remote close channel reply */ |
#define XPC_C_RCLOSEREQUEST 0x00004000 /* remote close channel request */ |
#define XPC_C_ROPENCOMPLETE 0x00000002 /* remote open channel complete */ |
#define XPC_C_ROPENREPLY 0x00000008 /* remote open channel reply */ |
#define XPC_C_ROPENREQUEST 0x00000020 /* remote open channel request */ |
#define XPC_C_SETUP 0x00000080 /* channel's msgqueues are alloc'd */ |
#define XPC_C_WASCONNECTED 0x00000001 /* channel was connected */ |
#define XPC_C_WDISCONNECT 0x00100000 /* waiting for channel disconnect */ |
#define XPC_DEACTIVATE_PARTITION | ( | _p, | |
_reason | |||
) | xpc_deactivate_partition(__LINE__, (_p), (_reason)) |
#define XPC_DISCONNECT_CHANNEL | ( | _ch, | |
_reason, | |||
_irqflgs | |||
) | xpc_disconnect_channel(__LINE__, _ch, _reason, _irqflgs) |
#define XPC_GP_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_gp_sn2) * XPC_MAX_NCHANNELS) |
#define XPC_M_SN2_DONE 0x01 /* msg has been received/consumed */ |
#define XPC_M_SN2_INTERRUPT 0x04 /* send interrupt when msg consumed */ |
#define XPC_MSG_CHCTL_FLAGS XPC_CHCTL_MSGREQUEST |
#define XPC_N_CALL 0x01 /* notify function provided by user */ |
#define XPC_OPENCLOSE_ARGS_SIZE |
#define XPC_OPENCLOSE_CHCTL_FLAGS |
#define XPC_P_AS_ACTIVATING 0x02 /* activation thread started */ |
#define XPC_P_AS_ACTIVATION_REQ 0x01 /* created thread to activate */ |
#define XPC_P_AS_ACTIVE 0x03 /* xpc_partition_up() was called */ |
#define XPC_P_AS_DEACTIVATING 0x04 /* partition deactivation initiated */ |
#define XPC_P_SS_TORNDOWN 0x03 /* infrastructure is torndown */ |
#define XPC_P_SS_UNSET 0x00 /* infrastructure was never setup */ |
#define XPC_P_SS_WTEARDOWN 0x02 /* waiting to teardown infrastructure */ |
#define XPC_PACK_ARGS | ( | _arg1, | |
_arg2 | |||
) |
#define XPC_PARTID | ( | _p | ) | ((short)((_p) - &xpc_partitions[0])) |
#define XPC_RP_HEADER_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_rsvd_page)) |
#define XPC_RP_MACH_NASIDS | ( | _rp | ) |
#define XPC_RP_PART_NASIDS | ( | _rp | ) |
#define XPC_RP_VARS | ( | _rp | ) |
#define XPC_RP_VARS_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_vars_sn2)) |
#define XPC_RP_VERSION _XPC_VERSION(3, 0) /* version 3.0 of the reserved page */ |
#define XPC_SET_REASON | ( | _p, | |
_reason, | |||
_line | |||
) |
#define XPC_UNPACK_ARG2 | ( | _args | ) | ((((u64)_args) >> 32) & 0xffffffff) |
#define XPC_V_VERSION _XPC_VERSION(3, 1) /* version 3.1 of the cross vars */ |
#define XPC_VP_MAGIC1_SN2 0x0053524156435058L /* 'XPCVARS\0'L (little endian) */ |
#define XPC_VP_MAGIC2_SN2 0x0073726176435058L /* 'XPCvars\0'L (little endian) */ |
void xpc_activate_kthreads | ( | struct xpc_channel * | , |
int | |||
) |
Definition at line 613 of file xpc_main.c.
void xpc_activate_partition | ( | struct xpc_partition * | ) |
Definition at line 587 of file xpc_main.c.
enum xp_retval xpc_allocate_msg_wait | ( | struct xpc_channel * | ) |
Definition at line 828 of file xpc_channel.c.
void xpc_connected_callout | ( | struct xpc_channel * | ) |
Definition at line 680 of file xpc_channel.c.
void xpc_create_kthreads | ( | struct xpc_channel * | , |
int | , | ||
int | |||
) |
Definition at line 775 of file xpc_main.c.
void xpc_deactivate_partition | ( | const int | , |
struct xpc_partition * | , | ||
enum | xp_retval | ||
) |
Definition at line 338 of file xpc_partition.c.
void xpc_deliver_payload | ( | struct xpc_channel * | ) |
Definition at line 949 of file xpc_channel.c.
void xpc_disconnect_callout | ( | struct xpc_channel * | , |
enum | xp_retval | ||
) |
Definition at line 804 of file xpc_channel.c.
Definition at line 756 of file xpc_channel.c.
Definition at line 850 of file xpc_main.c.
Definition at line 409 of file xpc_partition.c.
enum xp_retval xpc_get_remote_rp | ( | int | , |
unsigned long * | , | ||
struct xpc_rsvd_page * | , | ||
unsigned long * | |||
) |
Definition at line 216 of file xpc_partition.c.
Definition at line 655 of file xpc_channel.c.
Definition at line 710 of file xpc_channel.c.
Definition at line 526 of file xpc_partition.c.
Definition at line 872 of file xpc_channel.c.
enum xp_retval xpc_initiate_send_notify | ( | short | , |
int | , | ||
u32 | , | ||
void * | , | ||
u16 | , | ||
xpc_notify_func | , | ||
void * | |||
) |
Definition at line 923 of file xpc_channel.c.
Definition at line 41 of file xpc_partition.c.
Definition at line 379 of file xpc_main.c.
enum xp_retval xpc_mark_partition_active | ( | struct xpc_partition * | ) |
Definition at line 314 of file xpc_partition.c.
void xpc_mark_partition_inactive | ( | struct xpc_partition * | ) |
Definition at line 386 of file xpc_partition.c.
int xpc_partition_disengaged | ( | struct xpc_partition * | ) |
Definition at line 270 of file xpc_partition.c.
void xpc_partition_going_down | ( | struct xpc_partition * | , |
enum | xp_retval | ||
) |
Definition at line 617 of file xpc_channel.c.
void xpc_process_sent_chctl_flags | ( | struct xpc_partition * | ) |
Definition at line 546 of file xpc_channel.c.
Definition at line 136 of file xpc_partition.c.
Definition at line 202 of file xpc_partition.c.
int xpc_activate_IRQ_rcvd |
Definition at line 138 of file xpc_main.c.
spinlock_t xpc_activate_IRQ_rcvd_lock |
wait_queue_head_t xpc_activate_IRQ_wq |
struct xpc_arch_operations xpc_arch_ops |
Definition at line 165 of file xpc_main.c.
Definition at line 73 of file xpc_main.c.
int xpc_disengage_timedout |
Definition at line 135 of file xpc_main.c.
int xpc_disengage_timelimit |
Definition at line 87 of file xpc_main.c.
int xpc_exiting |
Definition at line 25 of file xpc_partition.c.
unsigned long* xpc_mach_nasids |
Definition at line 30 of file xpc_partition.c.
int xpc_nasid_mask_nlongs |
Definition at line 33 of file xpc_partition.c.
Definition at line 72 of file xpc_main.c.
struct xpc_partition* xpc_partitions |
Definition at line 35 of file xpc_partition.c.
struct xpc_registration xpc_registrations[] |
Definition at line 28 of file xpc_partition.c.