Skip to content

Commit

Permalink
Merge tag 'edac_for_4.14' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/bp/bp

Pull EDAC updates from Borislav Petkov:

 - pnd2_edac: A minimal sideband driver (Tony Luck)

 - small-ish cleanups and fixes all over the place

* tag 'edac_for_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  EDAC, mce_amd: Get rid of local var in amd_filter_mce()
  EDAC, mce_amd: Get rid of most struct cpuinfo_x86 uses
  EDAC, mce_amd: Rename decode_smca_errors() to decode_smca_error()
  EDAC: Make device_type const
  EDAC, pnd2: Properly toggle hidden state for P2SB PCI device
  EDAC, pnd2: Conditionally unhide/hide the P2SB PCI device to read BAR
  EDAC, pnd2: Mask off the lower four bits of a BAR
  EDAC, thunderx: Fix error handling path in thunderx_lmc_probe()
  EDAC, altera: Fix error handling path in altr_edac_device_probe()
  EDAC, pnd2: Build in a minimal sideband driver for Apollo Lake
  EDAC, sb_edac: Classify memory mirroring modes
  EDAC, cpc925, ppc4xx: Convert to using %pOF instead of full_name
  EDAC: Get rid of mci->mod_ver
  EDAC: Constify attribute_group structures
  EDAC, mce_amd: Use cpu_to_node() to find the node ID
  • Loading branch information
Linus Torvalds committed Sep 5, 2017
2 parents bafb076 + 3984434 commit 16a832a
Show file tree
Hide file tree
Showing 33 changed files with 161 additions and 136 deletions.
6 changes: 3 additions & 3 deletions drivers/edac/altera_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "edac_module.h"

#define EDAC_MOD_STR "altera_edac"
#define EDAC_VERSION "1"
#define EDAC_DEVICE "Altera"

static const struct altr_sdram_prv_data c5_data = {
Expand Down Expand Up @@ -392,7 +391,6 @@ static int altr_sdram_probe(struct platform_device *pdev)
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
mci->edac_cap = EDAC_FLAG_SECDED;
mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = EDAC_VERSION;
mci->ctl_name = dev_name(&pdev->dev);
mci->scrub_mode = SCRUB_SW_SRC;
mci->dev_name = dev_name(&pdev->dev);
Expand Down Expand Up @@ -749,8 +747,10 @@ static int altr_edac_device_probe(struct platform_device *pdev)
drvdata->edac_dev_name = ecc_name;

drvdata->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
if (!drvdata->base)
if (!drvdata->base) {
res = -ENOMEM;
goto fail1;
}

/* Get driver specific data for this EDAC device */
drvdata->data = of_match_node(altr_edac_device_of_match, np)->data;
Expand Down
1 change: 0 additions & 1 deletion drivers/edac/amd64_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -3130,7 +3130,6 @@ static void setup_mci_misc_attrs(struct mem_ctl_info *mci,

mci->edac_cap = determine_edac_cap(pvt);
mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = EDAC_AMD64_VERSION;
mci->ctl_name = fam->ctl_name;
mci->dev_name = pci_name(pvt->F3);
mci->ctl_page_to_phys = NULL;
Expand Down
2 changes: 0 additions & 2 deletions drivers/edac/amd76x_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/edac.h>
#include "edac_module.h"

#define AMD76X_REVISION " Ver: 2.0.2"
#define EDAC_MOD_STR "amd76x_edac"

#define amd76x_printk(level, fmt, arg...) \
Expand Down Expand Up @@ -263,7 +262,6 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx)
mci->edac_cap = ems_mode ?
(EDAC_FLAG_EC | EDAC_FLAG_SECDED) : EDAC_FLAG_NONE;
mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = AMD76X_REVISION;
mci->ctl_name = amd76x_devs[dev_idx].ctl_name;
mci->dev_name = pci_name(pdev);
mci->edac_check = amd76x_check;
Expand Down
3 changes: 1 addition & 2 deletions drivers/edac/cpc925_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ static u32 cpc925_cpu_mask_disabled(void)
}

if (reg == NULL || *reg > 2) {
cpc925_printk(KERN_ERR, "Bad reg value at %s\n", cpunode->full_name);
cpc925_printk(KERN_ERR, "Bad reg value at %pOF\n", cpunode);
continue;
}

