aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/ppc4xx_edac.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-01-27 19:20:32 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-28 18:10:58 -0400
commit5e2af0c09e60d11dd8297e259a9ca2b3d92d2cf4 (patch)
treed4c7b687508ea48ab0fb844cbe61e7521ed17f01 /drivers/edac/ppc4xx_edac.c
parent084a4fccef39ac7abb039511f32380f28d0b67e6 (diff)
edac: Don't initialize csrow's first_page & friends when not needed
Almost all edac drivers initialize csrow_info->first_page, csrow_info->last_page and csrow_info->page_mask. Those vars are used inside the EDAC core, in order to calculate the csrow affected by an error, by using the routine edac_mc_find_csrow_by_page(). However, very few drivers actually use it: e752x_edac.c e7xxx_edac.c i3000_edac.c i82443bxgx_edac.c i82860_edac.c i82875p_edac.c i82975x_edac.c r82600_edac.c There also a few other drivers that have their own calculus formula internally using those vars. All the others are just wasting time by initializing those data. While initializing data without using them won't cause any troubles, as those information is stored at the wrong place (at csrows structure), it is better to remove what is unused, in order to simplify the next patch. Reviewed-by: Aristeu Rozanski <arozansk@redhat.com> Acked-by: Borislav Petkov <borislav.petkov@amd.com> Acked-by: Chris Metcalf <cmetcalf@tilera.com> Cc: Doug Thompson <norsk5@yahoo.com> Cc: Hitoshi Mitake <h.mitake@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: "Niklas Söderlund" <niklas.soderlund@ericsson.com> Cc: Josh Boyer <jwboyer@gmail.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/ppc4xx_edac.c')
-rw-r--r--drivers/edac/ppc4xx_edac.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
index a75e56788b29..ec5e529e33f6 100644
--- a/drivers/edac/ppc4xx_edac.c
+++ b/drivers/edac/ppc4xx_edac.c
@@ -897,7 +897,6 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
897 enum edac_type edac_mode; 897 enum edac_type edac_mode;
898 int row, j; 898 int row, j;
899 u32 mbxcf, size; 899 u32 mbxcf, size;
900 static u32 ppc4xx_last_page;
901 900
902 /* Establish the memory type and width */ 901 /* Establish the memory type and width */
903 902
@@ -959,10 +958,6 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
959 goto done; 958 goto done;
960 } 959 }
961 960
962 csi->first_page = ppc4xx_last_page;
963 csi->last_page = csi->first_page + csi->nr_pages - 1;
964 csi->page_mask = 0;
965
966 /* 961 /*
967 * It's unclear exactly what grain should be set to 962 * It's unclear exactly what grain should be set to
968 * here. The SDRAM_ECCES register allows resolution of 963 * here. The SDRAM_ECCES register allows resolution of
@@ -984,8 +979,6 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
984 dimm->dtype = dtype; 979 dimm->dtype = dtype;
985 980
986 dimm->edac_mode = edac_mode; 981 dimm->edac_mode = edac_mode;
987
988 ppc4xx_last_page += csi->nr_pages;
989 } 982 }
990 } 983 }
991 984