00001 #ifndef spldef_h 00002 #define spldef_h 00003 00004 #include <cpudef.h> 00005 00006 #define SPL_C_SPL_SPINLOCK 1 00007 #define SPL_C_SPL_FORKLOCK 2 00008 #define SPL_C_SPL_DEVICELOCK 3 00009 #define SPL_C_SPL_PORTLOCK_TEMPLATE 4 00010 #define SPL_C_SPL_PORTLOCK 5 00011 #define SPL_M_INTERLOCK 0x1 00012 #define SPL_K_PC_VEC_CNT 16 00013 00014 struct _spl { 00015 long spl_l_own_cpu; 00016 long spl_l_own_cnt; 00017 unsigned short int spl_w_size; 00018 unsigned char spl_b_type; 00019 unsigned char spl_b_subtype; 00020 union { 00021 unsigned int spl_l_spinlock; 00022 struct { 00023 unsigned spl_v_interlock : 1; 00024 unsigned spl_v_fill_2_ : 7; 00025 }; 00026 }; 00027 int spl_l_rank; 00028 union { 00029 unsigned int spl_l_ipl; 00030 struct { 00031 unsigned char spl_b_ipl; 00032 char spl_b_fill1 [3]; 00033 }; 00034 }; 00035 int spl_l_rls_pc; 00036 unsigned int spl_l_busy_waits; 00037 int spl_l_wait_cpus; 00038 int spl_l_wait_pc; 00039 long long spl_q_spins; 00040 unsigned long long spl_q_acq_count; 00041 unsigned int spl_l_timo_int; 00042 void *spl_ps_share_array; 00043 void *spl_ps_share_link; 00044 00045 char spl_t_name [12]; 00046 char spl_t_align [108]; 00047 int spl_l_vec_inx; 00048 int spl_l_own_pc_vec [16]; 00049 }; 00050 00051 #define SPL_K_LENGTH 256 00052 #define SPL_C_LENGTH 256 00053 #define SPL_S_SPLDEF 256 00054 00055 #define SPL_SHR_K_LENGTH 128 00056 #define SPL_SHR_C_LENGTH 128 00057 00058 struct _spl_shr { 00059 unsigned int spl_shr_l_link; 00060 int spl_shr_l_share_count; 00061 unsigned short int spl_shr_w_mbo; 00062 unsigned char spl_shr_b_type; 00063 unsigned char spl_shr_b_subtype; 00064 int spl_shr_l_cpu_id; 00065 long long spl_shr_q_size; 00066 long long spl_shr_q_timeout_int; 00067 char spl_shr_t_align [96]; 00068 }; 00069 00070 #define SPLBLK_M_DYNAMIC_THRESHOLD 0x1 00071 #define SPLBLK_C_LENGTH 256 00072 #define SPLBLK_K_LENGTH 256 00073 #define SPLBLK_C_SHIFT 8 00074 00075 struct _splblk { 00076 unsigned long long splblk_q_abuse_bitmask; 00077 unsigned int splblk_l_spares_1 [30]; 00078 unsigned long long splblk_q_release_count; 00079 unsigned long long splblk_q_history_bitmask; 00080 unsigned long long splblk_q_abuse_threshold; 00081 union { 00082 unsigned long long splblk_q_flags; 00083 struct { 00084 unsigned splblk_v_dynamic_threshold : 1; 00085 unsigned splblk_v_fill_5_ : 7; 00086 }; 00087 }; 00088 unsigned int splblk_l_spares_2 [24]; 00089 }; 00090 00091 00092 00093 #define SPLDBG_K_REV1 1 00094 #define SPLDBG_K_REVISION 1 00095 #define SPLDBG_K_ACQ 1 00096 #define SPLDBG_K_REL 2 00097 #define SPLDBG_K_SPIN 3 00098 #define SPLDBG_K_FORKDSPTH 4 00099 #define SPLDBG_K_FORKEND 5 00100 #define SPLDBG_K_MAX_FLAG 5 00101 #define SPLDBG_K_ACQNOIPL 1 00102 #define SPLDBG_K_ACQUIRE 2 00103 #define SPLDBG_K_ACQUIREL 3 00104 #define SPLDBG_K_ACQNOIPL_OWN 4 00105 #define SPLDBG_K_ACQUIRE_OWN 5 00106 #define SPLDBG_K_ACQUIREL_OWN 6 00107 #define SPLDBG_K_ACQUIRE_SHR_OWN 7 00108 #define SPLDBG_K_ACQ_NOSPIN_OWN 8 00109 #define SPLDBG_K_ACQ_SHR_NOSPIN_OWN 9 00110 #define SPLDBG_K_ACQNOIPL_SPIN 10 00111 #define SPLDBG_K_ACQUIRE_SPIN 11 00112 #define SPLDBG_K_ACQUIREL_SPIN 12 00113 #define SPLDBG_K_RESTORE 13 00114 #define SPLDBG_K_RESTOREL 14 00115 #define SPLDBG_K_RELEASE 15 00116 #define SPLDBG_K_RELEASEL 16 00117 #define SPLDBG_K_ACQUIRE_SHR 17 00118 #define SPLDBG_K_ACQUIRE_SHR_SPIN 18 00119 #define SPLDBG_K_RELEASE_SHR 19 00120 #define SPLDBG_K_RESTORE_SHR 20 00121 #define SPLDBG_K_ACQ_NOSPIN 21 00122 #define SPLDBG_K_ACQ_NOSPIN_INUSE 22 00123 #define SPLDBG_K_ACQ_SHR_NOSPIN 23 00124 #define SPLDBG_K_ACQ_SHR_NOSPIN_INUSE 24 00125 #define SPLDBG_K_ACQ_CVT_TO_EX 25 00126 #define SPLDBG_K_ACQ_CVT_TO_EX_INUSE 26 00127 #define SPLDBG_K_ACQ_CVT_TO_EX_SPIN 27 00128 #define SPLDBG_K_ACQ_CVT_TO_SHR 28 00129 #define SPLDBG_K_MAX_MODE 28 00130 #define SPLDBG_M_ACQUIRE 0x1 00131 #define SPLDBG_M_RELEASE 0x2 00132 #define SPLDBG_M_SPINWAIT 0x4 00133 #define SPLDBG_M_LCKMGR 0x8 00134 #define SPLDBG_M_FORKDSPTH 0x10 00135 #define SPLDBG_M_FORKEND 0x20 00136 #define SPLDBG_K_LENGTH 616 00137 #define SPLDBG_C_LENGTH 616 00138 00139 struct _spldbg { 00140 struct _spltrh *spldbg_q_trace_buffer; 00141 unsigned short int spldbg_w_mbo; 00142 unsigned char spldbg_b_type; 00143 unsigned char spldbg_b_subtype; 00144 unsigned int spldbg_l_revision; 00145 long long spldbg_q_size; 00146 int (*spldbg_l_start_trace)(); 00147 int (*spldbg_l_stop_trace)(); 00148 void (*spldbg_l_trace_acquire)(); 00149 void (*spldbg_l_trace_release)(); 00150 void (*spldbg_l_trace_spinwait)(); 00151 void (*spldbg_l_trace_forkdspth)(); 00152 void (*spldbg_l_trace_forkend)(); 00153 union { 00154 unsigned int spldbg_l_trace_flags; 00155 struct { 00156 unsigned spldbg_v_acquire : 1; 00157 unsigned spldbg_v_release : 1; 00158 unsigned spldbg_v_spinwait : 1; 00159 unsigned spldbg_v_lckmgr : 1; 00160 unsigned spldbg_v_forkdspth : 1; 00161 unsigned spldbg_v_forkend : 1; 00162 unsigned spldbg_v_fill_6_ : 2; 00163 }; 00164 }; 00165 unsigned int spldbg_l_spl_flags; 00166 int spldbg_l_cpu_flags; 00167 unsigned int spldbg_l_frk_flags; 00168 unsigned int spldbg_l_trace_run; 00169 unsigned long long spldbg_q_reserved1; 00170 unsigned long long spldbg_q_reserved2; 00171 unsigned long long spldbg_q_reserved3; 00172 unsigned long long spldbg_q_reserved4; 00173 unsigned long long spldbg_q_scc [32]; 00174 unsigned long long spldbg_q_systime [32]; 00175 }; 00176 00177 #define SPLTRE_K_LENGTH 32 00178 00179 struct _spltre { 00180 unsigned long long spltre_q_timestamp; 00181 unsigned int spltre_l_pc; 00182 unsigned int spltre_l_cpuid; 00183 unsigned int spltre_l_mode; 00184 unsigned int spltre_l_flag; 00185 union { 00186 struct _spl *spltre_l_spl_addr; 00187 unsigned int spltre_l_flck; 00188 }; 00189 struct _pcb *spltre_l_pcb; 00190 }; 00191 00192 #define SPLTRH_K_LENGTH 64 00193 00194 struct _spltrh { 00195 int spltrh_l_idx; 00196 unsigned int spltrh_l_max_idx; 00197 unsigned short int spltrh_w_mbo; 00198 unsigned char spltrh_b_type; 00199 unsigned char spltrh_b_subtype; 00200 unsigned int spltrh_l_fill1; 00201 long long spltrh_q_size; 00202 struct _spltre *spltrh_q_entry_ptr; 00203 struct _spltre spltrh_r_entry [1]; 00204 }; 00205 00206 #endif 00207 00208