Expand Down Expand Up @@ -999,7 +999,6 @@ static int cpc925_probe(struct platform_device *pdev)
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
mci->edac_cap = EDAC_FLAG_SECDED;
mci->mod_name = CPC925_EDAC_MOD_STR;
mci->mod_ver = CPC925_EDAC_REVISION;
mci->ctl_name = pdev->name;

if (edac_op_state == EDAC_OPSTATE_POLL)
Expand Down
2 changes: 0 additions & 2 deletions drivers/edac/e752x_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/edac.h>
#include "edac_module.h"

#define E752X_REVISION " Ver: 2.0.2"
#define EDAC_MOD_STR "e752x_edac"

static int report_non_memory_errors;
Expand Down Expand Up @@ -1303,7 +1302,6 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx)
(EDAC_FLAG_NONE | EDAC_FLAG_SECDED | EDAC_FLAG_S4ECD4ED);
/* FIXME - what if different memory types are in different csrows? */
mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = E752X_REVISION;
mci->pdev = &pdev->dev;

edac_dbg(3, "init pvt\n");
Expand Down
2 changes: 0 additions & 2 deletions drivers/edac/e7xxx_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <linux/edac.h>
#include "edac_module.h"

#define E7XXX_REVISION " Ver: 2.0.2"
#define EDAC_MOD_STR "e7xxx_edac"

#define e7xxx_printk(level, fmt, arg...) \
Expand Down Expand Up @@ -458,7 +457,6 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
EDAC_FLAG_S4ECD4ED;
/* FIXME - what if different memory types are in different csrows? */
mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = E7XXX_REVISION;
mci->pdev = &pdev->dev;
edac_dbg(3, "init pvt\n");
pvt = (struct e7xxx_pvt *)mci->pvt_info;
Expand Down
14 changes: 7 additions & 7 deletions drivers/edac/edac_mc_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ static struct attribute *csrow_attrs[] = {
NULL,
};

static struct attribute_group csrow_attr_grp = {
static const struct attribute_group csrow_attr_grp = {
.attrs = csrow_attrs,
};

Expand All @@ -304,7 +304,7 @@ static void csrow_attr_release(struct device *dev)
kfree(csrow);
}

