<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/uapi/linux/ndctl.h, branch v4.19.259</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.259</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.259'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-05-27T15:37:39Z</updated>
<entry>
<title>nfit: Add Hyper-V NVDIMM DSM command set to white list</title>
<updated>2020-05-27T15:37:39Z</updated>
<author>
<name>Dexuan Cui</name>
<email>decui@microsoft.com</email>
</author>
<published>2019-01-29T00:56:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5e66a5e2fd776bf014f06ba8ff569318c5415c71'/>
<id>urn:sha1:5e66a5e2fd776bf014f06ba8ff569318c5415c71</id>
<content type='text'>
[ Upstream commit 1194c4133195dfcb6c5fc0935d54bbed872a5285 ]

Add the Hyper-V _DSM command set to the white list of NVDIMM command
sets.

This command set is documented at http://www.uefi.org/RFIC_LIST
(see "Virtual NVDIMM 0x1901").

Signed-off-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Reviewed-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>UAPI: ndctl: Fix g++-unsupported initialisation in headers</title>
<updated>2018-11-13T19:08:32Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2018-09-06T09:19:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cd888e8a12a99e55c81c80d2c50a273b32af7107'/>
<id>urn:sha1:cd888e8a12a99e55c81c80d2c50a273b32af7107</id>
<content type='text'>
[ Upstream commit 9607871f37dc3e717639694b8d0dc738f2a68efc ]

The following code in the linux/ndctl header file:

	static inline const char *nvdimm_bus_cmd_name(unsigned cmd)
	{
		static const char * const names[] = {
			[ND_CMD_ARS_CAP] = "ars_cap",
			[ND_CMD_ARS_START] = "ars_start",
			[ND_CMD_ARS_STATUS] = "ars_status",
			[ND_CMD_CLEAR_ERROR] = "clear_error",
			[ND_CMD_CALL] = "cmd_call",
		};

		if (cmd &lt; ARRAY_SIZE(names) &amp;&amp; names[cmd])
			return names[cmd];
		return "unknown";
	}

is broken in a number of ways:

 (1) ARRAY_SIZE() is not generally defined.

 (2) g++ does not support "non-trivial" array initialisers fully yet.

 (3) Every file that calls this function will acquire a copy of names[].

The same goes for nvdimm_cmd_name().

Fix all three by converting to a switch statement where each case returns a
string.  That way if cmd is a constant, the compiler can trivially reduce it
and, if not, the compiler can use a shared lookup table if it thinks that is
more efficient.

A better way would be to remove these functions and their arrays from the
header entirely.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>libnvdimm, namespace: make min namespace size 4K</title>
<updated>2018-02-02T05:27:22Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2018-02-02T05:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f2ba5a5baecf795c2150826bd0c95fc3f7f3d226'/>
<id>urn:sha1:f2ba5a5baecf795c2150826bd0c95fc3f7f3d226</id>
<content type='text'>
The arbitrary 4MB minimum namespace size turns out to be too large for
some environments. Quoting Cheng-mean Liu:

    In the case of emulated NVDIMM devices in the VM environment, there
    are scenarios that NVDIMM device with much smaller sizes are
    desired, for example, we might use a single enumerated NVDIMM DAX
    device for representing each container layer, which in some cases
    could be just a few KBs size.

PAGE_SIZE is the minimum where we can still support DAX of at least
a single page.

Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Reported-by: Cheng-mean Liu &lt;soccerl@microsoft.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>nfit, libnvdimm: deprecate the generic SMART ioctl</title>
<updated>2017-12-04T18:19:20Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2017-11-18T00:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cdd77d3e193031cc67426cd671d8aa370f7dfee4'/>
<id>urn:sha1:cdd77d3e193031cc67426cd671d8aa370f7dfee4</id>
<content type='text'>
The kernel's ND_IOCTL_SMART_THRESHOLD command is based on a payload
definition that has become broken / out-of-sync with recent versions of
the NVDIMM_FAMILY_INTEL definition. Deprecate the use of the
ND_IOCTL_SMART_THRESHOLD command in favor of the ND_CMD_CALL approach
taken by NVDIMM_FAMILY_{HPE,MSFT}, where we can manage the per-vendor
variance in userspace.

In a couple years, when the new scheme is widely deployed in userspace
packages, the ND_IOCTL_SMART_THRESHOLD support can be removed. For now
we prevent new binaries from compiling against the kernel header
definitions, but kernel still compatible with old binaries. The
libndctl.h [1] header is now the authoritative interface definition for
NVDIMM SMART.

[1]: https://github.com/pmem/ndctl
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>libnvdimm: clean up command definitions</title>
<updated>2017-08-28T15:33:20Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2017-08-28T15:33:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7a14724f54bf9889fcb1a9f1d4aa4e1d2e969d93'/>
<id>urn:sha1:7a14724f54bf9889fcb1a9f1d4aa4e1d2e969d93</id>
<content type='text'>
Remove the command payloads that do not have an associated libnvdimm
ioctl. I.e. remove the payloads that would only ever be carried in the
ND_CMD_CALL envelope. This prevents userspace from growing unnecessary
dependencies on this kernel header when userspace already has everything
it needs to craft and send these commands.

Cc: Jerry Hoemann &lt;jerry.hoemann@hpe.com&gt;
Reported-by: Yasunori Goto &lt;y-goto@jp.fujitsu.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>acpi/nfit: Issue Start ARS to retrieve existing records</title>
<updated>2017-07-02T16:56:37Z</updated>
<author>
<name>Toshi Kani</name>
<email>toshi.kani@hpe.com</email>
</author>
<published>2017-06-30T02:41:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=807900395efebf9276178eb6157959f2e81fe013'/>
<id>urn:sha1:807900395efebf9276178eb6157959f2e81fe013</id>
<content type='text'>
ACPI 6.2 defines in section 9.20.7.2 that the OSPM may call a Start
ARS with Flags Bit [1] set upon receiving the 0x81 notification.

  Upon receiving the notification, the OSPM may decide to issue
  a Start ARS with Flags Bit [1] set to prepare for the retrieval
  of existing records and issue the Query ARS Status function to
  retrieve the records.

Add support to call a Start ARS from acpi_nfit_uc_error_notify()
with ND_ARS_RETURN_PREV_DATA set when HW_ERROR_SCRUB_ON is not set.

Link: http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf
Signed-off-by: Toshi Kani &lt;toshi.kani@hpe.com&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: Rafael J. Wysocki &lt;rjw@rjwysocki.net&gt;
Cc: Vishal Verma &lt;vishal.l.verma@intel.com&gt;
Cc: Linda Knippers &lt;linda.knippers@hpe.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>libnvdimm: New ACPI 6.2 DSM functions</title>
<updated>2017-07-01T15:49:59Z</updated>
<author>
<name>Jerry Hoemann</name>
<email>jerry.hoemann@hpe.com</email>
</author>
<published>2017-07-01T03:41:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=759d6a9641d7f52f9311aae4f2d90058adad3ac2'/>
<id>urn:sha1:759d6a9641d7f52f9311aae4f2d90058adad3ac2</id>
<content type='text'>
ACPI 6.2 added new NVDIMM root DSM functions.  Define their
data structures.

Signed-off-by: Jerry Hoemann &lt;jerry.hoemann@hpe.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>acpi, nfit: Enable DSM pass thru for root functions.</title>
<updated>2017-07-01T15:49:59Z</updated>
<author>
<name>Jerry Hoemann</name>
<email>jerry.hoemann@hpe.com</email>
</author>
<published>2017-07-01T03:41:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=37d74841b9d42b105cba053e70e9db0e395949da'/>
<id>urn:sha1:37d74841b9d42b105cba053e70e9db0e395949da</id>
<content type='text'>
Set ND_CMD_CALL in the cmd_mask to enable calling root
functions via the pass thru mechanism.

Signed-off-by: Jerry Hoemann &lt;jerry.hoemann@hpe.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>libnvdimm: handle locked label storage areas</title>
<updated>2017-05-04T22:41:39Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2017-05-04T18:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9d62ed96511823fa9c2ac7a819d7b4be22a9a6de'/>
<id>urn:sha1:9d62ed96511823fa9c2ac7a819d7b4be22a9a6de</id>
<content type='text'>
Per the latest version of the "NVDIMM DSM Interface Example" [1], the
label data retrieval routine can report a "locked" status. In this case
all regions associated with that DIMM are disabled until the label area
is unlocked. Provide generic libnvdimm enabling for NVDIMMs with label
data area locking capabilities.

[1]: http://pmem.io/documents/

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>libnvdimm: fix SMART Health DSM payload definition</title>
<updated>2016-08-15T18:07:21Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2016-08-12T00:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=02486c2905a7caa50b0f508a86e03d12d8d24ac4'/>
<id>urn:sha1:02486c2905a7caa50b0f508a86e03d12d8d24ac4</id>
<content type='text'>
"NVDIMM DSM Interface Example" v1.2 made an incompatible change to the
layout of function1 "SMART and Health Info".  While the kernel does not
directly consume this payload, it does define it in ndctl.h that
userpace utilities consume.

Reported-by: Brian Boylston &lt;brian.boylston@hpe.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
</feed>
