Hi, I wrote v5 patch set to show broken NVDIMM for ndctl list command. If possible, please merge it.
--- Change log since v4 [1]: - Renamed to ndctl_bus_get_(region/dimm)_by_physical_address() - Check ndctl_bus_has_nfit() in ndctl_bus_get_dimm_by_physical_address() - No export ndctl_bus_nfit_translate_spa() - Move ndctl_bus to private.h - attribute packed is added again. Change log since v3 [2]: - Return dimm info when dimm is not interleaved. Translate SPA is not necessary for its case. - Since ndctl_region is needed to get # of ways of interleave, ndctl_region_get_by_physical_address() is created, and sanity check (is_valid_spa) use it. - rename libndctl-nfit.c to nfit.c - move libndctl-nfit.h from ndctl/lib to ndctl/ . - not to make libndctl-nfit.la - rename to ndctl_bus_is_nfit_cmd_supported() - add annotations. Change log since v2 [3]: - Make libndctl-nfit.h and libndctl-nfit.c and define new interfaces which use translate spa on them. - Add sanity checks for new interfaces. - Fix some names o trans_spa -> translate_spa o sub_cmd -> passthru_cmd Change log since v1 [4]: - Use ND_CMD_CALL to call translate SPA feature. - Separate patch set of ndctl from kernel patch set. - Add a interface to check what feature can call via ND_CMD_CALL by reading /device/nfit/dsm_mask - Get only one nvdimm handle and DPA via ioctl() for the time being. - Bug fix which i found fix calculation of SPA from bad block at dev_badblocks_to_json(). [1] https://www.mail-archive.com/linux-nvdimm@lists.01.org/msg05927.html [2] https://www.mail-archive.com/linux-nvdimm@lists.01.org/msg05857.html [3] https://www.mail-archive.com/linux-nvdimm@lists.01.org/msg05577.html [4] https://www.mail-archive.com/linux-nvdimm@lists.01.org/msg05287.html ---- This patch set is to show information of broken NVDIMM on ndctl. When a region has a broken block, user needs to replace the NVDIMM which includes the block. However there is no information to find which DIMM module have the block. Not only ndctl does not have such information, nvdimm driver can not find it if the region is interleaved. Fortunately, ACPI 6.2 has new specification of _DSM. It is "translate spa" which can get NVDIMM handle and DPA(Dimm Physical Address) from SPA(system Physical Addreess). It helps for ndctl command to find broken NVDIMM when the region is interleaved. This patch set includes followings. - introduce libndctl-nfit.h - some preparations to call Translate SPA via ND_CMD_CALL. - make a function to get dimm by System physical address, and other helper functions. - ndctl list command show bad DIMM. Thanks, --- Yasunori Goto _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm