mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Vishal Badole <Vishal.Badole@amd.com>
Cc: bp@alien8.de, tony.luck@intel.com, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH Intenal 2/2] EDAC/amd64: Limit UMC csrow decode to the implemented chip selects
Date: Thu, 24 Sep 2026 10:27:32 -0400	[thread overview]
Message-ID: <20260924142732.GE1080284@yaz-khff2.amd.com> (raw)
In-Reply-To: <20260923112003.3677719-3-Vishal.Badole@amd.com>

On Wed, Sep 23, 2026 at 04:50:03PM +0530, Vishal Badole wrote:
> For DRAM ECC errors on SMCA systems, the Chip Select which reported the
> error is encoded in the MCA_SYND[ErrorInformation] field. The EDAC core
> uses that value to index into the csrow array which was sized during
> probe from pvt->csels[].b_cnt.
> 
> On Family 1Ah Model 88h a corrected DRAM error results in:
> 
>   EDAC MC0: INTERNAL ERROR: csrow value is out of range (5 >= 4)
>   WARNING: drivers/edac/edac_mc.c:919 at edac_raw_mc_handle_error
> 
> and the error is subsequently reported against "unknown memory", so the
> DIMM which actually reported the error cannot be identified.
> 
> This happens because the syndrome field is masked with a hardcoded 0x7,
> i.e. eight possible chip selects, while umc_prep_chip_selects() sizes
> every UMC channel for four. Bit 2 of that field is therefore not a valid
> Chip Select bit, and whenever hardware leaves it set the decoded value
> exceeds the number of csrows the EDAC core knows about.

This isn't an accurate description of the issue.

For this model, the hardcoded 0x7 mask is correct. The register
definition shows "MCA_SYND_UMC[2:0] = Chip Select" for this error code.

The issue is that some forms of error 'injection' populate the registers
with hardcoded values that don't necessarily reflect the hardware.

> 
> Mask with the number of chip selects the controller actually implements
> so the decoded value can never exceed what was allocated, instead of
> relying on an assumption about the field width that no longer holds.
> 

In practice, the simpler solution is to change the mask to 0x3.
Documentation for newer products show "MCA_SYND_UMC[1:0] = Chip Select".
And older products only ever had 4 chip selects as you point out.

Thanks,
Yazen

      reply	other threads:[~2026-09-24 14:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 11:20 [PATCH Intenal 0/2] EDAC/amd64: Add Family 1Ah Model 80h-8Fh support and fix csrow decode Vishal Badole
2026-09-23 11:20 ` [PATCH Intenal 1/2] EDAC/amd64: Add support for AMD family 1Ah models 80h-8Fh Vishal Badole
2026-09-24 14:11   ` Yazen Ghannam
2026-09-23 11:20 ` [PATCH Intenal 2/2] EDAC/amd64: Limit UMC csrow decode to the implemented chip selects Vishal Badole
2026-09-24 14:27   ` Yazen Ghannam [this message]

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=20260924142732.GE1080284@yaz-khff2.amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=Vishal.Badole@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /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

all inboxes | Powered by JetHome®