#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#define GPI_RAS_ERR …
#define CORE_CE_ERR_CNT …
#define CORE_CE_ERR_LEN …
#define CORE_CE_ERR_DATA …
#define CORE_UE_ERR_CNT …
#define CORE_UE_ERR_LEN …
#define CORE_UE_ERR_DATA …
#define MEM_CE_ERR_CNT …
#define MEM_CE_ERR_LEN …
#define MEM_CE_ERR_DATA …
#define MEM_UE_ERR_CNT …
#define MEM_UE_ERR_LEN …
#define MEM_UE_ERR_DATA …
#define ERR_SMPRO_TYPE …
#define ERR_PMPRO_TYPE …
#define ERR_SMPRO_INFO_LO …
#define ERR_SMPRO_INFO_HI …
#define ERR_SMPRO_DATA_LO …
#define ERR_SMPRO_DATA_HI …
#define WARN_SMPRO_INFO_LO …
#define WARN_SMPRO_INFO_HI …
#define ERR_PMPRO_INFO_LO …
#define ERR_PMPRO_INFO_HI …
#define ERR_PMPRO_DATA_LO …
#define ERR_PMPRO_DATA_HI …
#define WARN_PMPRO_INFO_LO …
#define WARN_PMPRO_INFO_HI …
#define BOOTSTAGE …
#define DIMM_SYNDROME_SEL …
#define DIMM_SYNDROME_ERR …
#define DIMM_SYNDROME_STAGE …
#define PCIE_CE_ERR_CNT …
#define PCIE_CE_ERR_LEN …
#define PCIE_CE_ERR_DATA …
#define PCIE_UE_ERR_CNT …
#define PCIE_UE_ERR_LEN …
#define PCIE_UE_ERR_DATA …
#define OTHER_CE_ERR_CNT …
#define OTHER_CE_ERR_LEN …
#define OTHER_CE_ERR_DATA …
#define OTHER_UE_ERR_CNT …
#define OTHER_UE_ERR_LEN …
#define OTHER_UE_ERR_DATA …
#define VRD_WARN_FAULT_EVENT_DATA …
#define VRD_HOT_EVENT_DATA …
#define DIMM_HOT_EVENT_DATA …
#define DIMM_2X_REFRESH_EVENT_DATA …
#define MAX_READ_BLOCK_LENGTH …
#define RAS_SMPRO_ERR …
#define RAS_PMPRO_ERR …
enum RAS_48BYTES_ERR_TYPES { … };
struct smpro_error_hdr { … };
static struct smpro_error_hdr smpro_error_table[] = …;
struct smpro_int_error_hdr { … };
static struct smpro_int_error_hdr list_smpro_int_error_hdr[] = …;
struct smpro_errmon { … };
enum EVENT_TYPES { … };
static u8 smpro_event_table[NUM_EVENTS_TYPE] = …;
static ssize_t smpro_event_data_read(struct device *dev,
struct device_attribute *da, char *buf,
int channel)
{ … }
static ssize_t smpro_overflow_data_read(struct device *dev, struct device_attribute *da,
char *buf, int channel)
{ … }
static ssize_t smpro_error_data_read(struct device *dev, struct device_attribute *da,
char *buf, int channel)
{ … }
static ssize_t smpro_internal_err_read(struct device *dev, struct device_attribute *da,
char *buf, int channel)
{ … }
static ssize_t smpro_internal_warn_read(struct device *dev, struct device_attribute *da,
char *buf, int channel)
{ … }
#define ERROR_OVERFLOW_RO(_error, _index) …
ERROR_OVERFLOW_RO(…);
ERROR_OVERFLOW_RO(…);
ERROR_OVERFLOW_RO(…);
ERROR_OVERFLOW_RO(…);
ERROR_OVERFLOW_RO(…);
ERROR_OVERFLOW_RO(…);
ERROR_OVERFLOW_RO(…);
ERROR_OVERFLOW_RO(…);
#define ERROR_RO(_error, _index) …
ERROR_RO(…);
ERROR_RO(…);
ERROR_RO(…);
ERROR_RO(…);
ERROR_RO(…);
ERROR_RO(…);
ERROR_RO(…);
ERROR_RO(…);
static ssize_t error_smpro_show(struct device *dev, struct device_attribute *da, char *buf)
{ … }
static DEVICE_ATTR_RO(error_smpro);
static ssize_t error_pmpro_show(struct device *dev, struct device_attribute *da, char *buf)
{ … }
static DEVICE_ATTR_RO(error_pmpro);
static ssize_t warn_smpro_show(struct device *dev, struct device_attribute *da, char *buf)
{ … }
static DEVICE_ATTR_RO(warn_smpro);
static ssize_t warn_pmpro_show(struct device *dev, struct device_attribute *da, char *buf)
{ … }
static DEVICE_ATTR_RO(warn_pmpro);
#define EVENT_RO(_event, _index) …
EVENT_RO(…);
EVENT_RO(…);
EVENT_RO(…);
EVENT_RO(…);
static ssize_t smpro_dimm_syndrome_read(struct device *dev, struct device_attribute *da,
char *buf, unsigned int slot)
{ … }
#define EVENT_DIMM_SYNDROME(_slot) …
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
EVENT_DIMM_SYNDROME(…);
static struct attribute *smpro_errmon_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int smpro_errmon_probe(struct platform_device *pdev)
{ … }
static struct platform_driver smpro_errmon_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;