Lines Matching refs:mem
210 static int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_mem_err_location() argument
219 if (mem->validation_bits & CPER_MEM_VALID_NODE) in cper_mem_err_location()
220 n += scnprintf(msg + n, len - n, "node: %d ", mem->node); in cper_mem_err_location()
221 if (mem->validation_bits & CPER_MEM_VALID_CARD) in cper_mem_err_location()
222 n += scnprintf(msg + n, len - n, "card: %d ", mem->card); in cper_mem_err_location()
223 if (mem->validation_bits & CPER_MEM_VALID_MODULE) in cper_mem_err_location()
224 n += scnprintf(msg + n, len - n, "module: %d ", mem->module); in cper_mem_err_location()
225 if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) in cper_mem_err_location()
226 n += scnprintf(msg + n, len - n, "rank: %d ", mem->rank); in cper_mem_err_location()
227 if (mem->validation_bits & CPER_MEM_VALID_BANK) in cper_mem_err_location()
228 n += scnprintf(msg + n, len - n, "bank: %d ", mem->bank); in cper_mem_err_location()
229 if (mem->validation_bits & CPER_MEM_VALID_DEVICE) in cper_mem_err_location()
230 n += scnprintf(msg + n, len - n, "device: %d ", mem->device); in cper_mem_err_location()
231 if (mem->validation_bits & CPER_MEM_VALID_ROW) in cper_mem_err_location()
232 n += scnprintf(msg + n, len - n, "row: %d ", mem->row); in cper_mem_err_location()
233 if (mem->validation_bits & CPER_MEM_VALID_COLUMN) in cper_mem_err_location()
234 n += scnprintf(msg + n, len - n, "column: %d ", mem->column); in cper_mem_err_location()
235 if (mem->validation_bits & CPER_MEM_VALID_BIT_POSITION) in cper_mem_err_location()
237 mem->bit_pos); in cper_mem_err_location()
238 if (mem->validation_bits & CPER_MEM_VALID_REQUESTOR_ID) in cper_mem_err_location()
240 mem->requestor_id); in cper_mem_err_location()
241 if (mem->validation_bits & CPER_MEM_VALID_RESPONDER_ID) in cper_mem_err_location()
243 mem->responder_id); in cper_mem_err_location()
244 if (mem->validation_bits & CPER_MEM_VALID_TARGET_ID) in cper_mem_err_location()
246 mem->target_id); in cper_mem_err_location()
252 static int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_dimm_err_location() argument
257 if (!msg || !(mem->validation_bits & CPER_MEM_VALID_MODULE_HANDLE)) in cper_dimm_err_location()
262 dmi_memdev_name(mem->mem_dev_handle, &bank, &device); in cper_dimm_err_location()
268 mem->mem_dev_handle); in cper_dimm_err_location()
274 void cper_mem_err_pack(const struct cper_sec_mem_err *mem, in cper_mem_err_pack() argument
277 cmem->validation_bits = mem->validation_bits; in cper_mem_err_pack()
278 cmem->node = mem->node; in cper_mem_err_pack()
279 cmem->card = mem->card; in cper_mem_err_pack()
280 cmem->module = mem->module; in cper_mem_err_pack()
281 cmem->bank = mem->bank; in cper_mem_err_pack()
282 cmem->device = mem->device; in cper_mem_err_pack()
283 cmem->row = mem->row; in cper_mem_err_pack()
284 cmem->column = mem->column; in cper_mem_err_pack()
285 cmem->bit_pos = mem->bit_pos; in cper_mem_err_pack()
286 cmem->requestor_id = mem->requestor_id; in cper_mem_err_pack()
287 cmem->responder_id = mem->responder_id; in cper_mem_err_pack()
288 cmem->target_id = mem->target_id; in cper_mem_err_pack()
289 cmem->rank = mem->rank; in cper_mem_err_pack()
290 cmem->mem_array_handle = mem->mem_array_handle; in cper_mem_err_pack()
291 cmem->mem_dev_handle = mem->mem_dev_handle; in cper_mem_err_pack()
308 static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem, in cper_print_mem() argument
315 (mem->validation_bits & ~(CPER_MEM_VALID_RANK_NUMBER - 1))) { in cper_print_mem()
319 if (mem->validation_bits & CPER_MEM_VALID_ERROR_STATUS) in cper_print_mem()
320 printk("%s""error_status: 0x%016llx\n", pfx, mem->error_status); in cper_print_mem()
321 if (mem->validation_bits & CPER_MEM_VALID_PA) in cper_print_mem()
323 pfx, mem->physical_addr); in cper_print_mem()
324 if (mem->validation_bits & CPER_MEM_VALID_PA_MASK) in cper_print_mem()
326 pfx, mem->physical_addr_mask); in cper_print_mem()
327 cper_mem_err_pack(mem, &cmem); in cper_print_mem()
330 if (mem->validation_bits & CPER_MEM_VALID_ERROR_TYPE) { in cper_print_mem()
331 u8 etype = mem->error_type; in cper_print_mem()