tools/testing/nvdimm: advertise a write cache for nfit_test
Vishal Verma
maintainerPATCH 1/1 tools/testing/nvdimm: advertise a write cache for nfit_test
Commit 546eb0317cfa "libnvdimm, pmem: Do not flush power-fail protected CPU caches" fixed the write_cache detection to correctly show the lack of a write cache based on the platform capabilities described in the ACPI NFIT. The nfit_test unit tests expected a write cache to be present, so change the nfit test namespaces to only advertise a persistence domain limited to the memory controller. This allows the kernel to show a write_cache attribute, and the test behaviour remains unchanged.
--- tools/testing/nvdimm/test/nfit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tools/testing/nvdimm/test/nfit.c +1 -2
@@ -2007,8 +2007,7 @@ static void nfit_test0_setup(struct nfit_test *t) pcap->header.type =ACPI_NFIT_TYPE_CAPABILITIES ; pcap->header.length =sizeof (*pcap); pcap->highest_capability =1 ; - pcap->capabilities =ACPI_NFIT_CAPABILITY_CACHE_FLUSH | -ACPI_NFIT_CAPABILITY_MEM_FLUSH ; + pcap->capabilities =ACPI_NFIT_CAPABILITY_MEM_FLUSH ; offset += pcap->header.length;if (t->setup_hotplug) {
Signature · 6 lines
2.17.0 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 11 lines · Vishal Verma
Commit
546eb0317cfa"libnvdimm, pmem: Do not flush power-fail protected CPU caches" fixed thewrite_cachedetection to correctly show the lack of a write cache based on the platform capabilities described in the ACPI NFIT. Thenfit_testunit tests expected a write cache to be present, so change the nfit test namespaces to only advertise a persistence domain limited to the memory controller. This allows the kernel to show awrite_cacheattribute, and the test behaviour remains unchanged.Cc Ross Zwisler <[email protected]>Cc Dan Williams <[email protected]>Signed-off-by Vishal Verma <[email protected]>
Sure, this makes sense to me. Thanks for the fix.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm