Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359967
b: refs/heads/master
c: 61734e1
h: refs/heads/master
i:
  359965: 539a8b2
  359963: cf66832
  359959: 3cc0de1
  359951: 8e281fa
  359935: 6ffb6bd
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Feb 21, 2013
1 parent 6465bec commit 5ff8a76
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 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: 5f466cb0257998549058c16e9d44bb74804a273d
refs/heads/master: 61734e1835867e6e38438c8365149748641e3525
21 changes: 12 additions & 9 deletions trunk/drivers/edac/i3200_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ static unsigned long drb_to_nr_pages(
int n;

n = drbs[channel][rank];
if (!n)
return 0;

if (rank > 0)
n -= drbs[channel][rank - 1];
if (stacked && (channel == 1) &&
Expand Down Expand Up @@ -389,19 +392,19 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
* cumulative; the last one will contain the total memory
* contained in all ranks.
*/
for (i = 0; i < mci->nr_csrows; i++) {
for (i = 0; i < I3200_DIMMS; i++) {
unsigned long nr_pages;
struct csrow_info *csrow = mci->csrows[i];

nr_pages = drb_to_nr_pages(drbs, stacked,
i / I3200_RANKS_PER_CHANNEL,
i % I3200_RANKS_PER_CHANNEL);
for (j = 0; j < nr_channels; j++) {
struct dimm_info *dimm = EDAC_DIMM_PTR(mci->layers, mci->dimms,
mci->n_layers, i, j, 0);

if (nr_pages == 0)
continue;
nr_pages = drb_to_nr_pages(drbs, stacked, j, i);
if (nr_pages == 0)
continue;

for (j = 0; j < nr_channels; j++) {
struct dimm_info *dimm = csrow->channels[j]->dimm;
edac_dbg(0, "csrow %d, channel %d%s, size = %ld Mb\n", i, j,
stacked ? " (stacked)" : "", PAGES_TO_MiB(nr_pages));

dimm->nr_pages = nr_pages;
dimm->grain = nr_pages << PAGE_SHIFT;
Expand Down

0 comments on commit 5ff8a76

Please sign in to comment.