From bf8cce63b220b6606f3ca8dccd0e01869d882f62 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 23 Jul 2020 16:29:12 +0200 Subject: [PATCH] 5.7-stable patches added patches: soc-qcom-rpmh-dirt-can-only-make-you-dirtier-not-cleaner.patch --- queue-5.7/series | 1 + ...an-only-make-you-dirtier-not-cleaner.patch | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 queue-5.7/soc-qcom-rpmh-dirt-can-only-make-you-dirtier-not-cleaner.patch diff --git a/queue-5.7/series b/queue-5.7/series index 3dbdb11c731..00e6793c394 100644 --- a/queue-5.7/series +++ b/queue-5.7/series @@ -1,3 +1,4 @@ +soc-qcom-rpmh-dirt-can-only-make-you-dirtier-not-cleaner.patch gpio-arizona-handle-pm_runtime_get_sync-failure-case.patch gpio-arizona-put-pm_runtime-in-case-of-failure.patch pinctrl-amd-fix-npins-for-uart0-in-kerncz_groups.patch diff --git a/queue-5.7/soc-qcom-rpmh-dirt-can-only-make-you-dirtier-not-cleaner.patch b/queue-5.7/soc-qcom-rpmh-dirt-can-only-make-you-dirtier-not-cleaner.patch new file mode 100644 index 00000000000..99e5d022ee8 --- /dev/null +++ b/queue-5.7/soc-qcom-rpmh-dirt-can-only-make-you-dirtier-not-cleaner.patch @@ -0,0 +1,43 @@ +From 35bb4b22f606c0cc8eedf567313adc18161b1af4 Mon Sep 17 00:00:00 2001 +From: Douglas Anderson +Date: Fri, 17 Apr 2020 14:15:47 -0700 +Subject: soc: qcom: rpmh: Dirt can only make you dirtier, not cleaner + +From: Douglas Anderson + +commit 35bb4b22f606c0cc8eedf567313adc18161b1af4 upstream. + +Adding an item into the cache should never be able to make the cache +cleaner. Use "|=" rather than "=" to update the dirty flag. + +Reviewed-by: Matthias Kaehlcke +Reviewed-by: Maulik Shah Thanks, Maulik +Reviewed-by: Bjorn Andersson +Fixes: bb7000677a1b ("soc: qcom: rpmh: Update dirty flag only when data changes") +Reported-by: Stephen Boyd +Signed-off-by: Douglas Anderson +Link: https://lore.kernel.org/r/20200417141531.1.Ia4b74158497213eabad7c3d474c50bfccb3f342e@changeid +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/soc/qcom/rpmh.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/soc/qcom/rpmh.c ++++ b/drivers/soc/qcom/rpmh.c +@@ -150,10 +150,10 @@ existing: + break; + } + +- ctrlr->dirty = (req->sleep_val != old_sleep_val || +- req->wake_val != old_wake_val) && +- req->sleep_val != UINT_MAX && +- req->wake_val != UINT_MAX; ++ ctrlr->dirty |= (req->sleep_val != old_sleep_val || ++ req->wake_val != old_wake_val) && ++ req->sleep_val != UINT_MAX && ++ req->wake_val != UINT_MAX; + + unlock: + spin_unlock_irqrestore(&ctrlr->cache_lock, flags); -- 2.47.3