Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'edac_urgent_for_v6.15_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras

Pull EDAC fixes from Borislav Petkov:
"Two fixes to the AMD translation library for the MI300 side of things:

- Use the row[13] bit when calculating the memory row to retire

- Mask the physical row address in order to avoid creating duplicate
error records"

* tag 'edac_urgent_for_v6.15_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
RAS/AMD/FMPM: Get masked address
RAS/AMD/ATL: Include row[13] bit in row retirement

+28 -3
+3
drivers/ras/amd/atl/internal.h
··· 362 362 atl_debug(ctx, "Unrecognized interleave mode: %u", ctx->map.intlv_mode); 363 363 } 364 364 365 + #define MI300_UMC_MCA_COL GENMASK(5, 1) 366 + #define MI300_UMC_MCA_ROW13 BIT(23) 367 + 365 368 #endif /* __AMD_ATL_INTERNAL_H__ */
+17 -2
drivers/ras/amd/atl/umc.c
··· 229 229 * Additionally, the PC and Bank bits may be hashed. This must be accounted for before 230 230 * reconstructing the normalized address. 231 231 */ 232 - #define MI300_UMC_MCA_COL GENMASK(5, 1) 233 232 #define MI300_UMC_MCA_BANK GENMASK(9, 6) 234 233 #define MI300_UMC_MCA_ROW GENMASK(24, 10) 235 234 #define MI300_UMC_MCA_PC BIT(25) ··· 319 320 * See amd_atl::convert_dram_to_norm_addr_mi300() for MI300 address formats. 320 321 */ 321 322 #define MI300_NUM_COL BIT(HWEIGHT(MI300_UMC_MCA_COL)) 322 - static void retire_row_mi300(struct atl_err *a_err) 323 + static void _retire_row_mi300(struct atl_err *a_err) 323 324 { 324 325 unsigned long addr; 325 326 struct page *p; ··· 348 349 349 350 memory_failure(addr, 0); 350 351 } 352 + } 353 + 354 + /* 355 + * In addition to the column bits, the row[13] bit should also be included when 356 + * calculating addresses affected by a physical row. 357 + * 358 + * Instead of running through another loop over a single bit, just run through 359 + * the column bits twice and flip the row[13] bit in-between. 360 + * 361 + * See MI300_UMC_MCA_ROW for the row bits in MCA_ADDR_UMC value. 362 + */ 363 + static void retire_row_mi300(struct atl_err *a_err) 364 + { 365 + _retire_row_mi300(a_err); 366 + a_err->addr ^= MI300_UMC_MCA_ROW13; 367 + _retire_row_mi300(a_err); 351 368 } 352 369 353 370 void amd_retire_dram_row(struct atl_err *a_err)
+8 -1
drivers/ras/amd/fmpm.c
··· 250 250 return true; 251 251 } 252 252 253 + /* 254 + * Row retirement is done on MI300 systems, and some bits are 'don't 255 + * care' for comparing addresses with unique physical rows. This 256 + * includes all column bits and the row[13] bit. 257 + */ 258 + #define MASK_ADDR(addr) ((addr) & ~(MI300_UMC_MCA_ROW13 | MI300_UMC_MCA_COL)) 259 + 253 260 static bool fpds_equal(struct cper_fru_poison_desc *old, struct cper_fru_poison_desc *new) 254 261 { 255 262 /* ··· 265 258 * 266 259 * Also, order the checks from most->least likely to fail to shortcut the code. 267 260 */ 268 - if (old->addr != new->addr) 261 + if (MASK_ADDR(old->addr) != MASK_ADDR(new->addr)) 269 262 return false; 270 263 271 264 if (old->hw_id != new->hw_id)