mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@amd64.org>
To: Josh Hunt <johunt@akamai.com>
Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] amd64_edac: Memory size reported double on processor family 0Fh
Date: Wed, 12 Sep 2012 17:30:16 +0200	[thread overview]
Message-ID: <20120912153016.GA12103@aftab.osrc.amd.com> (raw)
In-Reply-To: <5050857F.5060207@akamai.com>

On Wed, Sep 12, 2012 at 07:52:15AM -0500, Josh Hunt wrote:
> I wanted to add that we started seeing this back in 3.0. I didn't go
> back any farther, but know it was not occurring in 2.6.38. The issue
> in 3.0 appeared to be that we shift left k8_dbam_to_chip_select()
> and there was also another shift in amd64_csrow_nr_pages(). It looks
> like that second shift has been replaced by a more recent patch,
> which actually checks to see if the csrow is enabled and then counts
> nr_pages again adding that to the first calculation, still resulting
> in the size being double.

Yes, you're basically right. Here's what I see from here:

In 2009 I added

commit 603adaf6b3e37450235f0ddb5986b961b3146a79
Author: Borislav Petkov <borislav.petkov@amd.com>
Date:   Mon Dec 21 14:52:53 2009 +0100

    amd64_edac: fix K8 chip select reporting

    Fix the case when amd64_debug_display_dimm_sizes() reports only half the
    amount of DRAM on it because it doesn't account for when the single DCT
    operates in 128-bit mode and merges chip selects from different DIMMs.

which was supposed to fix a bug-report of DRAM chip selects being halved
in reporting.

But,

commit 41d8bfaba70311c2fa0666554ef160ea8ffc9daf
Author: Borislav Petkov <borislav.petkov@amd.com>
Date:   Tue Jan 18 19:16:08 2011 +0100

    amd64_edac: Improve DRAM address mapping
    
    Drop static tables which map the bits in F2x80 to a chip select size in
    favor of functions doing the mapping with some bit fiddling. Also, add
    F15 support.


two years later reworked the whole DBAM to chip select sizes mapping for
all families. But it left in the clumsy workaround above for K8 only,
thus the double shifting.

So, long story short, reverting 603adaf6b3e37450235f0ddb5986b961b3146a79
should probably fix the issue since it is not needed anymore.

Let me run it here to make sure I'm not missing anything else.

Thanks.

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551

  reply	other threads:[~2012-09-12 15:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1347403947-20187-1-git-send-email-johunt@akamai.com>
2012-09-11 23:02 ` Josh Hunt
2012-09-12  8:51   ` Borislav Petkov
2012-09-12 12:38     ` Josh Hunt
2012-09-12 12:52       ` Josh Hunt
2012-09-12 15:30         ` Borislav Petkov [this message]
2012-09-12 15:37           ` Josh Hunt
2012-09-12 15:49             ` Borislav Petkov
2012-09-12 16:23               ` Josh Hunt
2012-09-12 16:48                 ` Borislav Petkov
2012-09-12 16:58                   ` Josh Hunt
2012-09-12 17:06                     ` Borislav Petkov
2012-09-12 17:23                       ` Borislav Petkov
2012-09-14 12:55                         ` Josh Hunt
2012-09-14 14:39                           ` Josh Hunt
2012-09-14 15:40                             ` Borislav Petkov
2012-09-21 12:36                             ` Borislav Petkov
2012-09-21 13:02                               ` Josh Hunt
2012-09-21 14:01                                 ` Borislav Petkov
2012-09-21 14:54                                   ` Josh Hunt
2012-09-21 15:10                                     ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120912153016.GA12103@aftab.osrc.amd.com \
    --to=bp@amd64.org \
    --cc=johunt@akamai.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome