linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: Fri, 14 Sep 2012 09:39:00 -0500	[thread overview]
Message-ID: <50534184.1050208@akamai.com> (raw)
In-Reply-To: <50532940.10201@akamai.com>

On 09/14/2012 07:55 AM, Josh Hunt wrote:
>
> Thanks to your help I was able to test your branch, but it still does
> not resolve the problem. Removal of the "factor=1" workaround fixes the
> memory size reporting on boot, but the sysfs values are still incorrect.
>

Please disregard what I said earlier about the shift still being wrong. 
Looking at the dmesg more I see now that the # of pages are correctly 
reported (262144), however sysfs is still wrong.

[   25.837588] EDAC DEBUG: init_csrows: MC node: 0, csrow: 0
[   25.837589] EDAC DEBUG: amd64_csrow_nr_pages: csrow: 0, channel: 0, 
DBAM idx: 2
[   25.837591] EDAC DEBUG: amd64_csrow_nr_pages: nr_pages/channel: 262144
[   25.837592] EDAC amd64: CS0: Unbuffered DDR2 RAM
[   25.837724] EDAC DEBUG: init_csrows: Total csrow0 pages: 262144
[   25.837725] DBG: init_csrows: channel_count:2
[   25.837856] DBG: init_csrows: channel_count:2
[   25.837988] EDAC DEBUG: init_csrows: MC node: 0, csrow: 1
[   25.837989] EDAC DEBUG: amd64_csrow_nr_pages: csrow: 1, channel: 0, 
DBAM idx: 2
[   25.837991] EDAC DEBUG: amd64_csrow_nr_pages: nr_pages/channel: 262144
[   25.837992] EDAC amd64: CS1: Unbuffered DDR2 RAM
[   25.838157] EDAC DEBUG: init_csrows: Total csrow1 pages: 262144
[   25.838158] DBG: init_csrows: channel_count:2
[   25.838289] DBG: init_csrows: channel_count:2
[   25.838421] EDAC DEBUG: init_csrows: MC node: 0, csrow: 2
[   25.838422] EDAC DEBUG: amd64_csrow_nr_pages: csrow: 2, channel: 0, 
DBAM idx: 2
[   25.838424] EDAC DEBUG: amd64_csrow_nr_pages: nr_pages/channel: 262144
[   25.838425] EDAC amd64: CS2: Unbuffered DDR2 RAM
[   25.838556] EDAC DEBUG: init_csrows: Total csrow2 pages: 262144
[   25.838558] DBG: init_csrows: channel_count:2
[   25.838689] DBG: init_csrows: channel_count:2
[   25.838820] EDAC DEBUG: init_csrows: MC node: 0, csrow: 3
[   25.838822] EDAC DEBUG: amd64_csrow_nr_pages: csrow: 3, channel: 0, 
DBAM idx: 2
[   25.838823] EDAC DEBUG: amd64_csrow_nr_pages: nr_pages/channel: 262144
[   25.838824] EDAC amd64: CS3: Unbuffered DDR2 RAM
[   25.838957] EDAC DEBUG: init_csrows: Total csrow3 pages: 262144

I looked into this and see that sysfs is doing the double counting b/c 
it loops over the # of channels:

[  131.423949] DBG: csrow_size_show: i:0 nr_pages:262144 nr_channels:2
[  131.424112] DBG: csrow_size_show: i:1 nr_pages:524288 nr_channels:2

I verified this in init_csrows:
[   25.838958] DBG: init_csrows: channel_count:2

Since I don't know the details of the hardware here it's hard for me to 
suggest a fix, but it would seem that k8_early_channel_count() needs to 
be modified to only return 1 in this case?

Josh




  reply	other threads:[~2012-09-14 14:39 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
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 [this message]
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=50534184.1050208@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).