Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Avadhut Naik <avadhut.naik@amd.com>
Cc: stable@vger.kernel.org, "Žilvinas Žaltiena" <zilvinas@natrix.lt>,
	"Borislav Petkov" <bp@alien8.de>,
	"Yazen Ghannam" <yazen.ghannam@amd.com>
Subject: Re: [PATCH 6.1.y] EDAC/amd64: Fix size calculation for Non-Power-of-Two DIMMs
Date: Wed, 2 Jul 2025 16:31:21 +0200	[thread overview]
Message-ID: <2025070258-panic-unaligned-0dee@gregkh> (raw)
In-Reply-To: <20250701171032.2470518-1-avadhut.naik@amd.com>

On Tue, Jul 01, 2025 at 05:10:32PM +0000, Avadhut Naik wrote:
> Each Chip-Select (CS) of a Unified Memory Controller (UMC) on AMD Zen-based
> SOCs has an Address Mask and a Secondary Address Mask register associated with
> it. The amd64_edac module logs DIMM sizes on a per-UMC per-CS granularity
> during init using these two registers.
> 
> Currently, the module primarily considers only the Address Mask register for
> computing DIMM sizes. The Secondary Address Mask register is only considered
> for odd CS. Additionally, if it has been considered, the Address Mask register
> is ignored altogether for that CS. For power-of-two DIMMs i.e. DIMMs whose
> total capacity is a power of two (32GB, 64GB, etc), this is not an issue
> since only the Address Mask register is used.
> 
> For non-power-of-two DIMMs i.e., DIMMs whose total capacity is not a power of
> two (48GB, 96GB, etc), however, the Secondary Address Mask register is used
> in conjunction with the Address Mask register. However, since the module only
> considers either of the two registers for a CS, the size computed by the
> module is incorrect. The Secondary Address Mask register is not considered for
> even CS, and the Address Mask register is not considered for odd CS.
> 
> Introduce a new helper function so that both Address Mask and Secondary
> Address Mask registers are considered, when valid, for computing DIMM sizes.
> Furthermore, also rename some variables for greater clarity.
> 
> Fixes: 81f5090db843 ("EDAC/amd64: Support asymmetric dual-rank DIMMs")
> Closes: https://lore.kernel.org/dbec22b6-00f2-498b-b70d-ab6f8a5ec87e@natrix.lt
> Reported-by: Žilvinas Žaltiena <zilvinas@natrix.lt>
> Signed-off-by: Avadhut Naik <avadhut.naik@amd.com>
> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
> Tested-by: Žilvinas Žaltiena <zilvinas@natrix.lt>
> Cc: stable@vger.kernel.org
> Link: https://lore.kernel.org/20250529205013.403450-1-avadhut.naik@amd.com
> (cherry picked from commit a3f3040657417aeadb9622c629d4a0c2693a0f93)
> Signed-off-by: Avadhut Naik <avadhut.naik@amd.com>

This was not a clean cherry-pick at all.  Please document what you did
differently from the original commit please.

thanks,

greg k-h

  parent reply	other threads:[~2025-07-02 14:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-30  9:16 FAILED: patch "[PATCH] EDAC/amd64: Fix size calculation for Non-Power-of-Two DIMMs" failed to apply to 6.1-stable tree gregkh
2025-07-01 17:10 ` [PATCH 6.1.y] EDAC/amd64: Fix size calculation for Non-Power-of-Two DIMMs Avadhut Naik
2025-07-02  3:02   ` Sasha Levin
2025-07-02 14:31   ` Greg KH [this message]
2025-07-02 17:19     ` Naik, Avadhut
2025-07-03  5:28       ` Greg KH
2025-07-07  7:00         ` Naik, Avadhut
2025-07-07  7:44           ` Greg KH
2025-07-07 17:57             ` Naik, Avadhut
2025-07-07 18:59               ` 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=2025070258-panic-unaligned-0dee@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=avadhut.naik@amd.com \
    --cc=bp@alien8.de \
    --cc=stable@vger.kernel.org \
    --cc=yazen.ghannam@amd.com \
    --cc=zilvinas@natrix.lt \
    /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