static struct device_type csrow_attr_type = {
static const struct device_type csrow_attr_type = {
.groups = csrow_attr_groups,
.release = csrow_attr_release,
};
Expand Down Expand Up @@ -627,7 +627,7 @@ static struct attribute *dimm_attrs[] = {
NULL,
};

static struct attribute_group dimm_attr_grp = {
static const struct attribute_group dimm_attr_grp = {
.attrs = dimm_attrs,
};

Expand All @@ -644,7 +644,7 @@ static void dimm_attr_release(struct device *dev)
kfree(dimm);
}

static struct device_type dimm_attr_type = {
static const struct device_type dimm_attr_type = {
.groups = dimm_attr_groups,
.release = dimm_attr_release,
};
Expand Down Expand Up @@ -902,7 +902,7 @@ static umode_t mci_attr_is_visible(struct kobject *kobj,
return mode;
}

static struct attribute_group mci_attr_grp = {
static const struct attribute_group mci_attr_grp = {
.attrs = mci_attrs,
.is_visible = mci_attr_is_visible,
};
Expand All @@ -920,7 +920,7 @@ static void mci_attr_release(struct device *dev)
kfree(mci);
}

static struct device_type mci_attr_type = {
static const struct device_type mci_attr_type = {
.groups = mci_attr_groups,
.release = mci_attr_release,
};
Expand Down Expand Up @@ -1074,7 +1074,7 @@ static void mc_attr_release(struct device *dev)
kfree(dev);
}

static struct device_type mc_attr_type = {
static const struct device_type mc_attr_type = {
.release = mc_attr_release,
};
/*
Expand Down
3 changes: 0 additions & 3 deletions drivers/edac/ghes_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include "edac_module.h"
#include <ras/ras_event.h>

#define GHES_EDAC_REVISION " Ver: 1.0.0"

struct ghes_edac_pvt {
struct list_head list;
struct ghes *ghes;
Expand Down Expand Up @@ -451,7 +449,6 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev)
mci->edac_ctl_cap = EDAC_FLAG_NONE;
mci->edac_cap = EDAC_FLAG_NONE;
mci->mod_name = "ghes_edac.c";
mci->mod_ver = GHES_EDAC_REVISION;
mci->ctl_name = "ghes_edac";
mci->dev_name = "ghes";

Expand Down
1 change: 0 additions & 1 deletion drivers/edac/highbank_mc_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ static int highbank_mc_probe(struct platform_device *pdev)
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
mci->edac_cap = EDAC_FLAG_SECDED;
mci->mod_name = pdev->dev.driver->name;
mci->mod_ver = "1";
mci->ctl_name = id->compatible;
mci->dev_name = dev_name(&pdev->dev);
mci->scrub_mode = SCRUB_SW_SRC;
Expand Down
3 changes: 0 additions & 3 deletions drivers/edac/i3000_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#include <linux/edac.h>
#include "edac_module.h"

#define I3000_REVISION "1.1"

#define EDAC_MOD_STR "i3000_edac"

#define I3000_RANKS 8
Expand Down Expand Up @@ -375,7 +373,6 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)
mci->edac_cap = EDAC_FLAG_SECDED;

mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = I3000_REVISION;
mci->ctl_name = i3000_devs[dev_idx].ctl_name;
mci->dev_name = pci_name(pdev);
mci->edac_check = i3000_check;
Expand Down
3 changes: 0 additions & 3 deletions drivers/edac/i3200_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#include <linux/io-64-nonatomic-lo-hi.h>

#define I3200_REVISION "1.1"

#define EDAC_MOD_STR "i3200_edac"

#define PCI_DEVICE_ID_INTEL_3200_HB 0x29f0
Expand Down Expand Up @@ -375,7 +373,6 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
mci->edac_cap = EDAC_FLAG_SECDED;

mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = I3200_REVISION;
mci->ctl_name = i3200_devs[dev_idx].ctl_name;
mci->dev_name = pci_name(pdev);
mci->edac_check = i3200_check;
Expand Down
1 change: 0 additions & 1 deletion drivers/edac/i5000_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,6 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
mci->edac_ctl_cap = EDAC_FLAG_NONE;
mci->edac_cap = EDAC_FLAG_NONE;
mci->mod_name = "i5000_edac.c";
mci->mod_ver = I5000_REVISION;
mci->ctl_name = i5000_devs[dev_idx].ctl_name;
mci->dev_name = pci_name(pdev);
mci->ctl_page_to_phys = NULL;
Expand Down
1 change: 0 additions & 1 deletion drivers/edac/i5100_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,6 @@ static int i5100_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
mci->edac_ctl_cap = EDAC_FLAG_SECDED;
mci->edac_cap = EDAC_FLAG_SECDED;
mci->mod_name = "i5100_edac.c";
mci->mod_ver = "not versioned";
mci->ctl_name = "i5100";
mci->dev_name = pci_name(pdev);
mci->ctl_page_to_phys = NULL;
Expand Down
1 change: 0 additions & 1 deletion drivers/edac/i5400_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,6 @@ static int i5400_probe1(struct pci_dev *pdev, int dev_idx)
mci->edac_ctl_cap = EDAC_FLAG_NONE;
mci->edac_cap = EDAC_FLAG_NONE;
mci->mod_name = "i5400_edac.c";
mci->mod_ver = I5400_REVISION;
mci->ctl_name = i5400_devs[dev_idx].ctl_name;
mci->dev_name = pci_name(pdev);
mci->ctl_page_to_phys = NULL;
Expand Down
1 change: 0 additions & 1 deletion drivers/edac/i7300_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,6 @@ static int i7300_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
mci->edac_ctl_cap = EDAC_FLAG_NONE;
mci->edac_cap = EDAC_FLAG_NONE;
mci->mod_name = "i7300_edac.c";
mci->mod_ver = I7300_REVISION;
mci->ctl_name = i7300_devs[0].ctl_name;
mci->dev_name = pci_name(pdev);
mci->ctl_page_to_phys = NULL;
Expand Down
9 changes: 4 additions & 5 deletions drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ static struct attribute *i7core_addrmatch_attrs[] = {
NULL
};

static struct attribute_group addrmatch_grp = {
static const struct attribute_group addrmatch_grp = {
.attrs = i7core_addrmatch_attrs,
};

Expand All @@ -1094,7 +1094,7 @@ static void addrmatch_release(struct device *device)
kfree(device);
}

static struct device_type addrmatch_type = {
static const struct device_type addrmatch_type = {
.groups = addrmatch_groups,
.release = addrmatch_release,
};
Expand All @@ -1110,7 +1110,7 @@ static struct attribute *i7core_udimm_counters_attrs[] = {
NULL
};

static struct attribute_group all_channel_counts_grp = {
static const struct attribute_group all_channel_counts_grp = {
.attrs = i7core_udimm_counters_attrs,
};

Expand All @@ -1125,7 +1125,7 @@ static void all_channel_counts_release(struct device *device)
kfree(device);
}

static struct device_type all_channel_counts_type = {
static const struct device_type all_channel_counts_type = {
.groups = all_channel_counts_groups,
.release = all_channel_counts_release,
};
Expand Down Expand Up @@ -2159,7 +2159,6 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev)
mci->edac_ctl_cap = EDAC_FLAG_NONE;
mci->edac_cap = EDAC_FLAG_NONE;
mci->mod_name = "i7core_edac.c";
mci->mod_ver = I7CORE_REVISION;
mci->ctl_name = kasprintf(GFP_KERNEL, "i7 core #%d",
i7core_dev->socket);
mci->dev_name = pci_name(i7core_dev->pdev[0]);
Expand Down
3 changes: 0 additions & 3 deletions drivers/edac/i82443bxgx_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#include <linux/edac.h>
#include "edac_module.h"

#define I82443_REVISION "0.1"

#define EDAC_MOD_STR "i82443bxgx_edac"

/* The 82443BX supports SDRAM, or EDO (EDO for mobile only), "Memory
Expand Down Expand Up @@ -320,7 +318,6 @@ static int i82443bxgx_edacmc_probe1(struct pci_dev *pdev, int dev_idx)
I82443BXGX_EAP_OFFSET_MBE));

mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = I82443_REVISION;
mci->ctl_name = "I82443BXGX";
mci->dev_name = pci_name(pdev);
mci->edac_check = i82443bxgx_edacmc_check;
Expand Down
2 changes: 0 additions & 2 deletions drivers/edac/i82860_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <linux/edac.h>
#include "edac_module.h"

#define I82860_REVISION " Ver: 2.0.2"
#define EDAC_MOD_STR "i82860_edac"

#define i82860_printk(level, fmt, arg...) \
Expand Down Expand Up @@ -216,7 +215,6 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx)
/* I"m not sure about this but I think that all RDRAM is SECDED */
mci->edac_cap = EDAC_FLAG_SECDED;
mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = I82860_REVISION;
mci->ctl_name = i82860_devs[dev_idx].ctl_name;
mci->dev_name = pci_name(pdev);
mci->edac_check = i82860_check;
Expand Down
2 changes: 0 additions & 2 deletions drivers/edac/i82875p_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <linux/edac.h>
#include "edac_module.h"

#define I82875P_REVISION " Ver: 2.0.2"
#define EDAC_MOD_STR "i82875p_edac"

#define i82875p_printk(level, fmt, arg...) \
Expand Down Expand Up @@ -423,7 +422,6 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
mci->edac_cap = EDAC_FLAG_UNKNOWN;
mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = I82875P_REVISION;
mci->ctl_name = i82875p_devs[dev_idx].ctl_name;
mci->dev_name = pci_name(pdev);
mci->edac_check = i82875p_check;
Expand Down
2 changes: 0 additions & 2 deletions drivers/edac/i82975x_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <linux/edac.h>
#include "edac_module.h"

#define I82975X_REVISION " Ver: 1.0.0"
#define EDAC_MOD_STR "i82975x_edac"

#define i82975x_printk(level, fmt, arg...) \
Expand Down Expand Up @@ -564,7 +563,6 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx)
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
mci->edac_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = I82975X_REVISION;
mci->ctl_name = i82975x_devs[dev_idx].ctl_name;
mci->dev_name = pci_name(pdev);
mci->edac_check = i82975x_check;
Expand Down
2 changes: 0 additions & 2 deletions drivers/edac/ie31200_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <linux/io-64-nonatomic-lo-hi.h>
#include "edac_module.h"

#define IE31200_REVISION "1.0"
#define EDAC_MOD_STR "ie31200_edac"

#define ie31200_printk(level, fmt, arg...) \
Expand Down Expand Up @@ -420,7 +419,6 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
mci->edac_ctl_cap = EDAC_FLAG_SECDED;
mci->edac_cap = EDAC_FLAG_SECDED;
mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = IE31200_REVISION;
mci->ctl_name = ie31200_devs[dev_idx].ctl_name;
mci->dev_name = pci_name(pdev);
mci->edac_check = ie31200_check;
Expand Down
Loading

0 comments on commit 16a832a

Please sign in to comment.