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]);
228 pr_err("UV: Invalid NMI action. Valid actions are:\n");
243 /* Setup which NMI support is present in system */
265 new_nmi_method_only = true; /* Newer nmi always valid on UV5+ */
269 pr_err("UV:%s:NMI support not available on this system\n", __func__);
273 /* Then find out if new NMI is supported */
281 pr_info("UV: SMI NMI support: %s\n", uvh_nmi_mmrx_type);
286 pr_info("UV: SMI NMI support: %s\n", UVH_NMI_MMR_TYPE);
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",
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");
459 nmi_debug("UV: Initializing UV Hubless NMI on PCH\n");
475 if (!(status & STS_GPP_D_0_MASK)) /* Not a UV external NMI */
478 *pstat = STS_GPP_D_0_MASK; /* Is a UV NMI: clear GPP_D_0 status */
513 /* Check if this is a system NMI event */
517 int nmi = 0;
524 nmi = atomic_read(&hub_nmi->in_nmi);
525 if (nmi)
531 /* Check flag for UV external NMI */
534 nmi = 1;
538 /* A non-PCH node in a hubless system waits for NMI */
542 /* MMR/PCH NMI flag is clear */
547 /* Wait a moment for the HUB NMI locker to set flag */
552 nmi = atomic_read(&hub_nmi->in_nmi);
553 if (nmi)
558 * Check if this BMC missed setting the MMR NMI flag (or)
561 if (!nmi) {
562 nmi = atomic_read(&uv_in_nmi);
563 if (nmi)
573 if (!nmi)
576 return 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 */
670 /* Wait until all slave CPU's have entered UV NMI handler */
685 /* If not all made it in, send IPI NMI to them */
686 pr_alert("UV: Sending NMI IPI to %d CPUs: %*pbl\n",
696 pr_alert("UV: %d CPUs not in NMI loop: %*pbl\n",
701 pr_alert("UV: %d of %d CPUs in NMI\n",
786 pr_alert("UV: NMI CPU health check (non-responding:%d)\n", out);
818 pr_alert("UV: %d CPUs ignored NMI\n", ignored);
845 pr_err("UV: NMI error: kdump kernel not loaded\n");
851 pr_emerg("UV: NMI executing crash_kexec on CPU%d\n", cpu);
883 pr_err("UV: NMI error: KDB is not enabled in this kernel\n");
889 * Call KGDB/KDB from NMI handler
904 /* Call KGDB NMI handler as MASTER */
930 pr_err("UV: NMI error: KGDB is not enabled in this kernel\n");
935 * UV NMI handler
946 /* If not a UV System NMI, ignore */
952 /* Indicate we are the first CPU into the NMI handler */
955 /* If NMI action is "kdump", then attempt to do it */
964 /* Pause as all CPU's enter the NMI handler */
982 pr_alert("UV: unknown NMI action: %d\n", uv_nmi_action);
990 /* Clear MMR NMI flag on each hub */
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");
1036 pr_warn("UV: PING NMI handler failed to register\n");
1044 * Unmask NMI on all CPU's
1051 /* Setup HUB NMI info */
1058 nmi_debug("UV: NMI hub list @ 0x%p (%d)\n", uv_hub_nmi_list, size);
1083 pr_info("UV: Hub NMI enabled\n");
1098 /* Ensure NMI enabled in Processor Interface Reg: */
1101 pr_info("UV: PCH NMI enabled\n");