Go to the documentation of this file.
42 #define peidx_head(p) (((p)->info))
43 #define peidx_mid(p) (((p)->id))
44 #define peidx_bottom(p) (((p)->regs))
46 #define peidx_psp(p) (&(peidx_head(p)->proc_state_parameter))
47 #define peidx_field_valid(p) (&(peidx_head(p)->valid))
48 #define peidx_minstate_area(p) (&(peidx_bottom(p)->min_state_area))
50 #define peidx_cache_check_num(p) (peidx_head(p)->valid.num_cache_check)
51 #define peidx_tlb_check_num(p) (peidx_head(p)->valid.num_tlb_check)
52 #define peidx_bus_check_num(p) (peidx_head(p)->valid.num_bus_check)
53 #define peidx_reg_file_check_num(p) (peidx_head(p)->valid.num_reg_file_check)
54 #define peidx_ms_check_num(p) (peidx_head(p)->valid.num_ms_check)
56 #define peidx_cache_check_idx(p, n) (n)
57 #define peidx_tlb_check_idx(p, n) (peidx_cache_check_idx(p, peidx_cache_check_num(p)) + n)
58 #define peidx_bus_check_idx(p, n) (peidx_tlb_check_idx(p, peidx_tlb_check_num(p)) + n)
59 #define peidx_reg_file_check_idx(p, n) (peidx_bus_check_idx(p, peidx_bus_check_num(p)) + n)
60 #define peidx_ms_check_idx(p, n) (peidx_reg_file_check_idx(p, peidx_reg_file_check_num(p)) + n)
62 #define peidx_mod_error_info(p, name, n) \
63 ({ int __idx = peidx_##name##_idx(p, n); \
64 sal_log_mod_error_info_t *__ret = NULL; \
65 if (peidx_##name##_num(p) > n) \
66 __ret = &(peidx_head(p)->info[__idx]); \
69 #define peidx_cache_check(p, n) peidx_mod_error_info(p, cache_check, n)
70 #define peidx_tlb_check(p, n) peidx_mod_error_info(p, tlb_check, n)
71 #define peidx_bus_check(p, n) peidx_mod_error_info(p, bus_check, n)
72 #define peidx_reg_file_check(p, n) peidx_mod_error_info(p, reg_file_check, n)
73 #define peidx_ms_check(p, n) peidx_mod_error_info(p, ms_check, n)
75 #define peidx_check_info(proc, name, n) \
77 sal_log_mod_error_info_t *__info = peidx_mod_error_info(proc, name, n);\
78 u64 __temp = __info && __info->valid.check_info \
79 ? __info->check_info : 0; \
104 #define slidx_foreach_entry(pos, head) \
105 list_for_each_entry(pos, head, list)
106 #define slidx_first_entry(head) \
107 (((head)->next != (head)) ? list_entry((head)->next, typeof(slidx_list_t), list) : NULL)
108 #define slidx_count(slidx, sec) \
109 ({ int __count = 0; \
110 slidx_list_t *__pos; \
111 slidx_foreach_entry(__pos, &((slidx)->sec)) { __count++; }\