<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/acpi/nfit, branch linux-5.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-05-16T17:40:12Z</updated>
<entry>
<title>acpi/nfit: Always dump _DSM output payload</title>
<updated>2019-05-16T17:40:12Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2019-03-12T19:28:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=469cc616e03c22ed3371300dcf82df39902f8642'/>
<id>urn:sha1:469cc616e03c22ed3371300dcf82df39902f8642</id>
<content type='text'>
[ Upstream commit 351f339faa308c1c1461314a18c832239a841ca0 ]

The dynamic-debug statements for command payload output only get emitted
when the command is not ND_CMD_CALL. Move the output payload dumping
ahead of the early return path for ND_CMD_CALL.

Fixes: 31eca76ba2fc9 ("...whitelisted dimm command marshaling mechanism")
Reported-by: Vishal Verma &lt;vishal.l.verma@intel.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>nfit/ars: Avoid stale ARS results</title>
<updated>2019-04-27T07:37:43Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2019-04-22T23:08:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a96e63f8f7dcfc3aaae2414e7fec63aee6ab5db'/>
<id>urn:sha1:4a96e63f8f7dcfc3aaae2414e7fec63aee6ab5db</id>
<content type='text'>
commit 78153dd45e7e0596ba32b15d02bda08e1513111e upstream.

Gate ARS result consumption on whether the OS issued start-ARS since the
previous consumption. The BIOS may only clear its result buffers after a
successful start-ARS.

Fixes: 0caeef63e6d2 ("libnvdimm: Add a poison list and export badblocks")
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Krzysztof Rusocki &lt;krzysztof.rusocki@intel.com&gt;
Reported-by: Vishal Verma &lt;vishal.l.verma@intel.com&gt;
Reviewed-by: Toshi Kani &lt;toshi.kani@hpe.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>nfit/ars: Allow root to busy-poll the ARS state machine</title>
<updated>2019-04-27T07:37:43Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2019-04-22T23:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33dcadf02c1fa08b2e247be4b0a9e5ffd3c931df'/>
<id>urn:sha1:33dcadf02c1fa08b2e247be4b0a9e5ffd3c931df</id>
<content type='text'>
commit 5479b2757f26fe9908fc341d105b2097fe820b6f upstream.

The ARS implementation implements exponential back-off on the poll
interval to prevent high-frequency access to the DIMM / platform
interface. Depending on when the ARS completes the poll interval may
exceed the completion event by minutes. Allow root to reset the timeout
each time it probes the status. A one-second timeout is still enforced,
but root can otherwise can control the poll interval.

Fixes: bc6ba8085842 ("nfit, address-range-scrub: rework and simplify ARS...")
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Erwin Tsaur &lt;erwin.tsaur@oracle.com&gt;
Reviewed-by: Toshi Kani &lt;toshi.kani@hpe.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>nfit/ars: Introduce scrub_flags</title>
<updated>2019-04-27T07:37:43Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2019-04-22T23:08:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b49a9157c3ec867af424fde0c475eb2904492daa'/>
<id>urn:sha1:b49a9157c3ec867af424fde0c475eb2904492daa</id>
<content type='text'>
commit e34b8252a3d2893ca55c82dbfcdaa302fa03d400 upstream.

In preparation for introducing new flags to gate whether ARS results are
stale, or poll the completion state, convert the existing flags to an
unsigned long with enumerated values. This conversion allows the flags
to be atomically updated outside of -&gt;init_mutex.

Reviewed-by: Toshi Kani &lt;toshi.kani@hpe.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>nfit/ars: Remove ars_start_flags</title>
<updated>2019-04-27T07:37:43Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2019-04-22T23:08:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2cc8e8c230e8cb047e94abaa59dd722e4c900792'/>
<id>urn:sha1:2cc8e8c230e8cb047e94abaa59dd722e4c900792</id>
<content type='text'>
commit 317a992ab9266b86b774b9f6b0f87eb4f59879a1 upstream.

The ars_start_flags property of 'struct acpi_nfit_desc' is no longer
used since ARS_REQ_SHORT and ARS_REQ_LONG were added.

Reviewed-by: Toshi Kani &lt;toshi.kani@hpe.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>nfit/ars: Attempt short-ARS even in the no_init_ars case</title>
<updated>2019-03-23T19:11:14Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2019-02-13T17:01:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5fa9cb709adc46b52c25a45d919563b02c8fca6e'/>
<id>urn:sha1:5fa9cb709adc46b52c25a45d919563b02c8fca6e</id>
<content type='text'>
commit fa3ed4d981b1fc19acdd07fcb152a4bd3706892b upstream.

The no_init_ars option is meant to prevent long-ARS, but short-ARS
should be allowed to grab any immediate results.

