summary refs log tree commit diff
path: root/drivers/edac/amd64_edac.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-08-15 10:07:20 +0200
committerIngo Molnar <mingo@kernel.org>2013-08-15 10:07:20 +0200
commitc874b6ba5550b47b667ebf98f549478b4bc988a2 (patch)
treeca077e1dac2af78c882437c5ec757b7d8db82166 /drivers/edac/amd64_edac.c
parent397f09977ea350a20f20b415a9313cc790137742 (diff)
parent75a9551f2b3792686df25501f248d1de92d5da0f (diff)
downloadlinux-c874b6ba5550b47b667ebf98f549478b4bc988a2.tar.gz
Merge tag 'edac_for_3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp into x86/ras
Pull RAS/EDAC updates from Boris Petkov:

 "An amd64_edac fix for single channel configurations + trivial cleanups
  courtesy of Jingoo Han."

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/edac/amd64_edac.c')
-rw-r--r--drivers/edac/amd64_edac.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index d6c0c6590607..b86228cce672 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2642,8 +2642,15 @@ static int amd64_init_one_instance(struct pci_dev *F2)
 	layers[0].size = pvt->csels[0].b_cnt;
 	layers[0].is_virt_csrow = true;
 	layers[1].type = EDAC_MC_LAYER_CHANNEL;
-	layers[1].size = pvt->channel_count;
+
+	/*
+	 * Always allocate two channels since we can have setups with DIMMs on
+	 * only one channel. Also, this simplifies handling later for the price
+	 * of a couple of KBs tops.
+	 */
+	layers[1].size = 2;
 	layers[1].is_virt_csrow = false;
+
 	mci = edac_mc_alloc(nid, ARRAY_SIZE(layers), layers, 0);
 	if (!mci)
 		goto err_siblings;