From: Jerry Hoemann <jerry.hoemann@hpe.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-acpi@vger.kernel.org, rafael.j.wysocki@intel.com,
linux-nvdimm@lists.01.org
Subject: Re: [PATCH v11 5/5] nfit: add sysfs dimm 'family' and 'dsm_mask' attributes
Date: Thu, 5 May 2016 10:25:55 -0600 [thread overview]
Message-ID: <20160505162555.GC6808@tevye.fc.hp.com> (raw)
In-Reply-To: <146189776923.29835.5521802180709532725.stgit@dwillia2-desk3.amr.corp.intel.com>
On Thu, Apr 28, 2016 at 07:42:49PM -0700, Dan Williams wrote:
> Communicate the command format and suppported functions to userspace
^^^^ typo
> tooling.
>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
> drivers/acpi/nfit.c | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
> index 30801fe3367b..24549ba217b5 100644
> --- a/drivers/acpi/nfit.c
> +++ b/drivers/acpi/nfit.c
> @@ -897,6 +897,30 @@ static ssize_t serial_show(struct device *dev,
> }
> static DEVICE_ATTR_RO(serial);
>
> +static ssize_t family_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + struct nvdimm *nvdimm = to_nvdimm(dev);
> + struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
> +
> + if (nfit_mem->family < 0)
> + return -ENXIO;
> + return sprintf(buf, "%d\n", nfit_mem->family);
> +}
> +static DEVICE_ATTR_RO(family);
> +
> +static ssize_t dsm_mask_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + struct nvdimm *nvdimm = to_nvdimm(dev);
> + struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
> +
> + if (nfit_mem->family < 0)
> + return -ENXIO;
> + return sprintf(buf, "%#lx\n", nfit_mem->dsm_mask);
> +}
> +static DEVICE_ATTR_RO(dsm_mask);
> +
> static ssize_t flags_show(struct device *dev,
> struct device_attribute *attr, char *buf)
> {
> @@ -920,6 +944,8 @@ static struct attribute *acpi_nfit_dimm_attributes[] = {
> &dev_attr_serial.attr,
> &dev_attr_rev_id.attr,
> &dev_attr_flags.attr,
> + &dev_attr_family.attr,
> + &dev_attr_dsm_mask.attr,
> NULL,
> };
>
>
> _______________________________________________
> Linux-nvdimm mailing list
> Linux-nvdimm@lists.01.org
> https://lists.01.org/mailman/listinfo/linux-nvdimm
--
-----------------------------------------------------------------------------
Jerry Hoemann Software Engineer Hewlett Packard Enterprise
-----------------------------------------------------------------------------
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
prev parent reply other threads:[~2016-05-05 16:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 2:42 [PATCH v11 0/5] libnvidmm, nfit: dimm command marshaling Dan Williams
2016-04-29 2:42 ` [PATCH v11 1/5] nfit, libnvdimm: clarify "commands" vs "_DSMs" Dan Williams
2016-05-05 16:24 ` Jerry Hoemann
2016-05-05 23:38 ` Dan Williams
2016-04-29 2:42 ` [PATCH v11 2/5] nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism Dan Williams
2016-05-05 18:01 ` Jerry Hoemann
2016-05-05 23:44 ` Dan Williams
2016-05-06 14:52 ` Linda Knippers
2016-04-29 2:42 ` [PATCH v11 3/5] nfit: disable vendor specific commands Dan Williams
2016-04-29 2:42 ` [PATCH v11 4/5] tools/testing/nvdimm: ND_CMD_CALL support Dan Williams
2016-04-29 2:42 ` [PATCH v11 5/5] nfit: add sysfs dimm 'family' and 'dsm_mask' attributes Dan Williams
2016-05-05 16:25 ` Jerry Hoemann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160505162555.GC6808@tevye.fc.hp.com \
--to=jerry.hoemann@hpe.com \
--cc=dan.j.williams@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=rafael.j.wysocki@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox