EDAC, skx_edac: Add address translation for non-volatile DIMMs
Borislav Petkov
maintainerPATCH v3 1/1 EDAC, skx_edac: Add address translation for non-volatile DIMMs
Quoted 40 lines · Qiuxu Zhuo
Current
skx_edacdriver doesn't support address translation for non-volatile DIMMs.The ACPI ADXL DSM method support address translation for both volatile DIMMs and non-volatile DIMMs. So switch
skx_edacto use the wrapped ACPI DSM methods, if they are supported and there are non-volatile DIMMs populated on the system.(The debugfs cleanup and test for ADXL DSM decoding will be added
in later commits).Co-developed-by Tony Luck <[email protected]>Signed-off-by Qiuxu Zhuo <[email protected]>---
Boris:
Correct the SoB chain.
Change the variable 'nvdimm_count' type from 'int' to 'unsigned int'. Cast some variables of adxl_values[] from 'u64' to 'int in'skx_adxl_decode(). Remove the memory allocation error messages.Qiuxu:
Use 'structdecoded_addr' pointer as parameter forskx_adxl_decode(). Exitskx_adxl_get()on the error of 'adxl_values' memory allocation.Pass test:
Apply the patch on top of Boris' edac-for-4.20-skx-3 branch and add the test code as below in debugfs_u64_set(): struct mce m; memset(&m, 0, sizeof(m)); m.status = MCI_STATUS_ADDRV + 0x90; m.status |= BIT_ULL(MCI_STATUS_CEC_SHIFT); m.addr = val; skx_mce_check_error(NULL, 0, &m); Decoding via ADXL DSM and via original skx_edac code worked well on Skylake-2S + BIOS with ADXL DSM support.
Quoted 3 lines
drivers/edac/Kconfig | 1 + drivers/edac/skx_edac.c | 193 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 181 insertions(+), 13 deletions(-)
Thanks. Applied and pushed here:
https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=edac-for-4.20-skx-3