Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309120
b: refs/heads/master
c: 7052135
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed May 28, 2012
1 parent a3827c8 commit 7868a29
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a8a9ac9ca24536416eea3b94a7d83f31676adc9
refs/heads/master: 705213580b82090c1f4277d7d8fbee898d53895e
27 changes: 20 additions & 7 deletions trunk/drivers/edac/i82975x_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
#define PCI_DEVICE_ID_INTEL_82975_0 0x277c
#endif /* PCI_DEVICE_ID_INTEL_82975_0 */

#define I82975X_NR_CSROWS(nr_chans) (8/(nr_chans))
#define I82975X_NR_DIMMS 8
#define I82975X_NR_CSROWS(nr_chans) (I82975X_NR_DIMMS / (nr_chans))

/* Intel 82975X register addresses - device 0 function 0 - DRAM Controller */
#define I82975X_EAP 0x58 /* Dram Error Address Pointer (32b)
Expand Down Expand Up @@ -287,7 +288,8 @@ static int i82975x_process_error_info(struct mem_ctl_info *mci,
return 1;

if ((info->errsts ^ info->errsts2) & 0x0003) {
edac_mc_handle_ce_no_info(mci, "UE overwrote CE");
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0,
-1, -1, -1, "UE overwrote CE", "", NULL);
info->errsts = info->errsts2;
}

Expand All @@ -312,10 +314,15 @@ static int i82975x_process_error_info(struct mem_ctl_info *mci,
(1 << mci->csrows[row].channels[chan].dimm->grain));

if (info->errsts & 0x0002)
edac_mc_handle_ue(mci, page, offst , row, "i82975x UE");
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci,
page, offst, 0,
row, -1, -1,
"i82975x UE", "", NULL);
else
edac_mc_handle_ce(mci, page, offst, info->derrsyn, row,
chan, "i82975x CE");
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci,
page, offst, info->derrsyn,
row, chan ? chan : 0, -1,
"i82975x CE", "", NULL);

return 1;
}
Expand Down Expand Up @@ -473,6 +480,7 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx)
{
int rc = -ENODEV;
struct mem_ctl_info *mci;
struct edac_mc_layer layers[2];
struct i82975x_pvt *pvt;
void __iomem *mch_window;
u32 mchbar;
Expand Down Expand Up @@ -541,8 +549,13 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx)
chans = dual_channel_active(mch_window) + 1;

/* assuming only one controller, index thus is 0 */
mci = edac_mc_alloc(sizeof(*pvt), I82975X_NR_CSROWS(chans),
chans, 0);
layers[0].type = EDAC_MC_LAYER_CHIP_SELECT;
layers[0].size = I82975X_NR_DIMMS;
layers[0].is_virt_csrow = true;
layers[1].type = EDAC_MC_LAYER_CHANNEL;
layers[1].size = I82975X_NR_CSROWS(chans);
layers[1].is_virt_csrow = false;
mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt));
if (!mci) {
rc = -ENOMEM;
goto fail1;
Expand Down

0 comments on commit 7868a29

Please sign in to comment.