linux/drivers/misc/vcpu_stall_detector.c

// SPDX-License-Identifier: GPL-2.0-only
//
// VCPU stall detector.
//  Copyright (C) Google, 2022

#include <linux/cpu.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>

#include <linux/device.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/nmi.h>
#include <linux/of.h>
#include <linux/param.h>
#include <linux/percpu.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

#define VCPU_STALL_REG_STATUS
#define VCPU_STALL_REG_LOAD_CNT
#define VCPU_STALL_REG_CURRENT_CNT
#define VCPU_STALL_REG_CLOCK_FREQ_HZ
#define VCPU_STALL_REG_LEN

#define VCPU_STALL_DEFAULT_CLOCK_HZ
#define VCPU_STALL_MAX_CLOCK_HZ
#define VCPU_STALL_DEFAULT_TIMEOUT_SEC
#define VCPU_STALL_MAX_TIMEOUT_SEC

struct vcpu_stall_detect_config {};

struct vcpu_stall_priv {};

/* The vcpu stall configuration structure which applies to all the CPUs */
static struct vcpu_stall_detect_config vcpu_stall_config;

#define vcpu_stall_reg_write(vcpu, reg, value)


static struct vcpu_stall_priv __percpu *vcpu_stall_detectors;

static enum hrtimer_restart
vcpu_stall_detect_timer_fn(struct hrtimer *hrtimer)
{}

static irqreturn_t vcpu_stall_detector_irq(int irq, void *dev)
{}

static int start_stall_detector_cpu(unsigned int cpu)
{}

static int stop_stall_detector_cpu(unsigned int cpu)
{}

static int vcpu_stall_detect_probe(struct platform_device *pdev)
{}

static void vcpu_stall_detect_remove(struct platform_device *pdev)
{}

static const struct of_device_id vcpu_stall_detect_of_match[] =;

MODULE_DEVICE_TABLE(of, vcpu_stall_detect_of_match);

static struct platform_driver vcpu_stall_detect_driver =;

module_platform_driver();

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();