mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund@ericsson.com>
To: Borislav Petkov <bp@amd64.org>
Cc: "dougthompson@xmission.com" <dougthompson@xmission.com>,
	"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: fix size decoding error on K8
Date: Wed, 9 Nov 2011 16:13:37 +0100	[thread overview]
Message-ID: <4EBA98A1.90902@ericsson.com> (raw)
In-Reply-To: <20111109144258.GD30472@aftab>

On 11/09/2011 03:42 PM, Borislav Petkov wrote:
> On Wed, Nov 09, 2011 at 03:32:58PM +0100, Niklas Söderlund wrote:
>> Use a lookup table to calculate the size of a chip select. The old
>> method of calculating size return erroneous values for some memory
>> configurations.
>
> Can you elaborate more on those erroneous values, please?
>
> Thanks.
>

The decoding table from the documentation:

cs_mode		size (mb)
0		32
1		64
2		128
3		128
4		256
5		512
6		256
7		512
8		1024
9		1024
10		2048

The original code:

if (cs_mode == 3 || cs_mode == 8)
	return 32 << (cs_mode - 1);
else
	return 32 << cs_mode;

The code tries to compensate for the irregularity in the decoding table 
but fails for cs_mode greater or equal to 4. It fails because:

- It do not consider the cumulating effect of reoccurring sizes for all 
values of cs_mode. It only tries for the special cases and it only 
succeeds in one.

- It do not consider the out of order values of cs_mode values 4-7: 256, 
512, 256, 512.

Best Regards
// Niklas

  reply	other threads:[~2011-11-09 15:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09 14:32 Niklas Söderlund
2011-11-09 14:42 ` Borislav Petkov
2011-11-09 15:13   ` Niklas Söderlund [this message]
2011-11-09 20:35     ` Borislav Petkov
2011-11-09 20:50       ` Tony Luck
2011-11-09 21:00         ` Borislav Petkov
2011-11-14 16:54           ` [PATCH] amd64_edac: Fix K8 revD and later chip select sizes Borislav Petkov
2011-11-15  8:10             ` Niklas Söderlund
2011-11-09 20:51       ` [PATCH] amd64_edac: fix size decoding error on K8 Nils Carlson

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=4EBA98A1.90902@ericsson.com \
    --to=niklas.soderlund@ericsson.com \
    --cc=bp@amd64.org \
    --cc=dougthompson@xmission.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