• Home
  • Raw
  • Download

Lines Matching refs:mem

240 int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg)  in cper_mem_err_location()  argument
249 if (mem->validation_bits & CPER_MEM_VALID_NODE) in cper_mem_err_location()
250 n += scnprintf(msg + n, len - n, "node:%d ", mem->node); in cper_mem_err_location()
251 if (mem->validation_bits & CPER_MEM_VALID_CARD) in cper_mem_err_location()
252 n += scnprintf(msg + n, len - n, "card:%d ", mem->card); in cper_mem_err_location()
253 if (mem->validation_bits & CPER_MEM_VALID_MODULE) in cper_mem_err_location()
254 n += scnprintf(msg + n, len - n, "module:%d ", mem->module); in cper_mem_err_location()
255 if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) in cper_mem_err_location()
256 n += scnprintf(msg + n, len - n, "rank:%d ", mem->rank); in cper_mem_err_location()
257 if (mem->validation_bits & CPER_MEM_VALID_BANK) in cper_mem_err_location()
258 n += scnprintf(msg + n, len - n, "bank:%d ", mem->bank); in cper_mem_err_location()
259 if (mem->validation_bits & CPER_MEM_VALID_BANK_GROUP) in cper_mem_err_location()
261 mem->bank >> CPER_MEM_BANK_GROUP_SHIFT); in cper_mem_err_location()
262 if (mem->validation_bits & CPER_MEM_VALID_BANK_ADDRESS) in cper_mem_err_location()
264 mem->bank & CPER_MEM_BANK_ADDRESS_MASK); in cper_mem_err_location()
265 if (mem->validation_bits & CPER_MEM_VALID_DEVICE) in cper_mem_err_location()
266 n += scnprintf(msg + n, len - n, "device:%d ", mem->device); in cper_mem_err_location()
267 if (mem->validation_bits & (CPER_MEM_VALID_ROW | CPER_MEM_VALID_ROW_EXT)) { in cper_mem_err_location()
268 u32 row = mem->row; in cper_mem_err_location()
270 row |= cper_get_mem_extension(mem->validation_bits, mem->extended); in cper_mem_err_location()
273 if (mem->validation_bits & CPER_MEM_VALID_COLUMN) in cper_mem_err_location()
274 n += scnprintf(msg + n, len - n, "column:%d ", mem->column); in cper_mem_err_location()
275 if (mem->validation_bits & CPER_MEM_VALID_BIT_POSITION) in cper_mem_err_location()
277 mem->bit_pos); in cper_mem_err_location()
278 if (mem->validation_bits & CPER_MEM_VALID_REQUESTOR_ID) in cper_mem_err_location()
280 mem->requestor_id); in cper_mem_err_location()
281 if (mem->validation_bits & CPER_MEM_VALID_RESPONDER_ID) in cper_mem_err_location()
283 mem->responder_id); in cper_mem_err_location()
284 if (mem->validation_bits & CPER_MEM_VALID_TARGET_ID) in cper_mem_err_location()
286 mem->target_id); in cper_mem_err_location()
287 if (mem->validation_bits & CPER_MEM_VALID_CHIP_ID) in cper_mem_err_location()
289 mem->extended >> CPER_MEM_CHIP_ID_SHIFT); in cper_mem_err_location()
294 int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_dimm_err_location() argument
299 if (!msg || !(mem->validation_bits & CPER_MEM_VALID_MODULE_HANDLE)) in cper_dimm_err_location()
303 dmi_memdev_name(mem->mem_dev_handle, &bank, &device); in cper_dimm_err_location()
309 mem->mem_dev_handle); in cper_dimm_err_location()
314 void cper_mem_err_pack(const struct cper_sec_mem_err *mem, in cper_mem_err_pack() argument
317 cmem->validation_bits = mem->validation_bits; in cper_mem_err_pack()
318 cmem->node = mem->node; in cper_mem_err_pack()
319 cmem->card = mem->card; in cper_mem_err_pack()
320 cmem->module = mem->module; in cper_mem_err_pack()
321 cmem->bank = mem->bank; in cper_mem_err_pack()
322 cmem->device = mem->device; in cper_mem_err_pack()
323 cmem->row = mem->row; in cper_mem_err_pack()
324 cmem->column = mem->column; in cper_mem_err_pack()
325 cmem->bit_pos = mem->bit_pos; in cper_mem_err_pack()
326 cmem->requestor_id = mem->requestor_id; in cper_mem_err_pack()
327 cmem->responder_id = mem->responder_id; in cper_mem_err_pack()
328 cmem->target_id = mem->target_id; in cper_mem_err_pack()
329 cmem->extended = mem->extended; in cper_mem_err_pack()
330 cmem->rank = mem->rank; in cper_mem_err_pack()
331 cmem->mem_array_handle = mem->mem_array_handle; in cper_mem_err_pack()
332 cmem->mem_dev_handle = mem->mem_dev_handle; in cper_mem_err_pack()
350 static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem, in cper_print_mem() argument
358 (mem->validation_bits & ~(CPER_MEM_VALID_RANK_NUMBER - 1))) { in cper_print_mem()
362 if (mem->validation_bits & CPER_MEM_VALID_ERROR_STATUS) in cper_print_mem()
364 pfx, cper_mem_err_status_str(mem->error_status), in cper_print_mem()
365 mem->error_status); in cper_print_mem()
366 if (mem->validation_bits & CPER_MEM_VALID_PA) in cper_print_mem()
368 pfx, mem->physical_addr); in cper_print_mem()
369 if (mem->validation_bits & CPER_MEM_VALID_PA_MASK) in cper_print_mem()
371 pfx, mem->physical_addr_mask); in cper_print_mem()
372 cper_mem_err_pack(mem, &cmem); in cper_print_mem()
375 if (mem->validation_bits & CPER_MEM_VALID_ERROR_TYPE) { in cper_print_mem()
376 u8 etype = mem->error_type; in cper_print_mem()