On Thu, Aug 17, 2017 at 9:50 PM, Yasunori Goto
> nfit_test supports translate SPA
> To test ndctl list which use interface of Translate SPA,
> nfit_test needs to emulates it.
> This test module searches region which includes SPA and
> returns 1 dimm handle which is last one.
> Signed-off-by: Yasunori Goto <y-goto(a)jp.fujitsu.com>
> drivers/nvdimm/region_devs.c | 1 +
> tools/testing/nvdimm/test/nfit.c | 98 +++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 98 insertions(+), 1 deletion(-)
> diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
> index 5954cfb..3c8cc7f 100644
> --- a/drivers/nvdimm/region_devs.c
> +++ b/drivers/nvdimm/region_devs.c
> @@ -162,6 +162,7 @@ bool is_nd_pmem(struct device *dev)
> return dev ? dev->type == &nd_pmem_device_type : false;
Only a quick comment here because I need to run, but I'd like to find
a way to support this without exporting this internal detail. We
should be able to do this by just looking through the data that
nfit_test registered with the acpi driver at init time. I'll try to
think of a more concrete recommendation, but I do want the end
solution to keep is_nd_pmem private to the libnvdimm core if at all
Ok, I'll reconsider it.