diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-27 16:38:08 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-28 18:10:58 -0400 |
commit | 084a4fccef39ac7abb039511f32380f28d0b67e6 (patch) | |
tree | 0596612000c7ec3a848b10f7cc4acdb573218076 /drivers/edac/x38_edac.c | |
parent | a7d7d2e1a07e3811dc49af2962c940fd8bbb6c8f (diff) |
edac: move dimm properties to struct dimm_info
On systems based on chip select rows, all channels need to use memories
with the same properties, otherwise the memories on channels A and B
won't be recognized.
However, such assumption is not true for all types of memory
controllers.
Controllers for FB-DIMM's don't have such requirements.
Also, modern Intel controllers seem to be capable of handling such
differences.
So, we need to get rid of storing the DIMM information into a per-csrow
data, storing it, instead at the right place.
The first step is to move grain, mtype, dtype and edac_mode to the
per-dimm struct.
Reviewed-by: Aristeu Rozanski <arozansk@redhat.com>
Reviewed-by: Borislav Petkov <borislav.petkov@amd.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Cc: Doug Thompson <norsk5@yahoo.com>
Cc: Borislav Petkov <borislav.petkov@amd.com>
Cc: Mark Gross <mark.gross@intel.com>
Cc: Jason Uhlenkott <juhlenko@akamai.com>
Cc: Tim Small <tim@buttersideup.com>
Cc: Ranganathan Desikan <ravi@jetztechnologies.com>
Cc: "Arvind R." <arvino55@gmail.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Egor Martovetsky <egor@pasemi.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Joe Perches <joe@perches.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Hitoshi Mitake <h.mitake@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: James Bottomley <James.Bottomley@parallels.com>
Cc: "Niklas Söderlund" <niklas.soderlund@ericsson.com>
Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: Mike Williams <mike@mikebwilliams.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/x38_edac.c')
-rw-r--r-- | drivers/edac/x38_edac.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c index a438297389e5..f7cc4d214949 100644 --- a/drivers/edac/x38_edac.c +++ b/drivers/edac/x38_edac.c | |||
@@ -317,7 +317,7 @@ static unsigned long drb_to_nr_pages( | |||
317 | static int x38_probe1(struct pci_dev *pdev, int dev_idx) | 317 | static int x38_probe1(struct pci_dev *pdev, int dev_idx) |
318 | { | 318 | { |
319 | int rc; | 319 | int rc; |
320 | int i; | 320 | int i, j; |
321 | struct mem_ctl_info *mci = NULL; | 321 | struct mem_ctl_info *mci = NULL; |
322 | unsigned long last_page; | 322 | unsigned long last_page; |
323 | u16 drbs[X38_CHANNELS][X38_RANKS_PER_CHANNEL]; | 323 | u16 drbs[X38_CHANNELS][X38_RANKS_PER_CHANNEL]; |
@@ -372,20 +372,21 @@ static int x38_probe1(struct pci_dev *pdev, int dev_idx) | |||
372 | i / X38_RANKS_PER_CHANNEL, | 372 | i / X38_RANKS_PER_CHANNEL, |
373 | i % X38_RANKS_PER_CHANNEL); | 373 | i % X38_RANKS_PER_CHANNEL); |
374 | 374 | ||
375 | if (nr_pages == 0) { | 375 | if (nr_pages == 0) |
376 | csrow->mtype = MEM_EMPTY; | ||
377 | continue; | 376 | continue; |
378 | } | ||
379 | 377 | ||
380 | csrow->first_page = last_page + 1; | 378 | csrow->first_page = last_page + 1; |
381 | last_page += nr_pages; | 379 | last_page += nr_pages; |
382 | csrow->last_page = last_page; | 380 | csrow->last_page = last_page; |
383 | csrow->nr_pages = nr_pages; | 381 | csrow->nr_pages = nr_pages; |
384 | 382 | ||
385 | csrow->grain = nr_pages << PAGE_SHIFT; | 383 | for (j = 0; j < x38_channel_num; j++) { |
386 | csrow->mtype = MEM_DDR2; | 384 | struct dimm_info *dimm = csrow->channels[j].dimm; |
387 | csrow->dtype = DEV_UNKNOWN; | 385 | dimm->grain = nr_pages << PAGE_SHIFT; |
388 | csrow->edac_mode = EDAC_UNKNOWN; | 386 | dimm->mtype = MEM_DDR2; |
387 | dimm->dtype = DEV_UNKNOWN; | ||
388 | dimm->edac_mode = EDAC_UNKNOWN; | ||
389 | } | ||
389 | } | 390 | } |
390 | 391 | ||
391 | x38_clear_error_info(mci); | 392 | x38_clear_error_info(mci); |