On Mon, Oct 30, 2017 at 10:37 AM, Dave Jiang <dave.jiang(a)intel.com> wrote:
On 10/29/2017 12:49 PM, Dan Williams wrote:
> Per v1.6 of the NVDIMM_FAMILY_INTEL command set [1] some of the new
> commands require rev-id 2. In addition to enabling ND_CMD_CALL for these
> new function numbers, add a lookup table for revision-ids by family
> and function number.
>
> [1]:
http://pmem.io/documents/NVDIMM_DSM_Interface-V1.6.pdf
>
> Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
> ---
> drivers/acpi/nfit/core.c | 45 ++++++++++++++++++++++++++++++++++++++++-----
> drivers/acpi/nfit/nfit.h | 19 ++++++++++++++++++-
> 2 files changed, 58 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index e0059949700d..bef305080de3 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
[..]
> @@ -1650,7 +1683,7 @@ static int acpi_nfit_add_dimm(struct
acpi_nfit_desc *acpi_desc,
> if (override_dsm_mask && !disable_vendor_specific)
> dsm_mask = override_dsm_mask;
> else if (nfit_mem->family == NVDIMM_FAMILY_INTEL) {
> - dsm_mask = 0x3fe;
> + dsm_mask = 0x7fbfe;
Can this be changed to a define of ND_CMD bits or together instead of
magic number?
Sure, especially since we have defines for all those numbers now... I
wouldn't want to do this for the other vendor command sets
unless/until it was clear that the kernel needed them for other
reasons, like rev-id determination.