summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/nfit/nfit.h
diff options
context:
space:
mode:
authorDan Williams2016-12-05 22:43:25 +0100
committerDan Williams2016-12-07 02:42:36 +0100
commita7de92dac9f0dbf01deb56fe1d661d7baac097e1 (patch)
treeb1cc2c95f2094ea4ab5b508d49fbbd65fabd5048 /drivers/acpi/nfit/nfit.h
parentacpi, nfit: fix bus vs dimm confusion in xlat_status (diff)
downloadkernel-qcow2-linux-a7de92dac9f0dbf01deb56fe1d661d7baac097e1.tar.gz
kernel-qcow2-linux-a7de92dac9f0dbf01deb56fe1d661d7baac097e1.tar.xz
kernel-qcow2-linux-a7de92dac9f0dbf01deb56fe1d661d7baac097e1.zip
tools/testing/nvdimm: unit test acpi_nfit_ctl()
A recent flurry of bug discoveries in the nfit driver's DSM marshalling routine has highlighted the fact that we do not have unit test coverage for this routine. Add a self-test of acpi_nfit_ctl() routine before probing the "nfit_test.0" device. This mocks stimulus to acpi_nfit_ctl() and if any of the tests fail "nfit_test.0" will be unavailable causing the rest of the tests to not run / fail. This unit test will also be a place to land reproductions of quirky BIOS behavior discovered in the field and ensure the kernel does not regress against implementations it has seen in practice. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/acpi/nfit/nfit.h')
-rw-r--r--drivers/acpi/nfit/nfit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h
index 14296f5267c8..fc29c2e9832e 100644
--- a/drivers/acpi/nfit/nfit.h
+++ b/drivers/acpi/nfit/nfit.h
@@ -240,5 +240,7 @@ const u8 *to_nfit_uuid(enum nfit_uuids id);
int acpi_nfit_init(struct acpi_nfit_desc *acpi_desc, void *nfit, acpi_size sz);
void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event);
void __acpi_nvdimm_notify(struct device *dev, u32 event);
+int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
+ unsigned int cmd, void *buf, unsigned int buf_len, int *cmd_rc);
void acpi_nfit_desc_init(struct acpi_nfit_desc *acpi_desc, struct device *dev);
#endif /* __NFIT_H__ */