Lines Matching full:nmi

3  * SGI NMI support routines
16 #include <linux/nmi.h>
27 #include <asm/nmi.h>
35 * UV handler for NMI
37 * Handle system-wide NMI events generated by the global 'power nmi' command.
39 * Basic operation is to field the NMI interrupt on each CPU and wait
40 * until all CPU's have arrived into the nmi handler. If some CPU's do not
41 * make it into the handler, try and force them in with the IPI(NMI) signal.
47 * To do this we register our primary NMI notifier on the NMI_UNKNOWN
48 * chain. This reduces the number of false NMI calls when the perf
50 * second (~4M/s for 1024 CPU threads). Our secondary NMI handler is
52 * IPI(NMI) signal as mentioned above, and does not read the UV Hub's MMR.
60 /* Newer SMM NMI handler, not present in all systems */
66 /* Non-zero indicates newer SMM NMI handler present */
69 /* Indicates to BIOS that we want to use the newer SMM NMI handler */
181 /* Valid NMI Actions */
207 [nmi_act_health] = "check if CPUs respond to NMI",
224 pr_info("UV: New NMI action:%s\n", actions[i]); in param_set_action()
228 pr_err("UV: Invalid NMI action. Valid actions are:\n"); in param_set_action()
243 /* Setup which NMI support is present in system */
265 new_nmi_method_only = true; /* Newer nmi always valid on UV5+ */ in uv_nmi_setup_mmrs()
269 pr_err("UV:%s:NMI support not available on this system\n", __func__); in uv_nmi_setup_mmrs()
273 /* Then find out if new NMI is supported */ in uv_nmi_setup_mmrs()
281 pr_info("UV: SMI NMI support: %s\n", uvh_nmi_mmrx_type); in uv_nmi_setup_mmrs()
286 pr_info("UV: SMI NMI support: %s\n", UVH_NMI_MMR_TYPE); in uv_nmi_setup_mmrs()
290 /* Read NMI MMR and check if NMI flag was set by BMC. */
304 * UV hubless NMI handler functions
342 nmi_debug("UV:NMI: GPP_D_0 interrupt %s\n", in uv_nmi_setup_hubless_intr()
422 * # (we want an NMI not an IRQ)
426 * 17 GPIO Input Route NMI (GPIROUTNMI): = 1 # Routing can cause NMI.
455 pr_info("UV: Hubless NMI already configured\n"); in uv_init_hubless_pch_d0()
459 nmi_debug("UV: Initializing UV Hubless NMI on PCH\n"); in uv_init_hubless_pch_d0()
475 if (!(status & STS_GPP_D_0_MASK)) /* Not a UV external NMI */ in uv_nmi_test_hubless()
478 *pstat = STS_GPP_D_0_MASK; /* Is a UV NMI: clear GPP_D_0 status */ in uv_nmi_test_hubless()
513 /* Check if this is a system NMI event */
517 int nmi = 0; in uv_check_nmi() local
524 nmi = atomic_read(&hub_nmi->in_nmi); in uv_check_nmi()
525 if (nmi) in uv_check_nmi()
531 /* Check flag for UV external NMI */ in uv_check_nmi()
534 nmi = 1; in uv_check_nmi()
538 /* A non-PCH node in a hubless system waits for NMI */ in uv_check_nmi()
542 /* MMR/PCH NMI flag is clear */ in uv_check_nmi()
547 /* Wait a moment for the HUB NMI locker to set flag */ in uv_check_nmi()
552 nmi = atomic_read(&hub_nmi->in_nmi); in uv_check_nmi()
553 if (nmi) in uv_check_nmi()
558 * Check if this BMC missed setting the MMR NMI flag (or) in uv_check_nmi()
561 if (!nmi) { in uv_check_nmi()
562 nmi = atomic_read(&uv_in_nmi); in uv_check_nmi()
563 if (nmi) in uv_check_nmi()
573 if (!nmi) in uv_check_nmi()
576 return nmi; in uv_check_nmi()
579 /* Need to reset the NMI MMR register, but only once per hub. */
595 /* Ping non-responding CPU's attempting to force them into the NMI handler */
606 /* Clean up flags for CPU's that ignored both NMI and ping */
618 /* Loop waiting as CPU's enter NMI handler */
632 /* PCH NMI causes only one CPU to respond */ in uv_nmi_wait_cpus()
670 /* Wait until all slave CPU's have entered UV NMI handler */
685 /* If not all made it in, send IPI NMI to them */ in uv_nmi_wait()
686 pr_alert("UV: Sending NMI IPI to %d CPUs: %*pbl\n", in uv_nmi_wait()
696 pr_alert("UV: %d CPUs not in NMI loop: %*pbl\n", in uv_nmi_wait()
701 pr_alert("UV: %d of %d CPUs in NMI\n", in uv_nmi_wait()
786 pr_alert("UV: NMI CPU health check (non-responding:%d)\n", out); in uv_nmi_action_health()
818 pr_alert("UV: %d CPUs ignored NMI\n", ignored); in uv_nmi_dump_state()
845 pr_err("UV: NMI error: kdump kernel not loaded\n"); in uv_nmi_kdump()
851 pr_emerg("UV: NMI executing crash_kexec on CPU%d\n", cpu); in uv_nmi_kdump()
883 pr_err("UV: NMI error: KDB is not enabled in this kernel\n"); in uv_nmi_kdb_reason()
889 * Call KGDB/KDB from NMI handler
904 /* Call KGDB NMI handler as MASTER */ in uv_call_kgdb_kdb()
930 pr_err("UV: NMI error: KGDB is not enabled in this kernel\n"); in uv_call_kgdb_kdb()
935 * UV NMI handler
946 /* If not a UV System NMI, ignore */ in uv_handle_nmi()
952 /* Indicate we are the first CPU into the NMI handler */ in uv_handle_nmi()
955 /* If NMI action is "kdump", then attempt to do it */ in uv_handle_nmi()
964 /* Pause as all CPU's enter the NMI handler */ in uv_handle_nmi()
982 pr_alert("UV: unknown NMI action: %d\n", uv_nmi_action); in uv_handle_nmi()
990 /* Clear MMR NMI flag on each hub */ in uv_handle_nmi()
1011 * NMI handler for pulling in CPU's when perf events are grabbing our NMI
1033 pr_warn("UV: NMI handler failed to register\n"); in uv_register_nmi_notifier()
1036 pr_warn("UV: PING NMI handler failed to register\n"); in uv_register_nmi_notifier()
1044 * Unmask NMI on all CPU's in uv_nmi_init()
1051 /* Setup HUB NMI info */
1058 nmi_debug("UV: NMI hub list @ 0x%p (%d)\n", uv_hub_nmi_list, size); in uv_nmi_setup_common()
1083 pr_info("UV: Hub NMI enabled\n"); in uv_nmi_setup()
1098 /* Ensure NMI enabled in Processor Interface Reg: */ in uv_nmi_setup_hubless()
1101 pr_info("UV: PCH NMI enabled\n"); in uv_nmi_setup_hubless()