RE: [PATCH v2 03/16] x86/mce/amd: Remove smca_banks_map
From: Zhuo, Qiuxu
Date: Mon Feb 17 2025 - 02:59:25 EST
> From: Yazen Ghannam <yazen.ghannam@xxxxxxx>
> Sent: Friday, February 14, 2025 12:46 AM
> To: x86@xxxxxxxxxx; Luck, Tony <tony.luck@xxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx; linux-edac@xxxxxxxxxxxxxxx;
> Smita.KoralahalliChannabasappa@xxxxxxx; Yazen Ghannam
> <yazen.ghannam@xxxxxxx>
> Subject: [PATCH v2 03/16] x86/mce/amd: Remove smca_banks_map
>
> The MCx_MISC0[BlkPtr] field was used on legacy systems to hold a register
> offset for the next MCx_MISC* register. In this way, an implementation-
> specific number of registers can be discovered at runtime.
>
> The MCAX/SMCA register space simplifies this by always including the
> MCx_MISC[1-4] registers. The MCx_MISC0[BlkPtr] field is used to indicate
> (true/false) whether any MCx_MISC[1-4] registers are present.
> But it does not indicate which ones nor how many. Therefore, all the registers
s/nor/or (suggested by AI 😊)
OR
s/does not indicate/indicates neither
> are accessed and their bits are checked.
>
> AMD systems generally enforce a Read-as-Zero/Writes-Ignored policy for
> unused registers. Therefore, there is no harm to read an unused register. This
> is already done in practice for most of the MCx_MISC registers.
>
> Remove the smca_banks_map variable as it is effectively redundant.
>
> Signed-off-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
Aside from the small nit above,
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>