summaryrefslogtreecommitdiffstats
path: root/drivers/soc/qcom/rpmh-rsc.c
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2020-04-13 10:04:12 -0700
committerBjorn Andersson <bjorn.andersson@linaro.org>2020-04-13 22:09:38 -0700
commitff304ea34d2e2d7ef7a13aefb4e62f456cf78e99 (patch)
tree683554bc6185eda5370a9b0c2833afafeedb0585 /drivers/soc/qcom/rpmh-rsc.c
parente40b0c1628f27986dd90f94c43464df5aa8968cf (diff)
downloadlinux-stable-ff304ea34d2e2d7ef7a13aefb4e62f456cf78e99.tar.gz
linux-stable-ff304ea34d2e2d7ef7a13aefb4e62f456cf78e99.tar.bz2
linux-stable-ff304ea34d2e2d7ef7a13aefb4e62f456cf78e99.zip
soc: qcom: rpmh-rsc: tcs_is_free() can just check tcs_in_use
tcs_is_free() had two checks in it: does the software think that the TCS is free and does the hardware think that the TCS is free. I couldn't figure out in which case the hardware could think that a TCS was in-use but software thought it was free. Apparently there is no case and the extra check can be removed. This apparently has already been done in a downstream patch. Suggested-by: Maulik Shah <mkshah@codeaurora.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Maulik Shah <mkshah@codeaurora.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Tested-by: Maulik Shah <mkshah@codeaurora.org> Link: https://lore.kernel.org/r/20200413100321.v4.7.Icf2213131ea652087f100129359052c83601f8b0@changeid Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/soc/qcom/rpmh-rsc.c')
-rw-r--r--drivers/soc/qcom/rpmh-rsc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
index 78fe9344ecd3..dc4bad01c000 100644
--- a/drivers/soc/qcom/rpmh-rsc.c
+++ b/drivers/soc/qcom/rpmh-rsc.c
@@ -177,7 +177,6 @@ static void write_tcs_reg_sync(struct rsc_drv *drv, int reg, int tcs_id,
* @tcs_id: The global ID of this TCS.
*
* Returns true if nobody has claimed this TCS (by setting tcs_in_use).
- * If the TCS looks free, checks that the hardware agrees.
*
* Context: Must be called with the drv->lock held or the tcs_lock for the TCS
* being tested. If only the tcs_lock is held then it is possible that
@@ -189,8 +188,7 @@ static void write_tcs_reg_sync(struct rsc_drv *drv, int reg, int tcs_id,
*/
static bool tcs_is_free(struct rsc_drv *drv, int tcs_id)
{
- return !test_bit(tcs_id, drv->tcs_in_use) &&
- read_tcs_reg(drv, RSC_DRV_STATUS, tcs_id);
+ return !test_bit(tcs_id, drv->tcs_in_use);
}
/**