linux/arch/x86/kernel/nmi_selftest.c

// SPDX-License-Identifier: GPL-2.0
/*
 * arch/x86/kernel/nmi-selftest.c
 *
 * Testsuite for NMI: IPIs
 *
 * Started by Don Zickus:
 * (using lib/locking-selftest.c as a guide)
 *
 *   Copyright (C) 2011 Red Hat, Inc., Don Zickus <[email protected]>
 */

#include <linux/smp.h>
#include <linux/cpumask.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/percpu.h>

#include <asm/apic.h>
#include <asm/nmi.h>

#define SUCCESS
#define FAILURE
#define TIMEOUT

static int __initdata nmi_fail;

/* check to see if NMI IPIs work on this machine */
static DECLARE_BITMAP(nmi_ipi_mask, NR_CPUS) __initdata;

static int __initdata testcase_total;
static int __initdata testcase_successes;
static int __initdata expected_testcase_failures;
static int __initdata unexpected_testcase_failures;
static int __initdata unexpected_testcase_unknowns;

static int __init nmi_unk_cb(unsigned int val, struct pt_regs *regs)
{}

static void __init init_nmi_testsuite(void)
{}

static void __init cleanup_nmi_testsuite(void)
{}

static int __init test_nmi_ipi_callback(unsigned int val, struct pt_regs *regs)
{}

static void __init test_nmi_ipi(struct cpumask *mask)
{}

static void __init remote_ipi(void)
{}

static void __init local_ipi(void)
{}

static void __init reset_nmi(void)
{}

static void __init dotest(void (*testcase_fn)(void), int expected)
{}

static inline void __init print_testname(const char *testname)
{}

void __init nmi_selftest(void)
{}