Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-09 09:42:23 +0200
committerTakashi Iwai <tiwai@suse.de>2019-07-09 09:42:23 +0200
commita6cfc5a6f2254dcb70b5ea3be5f6ac3ffe65c820 (patch)
treed84b7dc54eb4b0dd137d4cae23e3064a002cc7d7
parent8c9c6736866b6ca2177b6695b0b9b3870042cffe (diff)
parent3bd9146a445820c1bcf8769cf49e4e5b041e753e (diff)
Merge branch 'users/jthumshirn/SLE15/for-next' into SLE15
Pull nfit ARS fix from Johannes Thumshirn
-rw-r--r--patches.drivers/nfit-ars-avoid-stale-ars-results.patch10
-rw-r--r--patches.fixes/nfit-ars-allow-root-to-busy-poll-the-ars-state-machine.patch66
-rw-r--r--series.conf1
3 files changed, 72 insertions, 5 deletions
diff --git a/patches.drivers/nfit-ars-avoid-stale-ars-results.patch b/patches.drivers/nfit-ars-avoid-stale-ars-results.patch
index c2f8724387..2ec2b41550 100644
--- a/patches.drivers/nfit-ars-avoid-stale-ars-results.patch
+++ b/patches.drivers/nfit-ars-avoid-stale-ars-results.patch
@@ -23,7 +23,7 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
-@@ -2662,7 +2662,10 @@ static int ars_start(struct acpi_nfit_de
+@@ -2529,7 +2529,10 @@ static int ars_start(struct acpi_nfit_de
if (rc < 0)
return rc;
@@ -35,7 +35,7 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
}
static int ars_continue(struct acpi_nfit_desc *acpi_desc)
-@@ -2755,6 +2758,17 @@ static int ars_status_process_records(st
+@@ -2623,6 +2626,17 @@ static int ars_status_process_records(st
*/
if (ars_status->out_length < 44)
return 0;
@@ -53,7 +53,7 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
for (i = 0; i < ars_status->num_records; i++) {
/* only process full records */
if (ars_status->out_length
-@@ -3239,6 +3253,7 @@ static int acpi_nfit_register_regions(st
+@@ -3108,6 +3122,7 @@ static int acpi_nfit_register_regions(st
struct nfit_spa *nfit_spa;
int rc;
@@ -63,10 +63,10 @@ Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
case NFIT_SPA_VOLATILE:
--- a/drivers/acpi/nfit/nfit.h
+++ b/drivers/acpi/nfit/nfit.h
-@@ -213,6 +213,7 @@ struct nfit_mem {
- enum scrub_flags {
+@@ -185,6 +185,7 @@ enum scrub_flags {
ARS_BUSY,
ARS_CANCEL,
+ ARS_POLL,
+ ARS_VALID,
};
diff --git a/patches.fixes/nfit-ars-allow-root-to-busy-poll-the-ars-state-machine.patch b/patches.fixes/nfit-ars-allow-root-to-busy-poll-the-ars-state-machine.patch
new file mode 100644
index 0000000000..129a02824b
--- /dev/null
+++ b/patches.fixes/nfit-ars-allow-root-to-busy-poll-the-ars-state-machine.patch
@@ -0,0 +1,66 @@
+From: Dan Williams <dan.j.williams@intel.com>
+Date: Wed, 13 Feb 2019 09:04:07 -0800
+Subject: nfit/ars: Allow root to busy-poll the ARS state machine
+Patch-mainline: v5.1-rc1
+Git-commit: 5479b2757f26fe9908fc341d105b2097fe820b6f
+References: bsc#1140814
+
+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: <stable@vger.kernel.org>
+Reported-by: Erwin Tsaur <erwin.tsaur@oracle.com>
+Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
+Signed-off-by: Dan Williams <dan.j.williams@intel.com>
+Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
+---
+ drivers/acpi/nfit/core.c | 8 ++++++++
+ drivers/acpi/nfit/nfit.h | 1 +
+ 2 files changed, 9 insertions(+)
+
+diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
+index 90312892093e..629cf91649d2 100644
+--- a/drivers/acpi/nfit/core.c
++++ b/drivers/acpi/nfit/core.c
+@@ -1333,6 +1333,13 @@ static ssize_t scrub_show(struct device *dev,
+ busy = test_bit(ARS_BUSY, &acpi_desc->scrub_flags)
+ && !test_bit(ARS_CANCEL, &acpi_desc->scrub_flags);
+ rc = sprintf(buf, "%d%s", acpi_desc->scrub_count, busy ? "+\n" : "\n");
++ /* Allow an admin to poll the busy state at a higher rate */
++ if (busy && capable(CAP_SYS_RAWIO) && !test_and_set_bit(ARS_POLL,
++ &acpi_desc->scrub_flags)) {
++ acpi_desc->scrub_tmo = 1;
++ mod_delayed_work(nfit_wq, &acpi_desc->dwork, HZ);
++ }
++
+ mutex_unlock(&acpi_desc->init_mutex);
+ device_unlock(dev);
+ return rc;
+@@ -3187,6 +3194,7 @@ static void acpi_nfit_scrub(struct work_struct *work)
+ else
+ notify_ars_done(acpi_desc);
+ memset(acpi_desc->ars_status, 0, acpi_desc->max_ars);
++ clear_bit(ARS_POLL, &acpi_desc->scrub_flags);
+ mutex_unlock(&acpi_desc->init_mutex);
+ }
+
+diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h
+index 897ce10192a0..d14bad687fb8 100644
+--- a/drivers/acpi/nfit/nfit.h
++++ b/drivers/acpi/nfit/nfit.h
+@@ -213,6 +213,7 @@ struct nfit_mem {
+ enum scrub_flags {
+ ARS_BUSY,
+ ARS_CANCEL,
++ ARS_POLL,
+ };
+
+ struct acpi_nfit_desc {
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 5da943d2dd..a3e8ad2079 100644
--- a/series.conf
+++ b/series.conf
@@ -21787,6 +21787,7 @@
patches.fixes/nfit-ars-Attempt-a-short-ARS-whenever-the-ARS-state-.patch
patches.fixes/nfit-ars-Attempt-short-ARS-even-in-the-no_init_ars-c.patch
patches.drivers/nfit-ars-introduce-scrub_flags.patch
+ patches.fixes/nfit-ars-allow-root-to-busy-poll-the-ars-state-machine.patch
patches.drivers/nfit-ars-avoid-stale-ars-results.patch
patches.fixes/0001-crypto-caam-add-missing-put_device-call.patch
patches.drivers/clk-highbank-fix-refcount-leak-in-hb_clk_init.patch