#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/smp.h>
#include <linux/init.h>
#include <linux/sysctl.h>
#include <linux/highmem.h>
#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/ctype.h>
#include <linux/edac.h>
#include <linux/bitops.h>
#include <linux/uaccess.h>
#include <asm/page.h>
#include "edac_mc.h"
#include "edac_module.h"
#include <ras/ras_event.h>
#ifdef CONFIG_EDAC_ATOMIC_SCRUB
#include <asm/edac.h>
#else
#define edac_atomic_scrub …
#endif
int edac_op_state = …;
EXPORT_SYMBOL_GPL(…);
static DEFINE_MUTEX(mem_ctls_mutex);
static LIST_HEAD(mc_devices);
static const char *edac_mc_owner;
static struct mem_ctl_info *error_desc_to_mci(struct edac_raw_error_desc *e)
{ … }
unsigned int edac_dimm_info_location(struct dimm_info *dimm, char *buf,
unsigned int len)
{ … }
#ifdef CONFIG_EDAC_DEBUG
static void edac_mc_dump_channel(struct rank_info *chan)
{ … }
static void edac_mc_dump_dimm(struct dimm_info *dimm)
{ … }
static void edac_mc_dump_csrow(struct csrow_info *csrow)
{ … }
static void edac_mc_dump_mci(struct mem_ctl_info *mci)
{ … }
#endif
const char * const edac_mem_types[] = …;
EXPORT_SYMBOL_GPL(…);
static void _edac_mc_free(struct mem_ctl_info *mci)
{ … }
static void mci_release(struct device *dev)
{ … }
static int edac_mc_alloc_csrows(struct mem_ctl_info *mci)
{ … }
static int edac_mc_alloc_dimms(struct mem_ctl_info *mci)
{ … }
struct mem_ctl_info *edac_mc_alloc(unsigned int mc_num,
unsigned int n_layers,
struct edac_mc_layer *layers,
unsigned int sz_pvt)
{ … }
EXPORT_SYMBOL_GPL(…);
void edac_mc_free(struct mem_ctl_info *mci)
{ … }
EXPORT_SYMBOL_GPL(…);
bool edac_has_mcs(void)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct mem_ctl_info *__find_mci_by_dev(struct device *dev)
{ … }
struct mem_ctl_info *find_mci_by_dev(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
static void edac_mc_workq_function(struct work_struct *work_req)
{ … }
void edac_mc_reset_delay_period(unsigned long value)
{ … }
static int add_mc_to_global_list(struct mem_ctl_info *mci)
{ … }
static int del_mc_from_global_list(struct mem_ctl_info *mci)
{ … }
struct mem_ctl_info *edac_mc_find(int idx)
{ … }
EXPORT_SYMBOL(…);
const char *edac_get_owner(void)
{ … }
EXPORT_SYMBOL_GPL(…);
int edac_mc_add_mc_with_groups(struct mem_ctl_info *mci,
const struct attribute_group **groups)
{ … }
EXPORT_SYMBOL_GPL(…);
struct mem_ctl_info *edac_mc_del_mc(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
static void edac_mc_scrub_block(unsigned long page, unsigned long offset,
u32 size)
{ … }
int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, unsigned long page)
{ … }
EXPORT_SYMBOL_GPL(…);
const char *edac_layer_name[] = …;
EXPORT_SYMBOL_GPL(…);
static void edac_inc_ce_error(struct edac_raw_error_desc *e)
{ … }
static void edac_inc_ue_error(struct edac_raw_error_desc *e)
{ … }
static void edac_ce_error(struct edac_raw_error_desc *e)
{ … }
static void edac_ue_error(struct edac_raw_error_desc *e)
{ … }
static void edac_inc_csrow(struct edac_raw_error_desc *e, int row, int chan)
{ … }
void edac_raw_mc_handle_error(struct edac_raw_error_desc *e)
{ … }
EXPORT_SYMBOL_GPL(…);
void edac_mc_handle_error(const enum hw_event_mc_err_type type,
struct mem_ctl_info *mci,
const u16 error_count,
const unsigned long page_frame_number,
const unsigned long offset_in_page,
const unsigned long syndrome,
const int top_layer,
const int mid_layer,
const int low_layer,
const char *msg,
const char *other_detail)
{ … }
EXPORT_SYMBOL_GPL(…);