linux/drivers/acpi/apei/erst-dbg.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * APEI Error Record Serialization Table debug support
 *
 * ERST is a way provided by APEI to save and retrieve hardware error
 * information to and from a persistent store. This file provide the
 * debugging/testing support for ERST kernel support and firmware
 * implementation.
 *
 * Copyright 2010 Intel Corp.
 *   Author: Huang Ying <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include <acpi/apei.h>
#include <linux/miscdevice.h>

#include "apei-internal.h"

#define ERST_DBG_PFX

#define ERST_DBG_RECORD_LEN_MAX

static void *erst_dbg_buf;
static unsigned int erst_dbg_buf_len;

/* Prevent erst_dbg_read/write from being invoked concurrently */
static DEFINE_MUTEX(erst_dbg_mutex);

static int erst_dbg_open(struct inode *inode, struct file *file)
{}

static int erst_dbg_release(struct inode *inode, struct file *file)
{}

static long erst_dbg_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
{}

static ssize_t erst_dbg_read(struct file *filp, char __user *ubuf,
			     size_t usize, loff_t *off)
{}

static ssize_t erst_dbg_write(struct file *filp, const char __user *ubuf,
			      size_t usize, loff_t *off)
{}

static const struct file_operations erst_dbg_ops =;

static struct miscdevice erst_dbg_dev =;

static __init int erst_dbg_init(void)
{}

static __exit void erst_dbg_exit(void)
{}

module_init();
module_exit(erst_dbg_exit);

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