Commit c66b5a79a9348ccd6d1cd81416027d0e12da965d

Authored by Mauro Carvalho Chehab
1 parent 4ab19b06ac

edac: add a new memory layer type

There are some cases where the memory controller layout is
completely hidden. This is the case of firmware-driven error
code, like the one provided by GHES. Add a new layer to be
used on such memory error report mechanisms.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Showing 2 changed files with 5 additions and 0 deletions Side-by-side Diff

drivers/edac/edac_mc.c
... ... @@ -900,6 +900,7 @@
900 900 [EDAC_MC_LAYER_CHANNEL] = "channel",
901 901 [EDAC_MC_LAYER_SLOT] = "slot",
902 902 [EDAC_MC_LAYER_CHIP_SELECT] = "csrow",
  903 + [EDAC_MC_LAYER_ALL_MEM] = "memory",
903 904 };
904 905 EXPORT_SYMBOL_GPL(edac_layer_name);
905 906  
include/linux/edac.h
... ... @@ -375,6 +375,9 @@
375 375 * @EDAC_MC_LAYER_CHANNEL: memory layer is named "channel"
376 376 * @EDAC_MC_LAYER_SLOT: memory layer is named "slot"
377 377 * @EDAC_MC_LAYER_CHIP_SELECT: memory layer is named "chip select"
  378 + * @EDAC_MC_LAYER_ALL_MEM: memory layout is unknown. All memory is mapped
  379 + * as a single memory area. This is used when
  380 + * retrieving errors from a firmware driven driver.
378 381 *
379 382 * This enum is used by the drivers to tell edac_mc_sysfs what name should
380 383 * be used when describing a memory stick location.
... ... @@ -384,6 +387,7 @@
384 387 EDAC_MC_LAYER_CHANNEL,
385 388 EDAC_MC_LAYER_SLOT,
386 389 EDAC_MC_LAYER_CHIP_SELECT,
  390 + EDAC_MC_LAYER_ALL_MEM,
387 391 };
388 392  
389 393 /**