Fixes: bc6ba8085842 ("nfit, address-range-scrub: rework and simplify ARS...")
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Erwin Tsaur &lt;erwin.tsaur@oracle.com&gt;
Reviewed-by: Toshi Kani &lt;toshi.kani@hpe.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>nfit/ars: Attempt a short-ARS whenever the ARS state is idle at boot</title>
<updated>2019-03-23T19:11:14Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2019-02-13T16:58:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b3971c932d0d10f95c8d7c9e972276c3319941de'/>
<id>urn:sha1:b3971c932d0d10f95c8d7c9e972276c3319941de</id>
<content type='text'>
commit c6c5df293bf1b488cf8459aac658aecfdccb13a9 upstream.

If query-ARS reports that ARS has stopped and requires continuation
attempt to retrieve short-ARS results before continuing the long
operation.

Fixes: bc6ba8085842 ("nfit, address-range-scrub: rework and simplify ARS...")
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Krzysztof Rusocki &lt;krzysztof.rusocki@intel.com&gt;
Reviewed-by: Toshi Kani &lt;toshi.kani@hpe.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>acpi/nfit: Fix bus command validation</title>
<updated>2019-03-23T19:11:14Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2019-02-07T22:56:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c79794474895dbbc3c52225f7e9f73cfecbb7dd'/>
<id>urn:sha1:0c79794474895dbbc3c52225f7e9f73cfecbb7dd</id>
<content type='text'>
commit ebe9f6f19d80d8978d16078dff3d5bd93ad8d102 upstream.

Commit 11189c1089da "acpi/nfit: Fix command-supported detection" broke
ND_CMD_CALL for bus-level commands. The "func = cmd" assumption is only
valid for:

    ND_CMD_ARS_CAP
    ND_CMD_ARS_START
    ND_CMD_ARS_STATUS
    ND_CMD_CLEAR_ERROR

The function number otherwise needs to be pulled from the command
payload for:

    NFIT_CMD_TRANSLATE_SPA
    NFIT_CMD_ARS_INJECT_SET
    NFIT_CMD_ARS_INJECT_CLEAR
    NFIT_CMD_ARS_INJECT_GET

Update cmd_to_func() for the bus case and call it in the common path.

Fixes: 11189c1089da ("acpi/nfit: Fix command-supported detection")
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Vishal Verma &lt;vishal.l.verma@intel.com&gt;
Reported-by: Grzegorz Burzynski &lt;grzegorz.burzynski@intel.com&gt;
Tested-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>nfit: acpi_nfit_ctl(): Check out_obj-&gt;type in the right place</title>
<updated>2019-03-23T19:11:14Z</updated>
<author>
<name>Dexuan Cui</name>
</author>
<published>2019-01-30T01:23:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2690301c9762c5c26c33fbd93002384b30be15b'/>
<id>urn:sha1:a2690301c9762c5c26c33fbd93002384b30be15b</id>
<content type='text'>
commit 43f89877f26671c6309cd87d7364b1a3e66e71cf upstream.

In the case of ND_CMD_CALL, we should also check out_obj-&gt;type.

The patch uses out_obj-&gt;type, which is a short alias to
out_obj-&gt;package.type.

Fixes: 31eca76ba2fc ("nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>nfit: Fix nfit_intel_shutdown_status() command submission</title>
<updated>2019-03-23T19:11:14Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2019-01-30T06:06:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=59a0e57f0cd3cfb5afc815247b0c8b9c9977d55d'/>
<id>urn:sha1:59a0e57f0cd3cfb5afc815247b0c8b9c9977d55d</id>
<content type='text'>
commit f596c8844fe1d0022007ae6c7a377361fb653eff upstream.

The implementation is broken in all the ways the unit test did not touch:

1/ The local definition of in_buf and in_obj violated C99 initializer
   expectations for zeroing. By only initializing 2 out of the three
   struct members the compiler was free to zero-initialize the remaining
   entry even though the aliased location in the union was initialized.

2/ The implementation made assumptions about the state of the 'smart'
   payload after command execution that are satisfied by
   acpi_nfit_ctl(), but not acpi_evaluate_dsm().

3/ populate_shutdown_status() is skipped on Intel NVDIMMs due to the early
   return for skipping the common _LS{I,R,W} enabling.

4/ The input length should be zero.

This breakage was missed due to the unit test implementation only
testing the case where nfit_intel_shutdown_status() returns a valid
payload.

Much of this complexity would be saved if acpi_nfit_ctl() could be used, but
that currently requires a 'struct nvdimm *' argument and one is not created
until later in the init process. The health result is needed before the device
is created because the payload gates whether the nmemX/nfit/dirty_shutdown
property is visible in sysfs.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 0ead11181fe0 ("acpi, nfit: Collect shutdown status")
Reported-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Reviewed-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
