#include <linux/module.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/edac.h>
#include <linux/io.h>
#include "edac_module.h"
#include <linux/io-64-nonatomic-lo-hi.h>
#define EDAC_MOD_STR …
#define PCI_DEVICE_ID_INTEL_3200_HB …
#define I3200_DIMMS …
#define I3200_RANKS …
#define I3200_RANKS_PER_CHANNEL …
#define I3200_CHANNELS …
#define I3200_MCHBAR_LOW …
#define I3200_MCHBAR_HIGH …
#define I3200_MCHBAR_MASK …
#define I3200_MMR_WINDOW_SIZE …
#define I3200_TOM …
#define I3200_TOM_MASK …
#define I3200_TOM_SHIFT …
#define I3200_ERRSTS …
#define I3200_ERRSTS_UE …
#define I3200_ERRSTS_CE …
#define I3200_ERRSTS_BITS …
#define I3200_C0DRB …
#define I3200_C1DRB …
#define I3200_DRB_MASK …
#define I3200_DRB_SHIFT …
#define I3200_C0ECCERRLOG …
#define I3200_C1ECCERRLOG …
#define I3200_ECCERRLOG_CE …
#define I3200_ECCERRLOG_UE …
#define I3200_ECCERRLOG_RANK_BITS …
#define I3200_ECCERRLOG_RANK_SHIFT …
#define I3200_ECCERRLOG_SYNDROME_BITS …
#define I3200_ECCERRLOG_SYNDROME_SHIFT …
#define I3200_CAPID0 …
struct i3200_priv { … };
static int nr_channels;
static int how_many_channels(struct pci_dev *pdev)
{ … }
static unsigned long eccerrlog_syndrome(u64 log)
{ … }
static int eccerrlog_row(int channel, u64 log)
{ … }
enum i3200_chips { … };
struct i3200_dev_info { … };
struct i3200_error_info { … };
static const struct i3200_dev_info i3200_devs[] = …;
static struct pci_dev *mci_pdev;
static int i3200_registered = …;
static void i3200_clear_error_info(struct mem_ctl_info *mci)
{ … }
static void i3200_get_and_clear_error_info(struct mem_ctl_info *mci,
struct i3200_error_info *info)
{ … }
static void i3200_process_error_info(struct mem_ctl_info *mci,
struct i3200_error_info *info)
{ … }
static void i3200_check(struct mem_ctl_info *mci)
{ … }
static void __iomem *i3200_map_mchbar(struct pci_dev *pdev)
{ … }
static void i3200_get_drbs(void __iomem *window,
u16 drbs[I3200_CHANNELS][I3200_RANKS_PER_CHANNEL])
{ … }
static bool i3200_is_stacked(struct pci_dev *pdev,
u16 drbs[I3200_CHANNELS][I3200_RANKS_PER_CHANNEL])
{ … }
static unsigned long drb_to_nr_pages(
u16 drbs[I3200_CHANNELS][I3200_RANKS_PER_CHANNEL], bool stacked,
int channel, int rank)
{ … }
static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
{ … }
static int i3200_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{ … }
static void i3200_remove_one(struct pci_dev *pdev)
{ … }
static const struct pci_device_id i3200_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci, i3200_pci_tbl);
static struct pci_driver i3200_driver = …;
static int __init i3200_init(void)
{ … }
static void __exit i3200_exit(void)
{ … }
module_init(…) …;
module_exit(i3200_exit);
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
module_param(edac_op_state, int, 0444);
MODULE_PARM_DESC(…) …;