Commit 35bb4b22 authored by Douglas Anderson's avatar Douglas Anderson Committed by Bjorn Andersson

soc: qcom: rpmh: Dirt can only make you dirtier, not cleaner

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: default avatarMatthias Kaehlcke <mka@chromium.org>
Reviewed-by: Maulik Shah <mkshah@codeaurora.org> Thanks, Maulik
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Fixes: bb700067 ("soc: qcom: rpmh: Update dirty flag only when data changes")
Reported-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200417141531.1.Ia4b74158497213eabad7c3d474c50bfccb3f342e@changeidSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 64016bb8
...@@ -151,10 +151,10 @@ static struct cache_req *cache_rpm_request(struct rpmh_ctrlr *ctrlr, ...@@ -151,10 +151,10 @@ static struct cache_req *cache_rpm_request(struct rpmh_ctrlr *ctrlr,
break; break;
} }
ctrlr->dirty = (req->sleep_val != old_sleep_val || ctrlr->dirty |= (req->sleep_val != old_sleep_val ||
req->wake_val != old_wake_val) && req->wake_val != old_wake_val) &&
req->sleep_val != UINT_MAX && req->sleep_val != UINT_MAX &&
req->wake_val != UINT_MAX; req->wake_val != UINT_MAX;
unlock: unlock:
spin_unlock_irqrestore(&ctrlr->cache_lock, flags); spin_unlock_irqrestore(&ctrlr->cache_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment