diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-10-29 12:13:07 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-10-29 12:13:07 -0700 |
commit | b9b1504d3c6d6831c822cd785e095fc5fb155346 (patch) | |
tree | 3eb270e7ff9197a92df20f93ada3bbdb658bc7df /drivers/acpi/nfit/core.c | |
parent | 0a3ff78699d1817e711441715d22665475466036 (diff) |
acpi, nfit: hide unknown commands from nmemX/commands
For vendor specific commands that do not have a common kernel
translation, hide them from nmemX/commands. For example, the following
results from new enabling to probe for support of the new
NVDIMM_FAMILY_INTEL DSMs specified in v1.6 of the command specification
[1]:
# cat /sys/bus/nd/devices/nmem0/commands
smart smart_thresh flags get_size get_data set_data effect_size
effect_log vendor cmd_call unknown unknown unknown unknown unknown
unknown unknown unknown
[1]: https://pmem.io/documents/NVDIMM_DSM_Interface-V1.6.pdf
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/acpi/nfit/core.c')
-rw-r--r-- | drivers/acpi/nfit/core.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index ebe0857ac346..444832b372ec 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -1769,8 +1769,14 @@ static int acpi_nfit_register_dimms(struct acpi_nfit_desc *acpi_desc) * userspace interface. */ cmd_mask = 1UL << ND_CMD_CALL; - if (nfit_mem->family == NVDIMM_FAMILY_INTEL) - cmd_mask |= nfit_mem->dsm_mask; + if (nfit_mem->family == NVDIMM_FAMILY_INTEL) { + /* + * These commands have a 1:1 correspondence + * between DSM payload and libnvdimm ioctl + * payload format. + */ + cmd_mask |= nfit_mem->dsm_mask & NVDIMM_STANDARD_CMDMASK; + } if (nfit_mem->has_lsi) set_bit(ND_CMD_GET_CONFIG_SIZE, &cmd_mask); |