mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac
Pull EDAC fixes from Mauro Carvalho Chehab: "One EDAC core fix, and a few driver fixes (i7300, i9275x, i7core)." * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: i7core_edac: fix panic when accessing sysfs files i7300_edac: Fix error flag testing edac: Fix the dimm filling for csrows-based layouts i82975x_edac: Fix dimm label initialization
This commit is contained in:
commit
b52c6402b5
4 changed files with 22 additions and 17 deletions
|
@ -416,10 +416,18 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
|
|||
dimm->cschannel = chn;
|
||||
|
||||
/* Increment csrow location */
|
||||
row++;
|
||||
if (row == tot_csrows) {
|
||||
row = 0;
|
||||
if (layers[0].is_virt_csrow) {
|
||||
chn++;
|
||||
if (chn == tot_channels) {
|
||||
chn = 0;
|
||||
row++;
|
||||
}
|
||||
} else {
|
||||
row++;
|
||||
if (row == tot_csrows) {
|
||||
row = 0;
|
||||
chn++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Increment dimm location */
|
||||
|
|
|
@ -197,8 +197,8 @@ static const char *ferr_fat_fbd_name[] = {
|
|||
[0] = "Memory Write error on non-redundant retry or "
|
||||
"FBD configuration Write error on retry",
|
||||
};
|
||||
#define GET_FBD_FAT_IDX(fbderr) (fbderr & (3 << 28))
|
||||
#define FERR_FAT_FBD_ERR_MASK ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3))
|
||||
#define GET_FBD_FAT_IDX(fbderr) (((fbderr) >> 28) & 3)
|
||||
#define FERR_FAT_FBD_ERR_MASK ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 22))
|
||||
|
||||
#define FERR_NF_FBD 0xa0
|
||||
static const char *ferr_nf_fbd_name[] = {
|
||||
|
@ -225,7 +225,7 @@ static const char *ferr_nf_fbd_name[] = {
|
|||
[1] = "Aliased Uncorrectable Non-Mirrored Demand Data ECC",
|
||||
[0] = "Uncorrectable Data ECC on Replay",
|
||||
};
|
||||
#define GET_FBD_NF_IDX(fbderr) (fbderr & (3 << 28))
|
||||
#define GET_FBD_NF_IDX(fbderr) (((fbderr) >> 28) & 3)
|
||||
#define FERR_NF_FBD_ERR_MASK ((1 << 24) | (1 << 23) | (1 << 22) | (1 << 21) |\
|
||||
(1 << 18) | (1 << 17) | (1 << 16) | (1 << 15) |\
|
||||
(1 << 14) | (1 << 13) | (1 << 11) | (1 << 10) |\
|
||||
|
@ -464,7 +464,7 @@ static void i7300_process_fbd_error(struct mem_ctl_info *mci)
|
|||
errnum = find_first_bit(&errors,
|
||||
ARRAY_SIZE(ferr_nf_fbd_name));
|
||||
specific = GET_ERR_FROM_TABLE(ferr_nf_fbd_name, errnum);
|
||||
branch = (GET_FBD_FAT_IDX(error_reg) == 2) ? 1 : 0;
|
||||
branch = (GET_FBD_NF_IDX(error_reg) == 2) ? 1 : 0;
|
||||
|
||||
pci_read_config_dword(pvt->pci_dev_16_1_fsb_addr_map,
|
||||
REDMEMA, &syndrome);
|
||||
|
|
|
@ -816,7 +816,7 @@ static ssize_t i7core_inject_store_##param( \
|
|||
struct device_attribute *mattr, \
|
||||
const char *data, size_t count) \
|
||||
{ \
|
||||
struct mem_ctl_info *mci = to_mci(dev); \
|
||||
struct mem_ctl_info *mci = dev_get_drvdata(dev); \
|
||||
struct i7core_pvt *pvt; \
|
||||
long value; \
|
||||
int rc; \
|
||||
|
@ -845,7 +845,7 @@ static ssize_t i7core_inject_show_##param( \
|
|||
struct device_attribute *mattr, \
|
||||
char *data) \
|
||||
{ \
|
||||
struct mem_ctl_info *mci = to_mci(dev); \
|
||||
struct mem_ctl_info *mci = dev_get_drvdata(dev); \
|
||||
struct i7core_pvt *pvt; \
|
||||
\
|
||||
pvt = mci->pvt_info; \
|
||||
|
@ -1052,7 +1052,7 @@ static ssize_t i7core_show_counter_##param( \
|
|||
struct device_attribute *mattr, \
|
||||
char *data) \
|
||||
{ \
|
||||
struct mem_ctl_info *mci = to_mci(dev); \
|
||||
struct mem_ctl_info *mci = dev_get_drvdata(dev); \
|
||||
struct i7core_pvt *pvt = mci->pvt_info; \
|
||||
\
|
||||
edac_dbg(1, "\n"); \
|
||||
|
|
|
@ -370,10 +370,6 @@ static enum dev_type i82975x_dram_type(void __iomem *mch_window, int rank)
|
|||
static void i82975x_init_csrows(struct mem_ctl_info *mci,
|
||||
struct pci_dev *pdev, void __iomem *mch_window)
|
||||
{
|
||||
static const char *labels[4] = {
|
||||
"DIMM A1", "DIMM A2",
|
||||
"DIMM B1", "DIMM B2"
|
||||
};
|
||||
struct csrow_info *csrow;
|
||||
unsigned long last_cumul_size;
|
||||
u8 value;
|
||||
|
@ -423,9 +419,10 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci,
|
|||
dimm = mci->csrows[index]->channels[chan]->dimm;
|
||||
|
||||
dimm->nr_pages = nr_pages / csrow->nr_channels;
|
||||
strncpy(csrow->channels[chan]->dimm->label,
|
||||
labels[(index >> 1) + (chan * 2)],
|
||||
EDAC_MC_LABEL_LEN);
|
||||
|
||||
snprintf(csrow->channels[chan]->dimm->label, EDAC_MC_LABEL_LEN, "DIMM %c%d",
|
||||
(chan == 0) ? 'A' : 'B',
|
||||
index);
|
||||
dimm->grain = 1 << 7; /* 128Byte cache-line resolution */
|
||||
dimm->dtype = i82975x_dram_type(mch_window, index);
|
||||
dimm->mtype = MEM_DDR2; /* I82975x supports only DDR2 */
|
||||
|
|
Loading…
Reference in a new issue