Lines Matching full:mem
216 static int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_mem_err_location() argument
225 if (mem->validation_bits & CPER_MEM_VALID_NODE) in cper_mem_err_location()
226 n += scnprintf(msg + n, len - n, "node: %d ", mem->node); in cper_mem_err_location()
227 if (mem->validation_bits & CPER_MEM_VALID_CARD) in cper_mem_err_location()
228 n += scnprintf(msg + n, len - n, "card: %d ", mem->card); in cper_mem_err_location()
229 if (mem->validation_bits & CPER_MEM_VALID_MODULE) in cper_mem_err_location()
230 n += scnprintf(msg + n, len - n, "module: %d ", mem->module); in cper_mem_err_location()
231 if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) in cper_mem_err_location()
232 n += scnprintf(msg + n, len - n, "rank: %d ", mem->rank); in cper_mem_err_location()
233 if (mem->validation_bits & CPER_MEM_VALID_BANK) in cper_mem_err_location()
234 n += scnprintf(msg + n, len - n, "bank: %d ", mem->bank); in cper_mem_err_location()
235 if (mem->validation_bits & CPER_MEM_VALID_BANK_GROUP) in cper_mem_err_location()
237 mem->bank >> CPER_MEM_BANK_GROUP_SHIFT); in cper_mem_err_location()
238 if (mem->validation_bits & CPER_MEM_VALID_BANK_ADDRESS) in cper_mem_err_location()
240 mem->bank & CPER_MEM_BANK_ADDRESS_MASK); in cper_mem_err_location()
241 if (mem->validation_bits & CPER_MEM_VALID_DEVICE) in cper_mem_err_location()
242 n += scnprintf(msg + n, len - n, "device: %d ", mem->device); in cper_mem_err_location()
243 if (mem->validation_bits & (CPER_MEM_VALID_ROW | CPER_MEM_VALID_ROW_EXT)) { in cper_mem_err_location()
244 u32 row = mem->row; in cper_mem_err_location()
246 row |= cper_get_mem_extension(mem->validation_bits, mem->extended); in cper_mem_err_location()
249 if (mem->validation_bits & CPER_MEM_VALID_COLUMN) in cper_mem_err_location()
250 n += scnprintf(msg + n, len - n, "column: %d ", mem->column); in cper_mem_err_location()
251 if (mem->validation_bits & CPER_MEM_VALID_BIT_POSITION) in cper_mem_err_location()
253 mem->bit_pos); in cper_mem_err_location()
254 if (mem->validation_bits & CPER_MEM_VALID_REQUESTOR_ID) in cper_mem_err_location()
256 mem->requestor_id); in cper_mem_err_location()
257 if (mem->validation_bits & CPER_MEM_VALID_RESPONDER_ID) in cper_mem_err_location()
259 mem->responder_id); in cper_mem_err_location()
260 if (mem->validation_bits & CPER_MEM_VALID_TARGET_ID) in cper_mem_err_location()
262 mem->target_id); in cper_mem_err_location()
263 if (mem->validation_bits & CPER_MEM_VALID_CHIP_ID) in cper_mem_err_location()
265 mem->extended >> CPER_MEM_CHIP_ID_SHIFT); in cper_mem_err_location()
271 static int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_dimm_err_location() argument
276 if (!msg || !(mem->validation_bits & CPER_MEM_VALID_MODULE_HANDLE)) in cper_dimm_err_location()
281 dmi_memdev_name(mem->mem_dev_handle, &bank, &device); in cper_dimm_err_location()
287 mem->mem_dev_handle); in cper_dimm_err_location()
293 void cper_mem_err_pack(const struct cper_sec_mem_err *mem, in cper_mem_err_pack() argument
296 cmem->validation_bits = mem->validation_bits; in cper_mem_err_pack()
297 cmem->node = mem->node; in cper_mem_err_pack()
298 cmem->card = mem->card; in cper_mem_err_pack()
299 cmem->module = mem->module; in cper_mem_err_pack()
300 cmem->bank = mem->bank; in cper_mem_err_pack()
301 cmem->device = mem->device; in cper_mem_err_pack()
302 cmem->row = mem->row; in cper_mem_err_pack()
303 cmem->column = mem->column; in cper_mem_err_pack()
304 cmem->bit_pos = mem->bit_pos; in cper_mem_err_pack()
305 cmem->requestor_id = mem->requestor_id; in cper_mem_err_pack()
306 cmem->responder_id = mem->responder_id; in cper_mem_err_pack()
307 cmem->target_id = mem->target_id; in cper_mem_err_pack()
308 cmem->extended = mem->extended; in cper_mem_err_pack()
309 cmem->rank = mem->rank; in cper_mem_err_pack()
310 cmem->mem_array_handle = mem->mem_array_handle; in cper_mem_err_pack()
311 cmem->mem_dev_handle = mem->mem_dev_handle; in cper_mem_err_pack()
328 static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem, in cper_print_mem() argument
335 (mem->validation_bits & ~(CPER_MEM_VALID_RANK_NUMBER - 1))) { in cper_print_mem()
339 if (mem->validation_bits & CPER_MEM_VALID_ERROR_STATUS) in cper_print_mem()
340 printk("%s""error_status: 0x%016llx\n", pfx, mem->error_status); in cper_print_mem()
341 if (mem->validation_bits & CPER_MEM_VALID_PA) in cper_print_mem()
343 pfx, mem->physical_addr); in cper_print_mem()
344 if (mem->validation_bits & CPER_MEM_VALID_PA_MASK) in cper_print_mem()
346 pfx, mem->physical_addr_mask); in cper_print_mem()
347 cper_mem_err_pack(mem, &cmem); in cper_print_mem()
350 if (mem->validation_bits & CPER_MEM_VALID_ERROR_TYPE) { in cper_print_mem()
351 u8 etype = mem->error_type; in cper_print_mem()