Lines Matching full:nmi

3  * SGI NMI support routines
16 #include <linux/nmi.h>
26 #include <asm/nmi.h>
34 * UV handler for NMI
36 * Handle system-wide NMI events generated by the global 'power nmi' command.
38 * Basic operation is to field the NMI interrupt on each CPU and wait
39 * until all CPU's have arrived into the nmi handler. If some CPU's do not
40 * make it into the handler, try and force them in with the IPI(NMI) signal.
46 * To do this we register our primary NMI notifier on the NMI_UNKNOWN
47 * chain. This reduces the number of false NMI calls when the perf
49 * second (~4M/s for 1024 CPU threads). Our secondary NMI handler is
51 * IPI(NMI) signal as mentioned above, and does not read the UV Hub's MMR.
59 /* Newer SMM NMI handler, not present in all systems */
65 /* Non-zero indicates newer SMM NMI handler present */
68 /* Indicates to BIOS that we want to use the newer SMM NMI handler */
180 /* Valid NMI Actions */
191 { "health", "check if CPUs respond to NMI" },
220 pr_info("UV: New NMI action:%s\n", uv_nmi_action); in param_set_action()
224 pr_err("UV: Invalid NMI action:%s, valid actions are:\n", arg); in param_set_action()
244 /* Setup which NMI support is present in system */
266 new_nmi_method_only = true; /* Newer nmi always valid on UV5+ */ in uv_nmi_setup_mmrs()
270 pr_err("UV:%s:NMI support not available on this system\n", __func__); in uv_nmi_setup_mmrs()
274 /* Then find out if new NMI is supported */ in uv_nmi_setup_mmrs()
282 pr_info("UV: SMI NMI support: %s\n", uvh_nmi_mmrx_type); in uv_nmi_setup_mmrs()
287 pr_info("UV: SMI NMI support: %s\n", UVH_NMI_MMR_TYPE); in uv_nmi_setup_mmrs()
291 /* Read NMI MMR and check if NMI flag was set by BMC. */
305 * UV hubless NMI handler functions
343 nmi_debug("UV:NMI: GPP_D_0 interrupt %s\n", in uv_nmi_setup_hubless_intr()
423 * # (we want an NMI not an IRQ)
427 * 17 GPIO Input Route NMI (GPIROUTNMI): = 1 # Routing can cause NMI.
456 pr_info("UV: Hubless NMI already configured\n"); in uv_init_hubless_pch_d0()
460 nmi_debug("UV: Initializing UV Hubless NMI on PCH\n"); in uv_init_hubless_pch_d0()
476 if (!(status & STS_GPP_D_0_MASK)) /* Not a UV external NMI */ in uv_nmi_test_hubless()
479 *pstat = STS_GPP_D_0_MASK; /* Is a UV NMI: clear GPP_D_0 status */ in uv_nmi_test_hubless()
514 /* Check if this is a system NMI event */
518 int nmi = 0; in uv_check_nmi() local
525 nmi = atomic_read(&hub_nmi->in_nmi); in uv_check_nmi()
526 if (nmi) in uv_check_nmi()
532 /* Check flag for UV external NMI */ in uv_check_nmi()
535 nmi = 1; in uv_check_nmi()
539 /* A non-PCH node in a hubless system waits for NMI */ in uv_check_nmi()
543 /* MMR/PCH NMI flag is clear */ in uv_check_nmi()
548 /* Wait a moment for the HUB NMI locker to set flag */ in uv_check_nmi()
553 nmi = atomic_read(&hub_nmi->in_nmi); in uv_check_nmi()
554 if (nmi) in uv_check_nmi()
559 * Check if this BMC missed setting the MMR NMI flag (or) in uv_check_nmi()
562 if (!nmi) { in uv_check_nmi()
563 nmi = atomic_read(&uv_in_nmi); in uv_check_nmi()
564 if (nmi) in uv_check_nmi()
574 if (!nmi) in uv_check_nmi()
577 return nmi; in uv_check_nmi()
580 /* Need to reset the NMI MMR register, but only once per hub. */
596 /* Ping non-responding CPU's attempting to force them into the NMI handler */
607 /* Clean up flags for CPU's that ignored both NMI and ping */
619 /* Loop waiting as CPU's enter NMI handler */
633 /* PCH NMI causes only one CPU to respond */ in uv_nmi_wait_cpus()
671 /* Wait until all slave CPU's have entered UV NMI handler */
686 /* If not all made it in, send IPI NMI to them */ in uv_nmi_wait()
687 pr_alert("UV: Sending NMI IPI to %d CPUs: %*pbl\n", in uv_nmi_wait()
697 pr_alert("UV: %d CPUs not in NMI loop: %*pbl\n", in uv_nmi_wait()
702 pr_alert("UV: %d of %d CPUs in NMI\n", in uv_nmi_wait()
787 pr_alert("UV: NMI CPU health check (non-responding:%d)\n", out); in uv_nmi_action_health()
819 pr_alert("UV: %d CPUs ignored NMI\n", ignored); in uv_nmi_dump_state()
846 pr_err("UV: NMI error: kdump kernel not loaded\n"); in uv_nmi_kdump()
852 pr_emerg("UV: NMI executing crash_kexec on CPU%d\n", cpu); in uv_nmi_kdump()
884 pr_err("UV: NMI error: KDB is not enabled in this kernel\n"); in uv_nmi_kdb_reason()
890 * Call KGDB/KDB from NMI handler
905 /* Call KGDB NMI handler as MASTER */ in uv_call_kgdb_kdb()
931 pr_err("UV: NMI error: KGDB is not enabled in this kernel\n"); in uv_call_kgdb_kdb()
936 * UV NMI handler
947 /* If not a UV System NMI, ignore */ in uv_handle_nmi()
953 /* Indicate we are the first CPU into the NMI handler */ in uv_handle_nmi()
956 /* If NMI action is "kdump", then attempt to do it */ in uv_handle_nmi()
965 /* Pause as all CPU's enter the NMI handler */ in uv_handle_nmi()
977 pr_alert("UV: unknown NMI action: %s\n", uv_nmi_action); in uv_handle_nmi()
984 /* Clear MMR NMI flag on each hub */ in uv_handle_nmi()
1005 * NMI handler for pulling in CPU's when perf events are grabbing our NMI
1027 pr_warn("UV: NMI handler failed to register\n"); in uv_register_nmi_notifier()
1030 pr_warn("UV: PING NMI handler failed to register\n"); in uv_register_nmi_notifier()
1038 * Unmask NMI on all CPU's in uv_nmi_init()
1045 /* Setup HUB NMI info */
1052 nmi_debug("UV: NMI hub list @ 0x%p (%d)\n", uv_hub_nmi_list, size); in uv_nmi_setup_common()
1077 pr_info("UV: Hub NMI enabled\n"); in uv_nmi_setup()
1092 /* Ensure NMI enabled in Processor Interface Reg: */ in uv_nmi_setup_hubless()
1095 pr_info("UV: PCH NMI enabled\n"); in uv_nmi_setup_hubless()