Lines Matching +full:cpu +full:- +full:release +full:- +full:addr

1 // SPDX-License-Identifier: GPL-2.0-or-later
69 mce->error_type = mce_err->error_type; in mce_set_error_info()
70 switch (mce_err->error_type) { in mce_set_error_info()
72 mce->u.ue_error.ue_error_type = mce_err->u.ue_error_type; in mce_set_error_info()
75 mce->u.slb_error.slb_error_type = mce_err->u.slb_error_type; in mce_set_error_info()
78 mce->u.erat_error.erat_error_type = mce_err->u.erat_error_type; in mce_set_error_info()
81 mce->u.tlb_error.tlb_error_type = mce_err->u.tlb_error_type; in mce_set_error_info()
84 mce->u.user_error.user_error_type = mce_err->u.user_error_type; in mce_set_error_info()
87 mce->u.ra_error.ra_error_type = mce_err->u.ra_error_type; in mce_set_error_info()
90 mce->u.link_error.link_error_type = mce_err->u.link_error_type; in mce_set_error_info()
99 * Decode and save high level MCE information into per cpu buffer which
104 uint64_t nip, uint64_t addr, uint64_t phys_addr) in save_mce_event() argument
106 int index = __this_cpu_inc_return(mce_nest_count) - 1; in save_mce_event()
118 mce->version = MCE_V1; in save_mce_event()
119 mce->srr0 = nip; in save_mce_event()
120 mce->srr1 = regs->msr; in save_mce_event()
121 mce->gpr3 = regs->gpr[3]; in save_mce_event()
122 mce->in_use = 1; in save_mce_event()
123 mce->cpu = get_paca()->paca_index; in save_mce_event()
126 if (handled && (regs->msr & MSR_RI)) in save_mce_event()
127 mce->disposition = MCE_DISPOSITION_RECOVERED; in save_mce_event()
129 mce->disposition = MCE_DISPOSITION_NOT_RECOVERED; in save_mce_event()
131 mce->initiator = mce_err->initiator; in save_mce_event()
132 mce->severity = mce_err->severity; in save_mce_event()
133 mce->sync_error = mce_err->sync_error; in save_mce_event()
134 mce->error_class = mce_err->error_class; in save_mce_event()
137 * Populate the mce error_type and type-specific error_type. in save_mce_event()
141 if (!addr) 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 mce->u.ue_error.ignore_event = mce_err->ignore_event; in save_mce_event()
178 * release Flag to indicate whether to free the event slot or not.
179 * 0 <= do not release the mce event. Caller will invoke
181 * 1 <= release the slot.
192 int get_mce_event(struct machine_check_event *mce, bool release) in get_mce_event() argument
194 int index = __this_cpu_read(mce_nest_count) - 1; in get_mce_event()
205 /* Copy the event structure and release the original */ in get_mce_event()
208 if (release) in get_mce_event()
209 mc_evt->in_use = 0; in get_mce_event()
213 if (release) in get_mce_event()
236 index = __this_cpu_inc_return(mce_ue_count) - 1; in machine_check_ue_event()
259 index = __this_cpu_inc_return(mce_queue_count) - 1; in machine_check_queue_event()
276 entry = search_kernel_exception_table(regs->nip); in mce_common_process_ue()
278 mce_err->ignore_event = true; in mce_common_process_ue()
279 regs->nip = extable_fixup(entry); in mce_common_process_ue()
293 index = __this_cpu_read(mce_ue_count) - 1; in machine_process_ue_event()
305 if (evt->error_type == MCE_ERROR_TYPE_UE) { in machine_process_ue_event()
306 if (evt->u.ue_error.ignore_event) { in machine_process_ue_event()
311 if (evt->u.ue_error.physical_address_provided) { in machine_process_ue_event()
314 pfn = evt->u.ue_error.physical_address >> in machine_process_ue_event()
342 index = __this_cpu_read(mce_queue_count) - 1; in machine_check_process_queued_event()
345 if (evt->error_type == MCE_ERROR_TYPE_UE && in machine_check_process_queued_event()
346 evt->u.ue_error.ignore_event) { in machine_check_process_queued_event()
419 if (evt->version != MCE_V1) { in machine_check_print_event_info()
421 evt->version); in machine_check_print_event_info()
424 switch (evt->severity) { in machine_check_print_event_info()
444 switch(evt->initiator) { in machine_check_print_event_info()
446 initiator = "CPU"; in machine_check_print_event_info()
466 switch (evt->error_type) { in machine_check_print_event_info()
469 subtype = evt->u.ue_error.ue_error_type < in machine_check_print_event_info()
471 mc_ue_types[evt->u.ue_error.ue_error_type] in machine_check_print_event_info()
473 if (evt->u.ue_error.effective_address_provided) in machine_check_print_event_info()
474 ea = evt->u.ue_error.effective_address; in machine_check_print_event_info()
475 if (evt->u.ue_error.physical_address_provided) in machine_check_print_event_info()
476 pa = evt->u.ue_error.physical_address; in machine_check_print_event_info()
480 subtype = evt->u.slb_error.slb_error_type < in machine_check_print_event_info()
482 mc_slb_types[evt->u.slb_error.slb_error_type] in machine_check_print_event_info()
484 if (evt->u.slb_error.effective_address_provided) in machine_check_print_event_info()
485 ea = evt->u.slb_error.effective_address; in machine_check_print_event_info()
489 subtype = evt->u.erat_error.erat_error_type < in machine_check_print_event_info()
491 mc_erat_types[evt->u.erat_error.erat_error_type] in machine_check_print_event_info()
493 if (evt->u.erat_error.effective_address_provided) in machine_check_print_event_info()
494 ea = evt->u.erat_error.effective_address; in machine_check_print_event_info()
498 subtype = evt->u.tlb_error.tlb_error_type < in machine_check_print_event_info()
500 mc_tlb_types[evt->u.tlb_error.tlb_error_type] in machine_check_print_event_info()
502 if (evt->u.tlb_error.effective_address_provided) in machine_check_print_event_info()
503 ea = evt->u.tlb_error.effective_address; in machine_check_print_event_info()
507 subtype = evt->u.user_error.user_error_type < in machine_check_print_event_info()
509 mc_user_types[evt->u.user_error.user_error_type] in machine_check_print_event_info()
511 if (evt->u.user_error.effective_address_provided) in machine_check_print_event_info()
512 ea = evt->u.user_error.effective_address; in machine_check_print_event_info()
516 subtype = evt->u.ra_error.ra_error_type < in machine_check_print_event_info()
518 mc_ra_types[evt->u.ra_error.ra_error_type] in machine_check_print_event_info()
520 if (evt->u.ra_error.effective_address_provided) in machine_check_print_event_info()
521 ea = evt->u.ra_error.effective_address; in machine_check_print_event_info()
525 subtype = evt->u.link_error.link_error_type < in machine_check_print_event_info()
527 mc_link_types[evt->u.link_error.link_error_type] in machine_check_print_event_info()
529 if (evt->u.link_error.effective_address_provided) in machine_check_print_event_info()
530 ea = evt->u.link_error.effective_address; in machine_check_print_event_info()
533 err_type = "D-Cache"; in machine_check_print_event_info()
537 err_type = "I-Cache"; in machine_check_print_event_info()
548 if (ea && evt->srr0 != ea) { in machine_check_print_event_info()
557 printk("%sMCE: CPU%d: machine check (%s) %s %s %s %s[%s]\n", in machine_check_print_event_info()
558 level, evt->cpu, sevstr, in_guest ? "Guest" : "Host", in machine_check_print_event_info()
560 evt->disposition == MCE_DISPOSITION_RECOVERED ? in machine_check_print_event_info()
564 printk("%sMCE: CPU%d: PID: %d Comm: %s %sNIP: [%016llx]%s\n", in machine_check_print_event_info()
565 level, evt->cpu, current->pid, current->comm, in machine_check_print_event_info()
566 in_guest ? "Guest " : "", evt->srr0, pa_str); in machine_check_print_event_info()
568 printk("%sMCE: CPU%d: NIP: [%016llx] %pS%s\n", in machine_check_print_event_info()
569 level, evt->cpu, evt->srr0, (void *)evt->srr0, pa_str); in machine_check_print_event_info()
572 printk("%sMCE: CPU%d: Initiator %s\n", level, evt->cpu, initiator); in machine_check_print_event_info()
574 subtype = evt->error_class < ARRAY_SIZE(mc_error_class) ? in machine_check_print_event_info()
575 mc_error_class[evt->error_class] : "Unknown"; in machine_check_print_event_info()
576 printk("%sMCE: CPU%d: %s\n", level, evt->cpu, subtype); in machine_check_print_event_info()
580 if (evt->error_type == MCE_ERROR_TYPE_SLB) in machine_check_print_event_info()
581 slb_dump_contents(local_paca->mce_faulty_slbs); in machine_check_print_event_info()
589 * regs->nip and regs->msr contains srr0 and ssr1.
635 of_property_for_each_string(cpun, "ibm,hmi-special-triggers", in init_debug_trig_function()
637 if (strcmp(str, "bit17-vector-ci-load") == 0) in init_debug_trig_function()
639 else if (strcmp(str, "bit17-tm-suspend-escape") == 0) in init_debug_trig_function()
651 /* Check for POWER9 Nimbus (scale-out) */ in init_debug_trig_function()
656 /* DD2.0 and DD2.1 - used for vector CI load emulation */ in init_debug_trig_function()
679 * -1 means this is not a HMI cause that we know about
691 return -1; in hmi_handle_debugtrig()
694 /* HMER is a write-AND register */ in hmi_handle_debugtrig()
700 * Now to avoid problems with soft-disable we in hmi_handle_debugtrig()
705 ret = local_paca->hmi_p9_special_emu = 1; in hmi_handle_debugtrig()
717 return -1; in hmi_handle_debugtrig()
729 local_paca->hmi_irqs++; in hmi_exception_realmode()