Lines Matching full:mce

10 #define pr_fmt(fmt) "mce: " fmt
25 #include <asm/mce.h>
49 static void mce_set_error_info(struct machine_check_event *mce, in mce_set_error_info() argument
52 mce->error_type = mce_err->error_type; in mce_set_error_info()
55 mce->u.ue_error.ue_error_type = mce_err->u.ue_error_type; in mce_set_error_info()
58 mce->u.slb_error.slb_error_type = mce_err->u.slb_error_type; in mce_set_error_info()
61 mce->u.erat_error.erat_error_type = mce_err->u.erat_error_type; in mce_set_error_info()
64 mce->u.tlb_error.tlb_error_type = mce_err->u.tlb_error_type; in mce_set_error_info()
67 mce->u.user_error.user_error_type = mce_err->u.user_error_type; in mce_set_error_info()
70 mce->u.ra_error.ra_error_type = mce_err->u.ra_error_type; in mce_set_error_info()
73 mce->u.link_error.link_error_type = mce_err->u.link_error_type; in mce_set_error_info()
89 * Decode and save high level MCE information into per cpu buffer which
97 struct machine_check_event *mce; in save_mce_event() local
99 mce = &local_paca->mce_info->mce_event[index]; in save_mce_event()
101 * Return if we don't have enough space to log mce event. in save_mce_event()
109 mce->version = MCE_V1; in save_mce_event()
110 mce->srr0 = nip; in save_mce_event()
111 mce->srr1 = regs->msr; in save_mce_event()
112 mce->gpr3 = regs->gpr[3]; in save_mce_event()
113 mce->in_use = 1; in save_mce_event()
114 mce->cpu = get_paca()->paca_index; in save_mce_event()
118 mce->disposition = MCE_DISPOSITION_RECOVERED; in save_mce_event()
120 mce->disposition = MCE_DISPOSITION_NOT_RECOVERED; in save_mce_event()
122 mce->initiator = mce_err->initiator; in save_mce_event()
123 mce->severity = mce_err->severity; in save_mce_event()
124 mce->sync_error = mce_err->sync_error; in save_mce_event()
125 mce->error_class = mce_err->error_class; in save_mce_event()
128 * Populate the mce error_type and type-specific error_type. in save_mce_event()
130 mce_set_error_info(mce, mce_err); in save_mce_event()
131 if (mce->error_type == MCE_ERROR_TYPE_UE) in save_mce_event()
132 mce->u.ue_error.ignore_event = mce_err->ignore_event; in save_mce_event()
138 if (mce->disposition == MCE_DISPOSITION_NOT_RECOVERED) in save_mce_event()
144 if (mce->error_type == MCE_ERROR_TYPE_TLB) { in save_mce_event()
145 mce->u.tlb_error.effective_address_provided = true; in save_mce_event()
146 mce->u.tlb_error.effective_address = addr; in save_mce_event()
147 } else if (mce->error_type == MCE_ERROR_TYPE_SLB) { in save_mce_event()
148 mce->u.slb_error.effective_address_provided = true; in save_mce_event()
149 mce->u.slb_error.effective_address = addr; in save_mce_event()
150 } else if (mce->error_type == MCE_ERROR_TYPE_ERAT) { in save_mce_event()
151 mce->u.erat_error.effective_address_provided = true; in save_mce_event()
152 mce->u.erat_error.effective_address = addr; in save_mce_event()
153 } else if (mce->error_type == MCE_ERROR_TYPE_USER) { in save_mce_event()
154 mce->u.user_error.effective_address_provided = true; in save_mce_event()
155 mce->u.user_error.effective_address = addr; in save_mce_event()
156 } else if (mce->error_type == MCE_ERROR_TYPE_RA) { in save_mce_event()
157 mce->u.ra_error.effective_address_provided = true; in save_mce_event()
158 mce->u.ra_error.effective_address = addr; in save_mce_event()
159 } else if (mce->error_type == MCE_ERROR_TYPE_LINK) { in save_mce_event()
160 mce->u.link_error.effective_address_provided = true; in save_mce_event()
161 mce->u.link_error.effective_address = addr; in save_mce_event()
162 } else if (mce->error_type == MCE_ERROR_TYPE_UE) { in save_mce_event()
163 mce->u.ue_error.effective_address_provided = true; in save_mce_event()
164 mce->u.ue_error.effective_address = addr; in save_mce_event()
166 mce->u.ue_error.physical_address_provided = true; in save_mce_event()
167 mce->u.ue_error.physical_address = phys_addr; in save_mce_event()
168 machine_check_ue_event(mce); in save_mce_event()
176 * mce Pointer to machine_check_event structure to be filled.
178 * 0 <= do not release the mce event. Caller will invoke
191 int get_mce_event(struct machine_check_event *mce, bool release) in get_mce_event() argument
201 /* Check if we have MCE info to process. */ in get_mce_event()
205 if (mce) in get_mce_event()
206 *mce = *mc_evt; in get_mce_event()
229 * Queue up the MCE event which then can be handled later.
246 * Queue up the MCE event which then can be handled later.
281 * process pending MCE event from the mce event queue. This function will be
324 * process pending MCE event from the mce event queue. This function will be
770 panic("Failed to allocate memory for MCE event data\n"); in mce_init()