On Mon, Jul 22, 2013 at 08:19:26PM +0100, Roger Leigh wrote:
> Ben's patch does allow me to boot the system with the memory in this
> configuration on a 3.10 kernel.

Ok, I actually think we can fix it the way below. It should be
equivalent to Ben's patch in current functionality with the difference
that it is a bit simpler and keeps the special handling for K8 which I
want to have there as a future info.

In addition, it still provides for the data structures to be initialized
so some day, when memory hotplug is supported, it should work out of the
box when all of a sudden a second channel appears.

I think it should apply cleanly to 3.8 or 3.9 too as we haven't had a
whole lot of movement in that area :-)

Thanks.

---
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 8b6a0343c220..52f2da1a89a9 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2470,8 +2470,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;
--

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to