From: Josh Hunt <johunt@akamai.com>
To: Borislav Petkov <bp@amd64.org>
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 11:23:36 -0500 [thread overview]
Message-ID: <5050B708.5020308@akamai.com> (raw)
In-Reply-To: <20120912154943.GB12103@aftab.osrc.amd.com>
On 09/12/2012 10:49 AM, Borislav Petkov wrote:
>
> Yes, that's because the whole init_csrows thing has been b0rked since
> forever. In your case, amd64_csrow_nr_pages() should pay attention to
> the dct (second argument) which on K8 is always 0 (we have only one DCT
> aka Dram ConTroller on K8) and the function should return 0 if dct is 1.
> But the whole loop in init_csrows is fishy too so I'll need to rework
> that properly. Oh well...
>
Looks like we're seeing an issue on another machine. Still 0Fh family,
but the model is reported as 2, with cs_mode 7. This causes the machine
to report that it has 32GB memory instead of 4GB. For this issue it
seems like the shift logic is incorrect. Looking at the old
ddr2_dbam_revD table it doesn't really lend itself to shifting very
easily. Perhaps something like this (albeit very ugly - it matches the
old table):
/* 3 to 5 */
if ( cs_mode > 2 && cs_mode < 6 )
return 32 << (cs_mode - 1);
/* 6 to 8 */
else if ( cs_mode > 5 && cs_mode < 9 )
return 32 << (cs_mode - 3);
/* 9 and 10 */
else if ( cs_mode > 8 )
return 32 << (cs_mode - 4);
/* 0 to 3 */
else
return 32 << cs_mode;
Josh
next prev parent reply other threads:[~2012-09-12 16:23 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 ` [PATCH] amd64_edac: Memory size reported double on processor family 0Fh 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
2012-09-12 15:37 ` Josh Hunt
2012-09-12 15:49 ` Borislav Petkov
2012-09-12 16:23 ` Josh Hunt [this message]
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=5050B708.5020308@akamai.com \
--to=johunt@akamai.com \
--cc=bp@amd64.org \
--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;
as well as URLs for NNTP newsgroup(s).