Re: [PATCH] EDAC/ie31200: Give each DIMM two chip selects again

From: Luck, Tony

Date: Tue Dec 01 2026 - 12:23:09 EST


On Thu, Nov 19, 2026 at 08:33:21PM +0200, Ahmed Abdelfattah wrote:
> Since commit afdbc3655556 ("EDAC/ie31200: Make struct dimm_data
> contain decoded information"), ie31200_get_dimm_config() puts rank k
> of DIMM j at chip select j * ranks + k, where ranks is that DIMM's own
> rank count. In a channel with a dual-rank DIMM 0 and a single-rank
> DIMM 1, both DIMMs then use chip select 1: DIMM 1 overwrites the entry
> for DIMM 0's second rank, mc0/size_mb is short by that rank, and errors
> in it are reported against DIMM 1.
>
> Before that commit the stride was a fixed 2, so DIMM 0 had chip
> selects 0-1 and DIMM 1 had 2-3, and the commit did not mean to change
> that. The error path still passes the two-bit rank field of ECCERRLOG
> to edac_mc_handle_error() as the chip select. If the controller reports
> DIMM 1's first rank as 2, as the old layout assumed, those errors now
> land on an empty entry when DIMM 1 is single-rank (or when both DIMMs
> are, as DIMM 1 has moved to chip select 1). That trips
> WARN_ON_ONCE(!e->grain) in edac_raw_mc_handle_error() and the error is
> logged against "unknown memory".
>
> Go back to a fixed stride of 2.
>
> Fixes: afdbc3655556 ("EDAC/ie31200: Make struct dimm_data contain decoded information")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Ahmed Abdelfattah <me@xxxxxxxxxxxxxxxxxxxx>

Applied. Thanks.

-Tony