Lines Matching refs:mem

241 int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg)  in cper_mem_err_location()  argument
250 if (mem->validation_bits & CPER_MEM_VALID_NODE) in cper_mem_err_location()
251 n += scnprintf(msg + n, len - n, "node:%d ", mem->node); in cper_mem_err_location()
252 if (mem->validation_bits & CPER_MEM_VALID_CARD) in cper_mem_err_location()
253 n += scnprintf(msg + n, len - n, "card:%d ", mem->card); in cper_mem_err_location()
254 if (mem->validation_bits & CPER_MEM_VALID_MODULE) in cper_mem_err_location()
255 n += scnprintf(msg + n, len - n, "module:%d ", mem->module); in cper_mem_err_location()
256 if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) in cper_mem_err_location()
257 n += scnprintf(msg + n, len - n, "rank:%d ", mem->rank); in cper_mem_err_location()
258 if (mem->validation_bits & CPER_MEM_VALID_BANK) in cper_mem_err_location()
259 n += scnprintf(msg + n, len - n, "bank:%d ", mem->bank); in cper_mem_err_location()
260 if (mem->validation_bits & CPER_MEM_VALID_BANK_GROUP) in cper_mem_err_location()
262 mem->bank >> CPER_MEM_BANK_GROUP_SHIFT); in cper_mem_err_location()
263 if (mem->validation_bits & CPER_MEM_VALID_BANK_ADDRESS) in cper_mem_err_location()
265 mem->bank & CPER_MEM_BANK_ADDRESS_MASK); in cper_mem_err_location()
266 if (mem->validation_bits & CPER_MEM_VALID_DEVICE) in cper_mem_err_location()
267 n += scnprintf(msg + n, len - n, "device:%d ", mem->device); in cper_mem_err_location()
268 if (mem->validation_bits & (CPER_MEM_VALID_ROW | CPER_MEM_VALID_ROW_EXT)) { in cper_mem_err_location()
269 u32 row = mem->row; in cper_mem_err_location()
271 row |= cper_get_mem_extension(mem->validation_bits, mem->extended); in cper_mem_err_location()
274 if (mem->validation_bits & CPER_MEM_VALID_COLUMN) in cper_mem_err_location()
275 n += scnprintf(msg + n, len - n, "column:%d ", mem->column); in cper_mem_err_location()
276 if (mem->validation_bits & CPER_MEM_VALID_BIT_POSITION) in cper_mem_err_location()
278 mem->bit_pos); in cper_mem_err_location()
279 if (mem->validation_bits & CPER_MEM_VALID_REQUESTOR_ID) in cper_mem_err_location()
281 mem->requestor_id); in cper_mem_err_location()
282 if (mem->validation_bits & CPER_MEM_VALID_RESPONDER_ID) in cper_mem_err_location()
284 mem->responder_id); in cper_mem_err_location()
285 if (mem->validation_bits & CPER_MEM_VALID_TARGET_ID) in cper_mem_err_location()
287 mem->target_id); in cper_mem_err_location()
288 if (mem->validation_bits & CPER_MEM_VALID_CHIP_ID) in cper_mem_err_location()
290 mem->extended >> CPER_MEM_CHIP_ID_SHIFT); in cper_mem_err_location()
296 int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_dimm_err_location() argument
301 if (!msg || !(mem->validation_bits & CPER_MEM_VALID_MODULE_HANDLE)) in cper_dimm_err_location()
305 dmi_memdev_name(mem->mem_dev_handle, &bank, &device); in cper_dimm_err_location()
311 mem->mem_dev_handle); in cper_dimm_err_location()
317 void cper_mem_err_pack(const struct cper_sec_mem_err *mem, in cper_mem_err_pack() argument
320 cmem->validation_bits = mem->validation_bits; in cper_mem_err_pack()
321 cmem->node = mem->node; in cper_mem_err_pack()
322 cmem->card = mem->card; in cper_mem_err_pack()
323 cmem->module = mem->module; in cper_mem_err_pack()
324 cmem->bank = mem->bank; in cper_mem_err_pack()
325 cmem->device = mem->device; in cper_mem_err_pack()
326 cmem->row = mem->row; in cper_mem_err_pack()
327 cmem->column = mem->column; in cper_mem_err_pack()
328 cmem->bit_pos = mem->bit_pos; in cper_mem_err_pack()
329 cmem->requestor_id = mem->requestor_id; in cper_mem_err_pack()
330 cmem->responder_id = mem->responder_id; in cper_mem_err_pack()
331 cmem->target_id = mem->target_id; in cper_mem_err_pack()
332 cmem->extended = mem->extended; in cper_mem_err_pack()
333 cmem->rank = mem->rank; in cper_mem_err_pack()
334 cmem->mem_array_handle = mem->mem_array_handle; in cper_mem_err_pack()
335 cmem->mem_dev_handle = mem->mem_dev_handle; in cper_mem_err_pack()
354 static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem, in cper_print_mem() argument
362 (mem->validation_bits & ~(CPER_MEM_VALID_RANK_NUMBER - 1))) { in cper_print_mem()
366 if (mem->validation_bits & CPER_MEM_VALID_ERROR_STATUS) in cper_print_mem()
368 pfx, cper_mem_err_status_str(mem->error_status), in cper_print_mem()
369 mem->error_status); in cper_print_mem()
370 if (mem->validation_bits & CPER_MEM_VALID_PA) in cper_print_mem()
372 pfx, mem->physical_addr); in cper_print_mem()
373 if (mem->validation_bits & CPER_MEM_VALID_PA_MASK) in cper_print_mem()
375 pfx, mem->physical_addr_mask); in cper_print_mem()
376 cper_mem_err_pack(mem, &cmem); in cper_print_mem()
379 if (mem->validation_bits & CPER_MEM_VALID_ERROR_TYPE) { in cper_print_mem()
380 u8 etype = mem->error_type; in cper_print_mem()