Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2301286ybi; Mon, 1 Jul 2019 09:37:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDKpt1zaEw8RV2N9r4CKoXshccUT1M2wYb3xdsztQo7vvOSb9gGPiB8bNrhEPZrVD5YAkY X-Received: by 2002:a65:454c:: with SMTP id x12mr25743344pgr.354.1561999053911; Mon, 01 Jul 2019 09:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561999053; cv=none; d=google.com; s=arc-20160816; b=L2ofV2+92IQgiRT3BYyI2Hc6U4ulwfTIuen8IcNNoYKFOLsMcFbAbaKBRUzZNHbczA Ck0ZPVGsOWk2ZF0/pG5+m06Zo8zyw5yDnQV/IeC7YD1UrWeC0gVy4urMRTP+yLt6eWpP PajbqogXdxjbImFfz5YLNBlxK4Q19f2T72bWMX10iLq8YS1Q069I93m00ts2WiC6Ugwi SR94im33DnVfyrymOAu1Noo0t3VUMQvATf6veHcjOVv919YPzS1IR34EVbF1LgnQKHY8 QHMaWJ0n+P4NS2Mumvj4Xki8KuUxYLgTs6DSos1/qbZAoAHAlM8gRxRxKcU8PenMqfDd VxAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:dkim-signature:dkim-signature; bh=HOkJ0psjHllJBhzYh0NDuV9vQ2D0irr3g44yZ8pBF+M=; b=xoPCq+aYa1nbwRxKfq7mlBVZVAql00yUfK0/2lCQ2h3S70md9Srs5dM124kHbOaqbd bl3yrtnHkDLXfSp47ixm08mYOJmsTwDnNRJV4cG2L7xyZKX5AREG/RbuRICziMQ0RM/S Jds9bGBhIkCKZXbBiz0WUvwZkZNtQ/yPvkLVErXWrlKuWEiarApe+8zBnIhdsf/b01hL b4PkcyYo/S8P6/xMFTcXDeOdBKZwtwrsp3h9UBJiT9cdlQ5cNPgJa78Ez6cl6yPPqRjr Qyd+cokilNYdSAKzJmbDLRvxvfGzv9i2OQEEpmy4BagXhf5DLbOXx4sLO8bfRjHsxGMh c3Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=KvGvhaCn; dkim=pass header.i=@codeaurora.org header.s=default header.b=KvGvhaCn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si49347pjw.99.2019.07.01.09.37.17; Mon, 01 Jul 2019 09:37:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=KvGvhaCn; dkim=pass header.i=@codeaurora.org header.s=default header.b=KvGvhaCn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730094AbfGAPxw (ORCPT + 99 others); Mon, 1 Jul 2019 11:53:52 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:39546 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727589AbfGAPxw (ORCPT ); Mon, 1 Jul 2019 11:53:52 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D3D83607B9; Mon, 1 Jul 2019 15:53:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561996430; bh=ZHFRcUfkmA8gyffOLFCQIwfLpo0nfmJ6jPhQbS4fLaU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KvGvhaCnraYanqxrjT2yQxDTXekQzXoGCmt4ugzgSHdiQFodZjHAsgiG/cqL5zenC rvNhfOdFep0zCV4tR/KuZ+r8R4m56FN8dZdPXgNj9yVMpz/4Ess2WOP+HY/mvb1f/D U3K78oJldlovACDp03FrHsCl6FrIPdb4bzuoSTcM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: ilina@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0D3C9602F8; Mon, 1 Jul 2019 15:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561996430; bh=ZHFRcUfkmA8gyffOLFCQIwfLpo0nfmJ6jPhQbS4fLaU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KvGvhaCnraYanqxrjT2yQxDTXekQzXoGCmt4ugzgSHdiQFodZjHAsgiG/cqL5zenC rvNhfOdFep0zCV4tR/KuZ+r8R4m56FN8dZdPXgNj9yVMpz/4Ess2WOP+HY/mvb1f/D U3K78oJldlovACDp03FrHsCl6FrIPdb4bzuoSTcM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0D3C9602F8 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ilina@codeaurora.org Date: Mon, 1 Jul 2019 09:53:49 -0600 From: Lina Iyer To: agross@kernel.org, bjorn.andersson@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, rnayak@codeaurora.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, swboyd@chromium.org, dianders@chromium.org, mkshah@codeaurora.org Subject: Re: [PATCH 2/2] drivers: qcom: rpmh-rsc: fix read back of trigger register Message-ID: <20190701155349.GD24030@codeaurora.org> References: <20190701152907.16407-1-ilina@codeaurora.org> <20190701152907.16407-2-ilina@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190701152907.16407-2-ilina@codeaurora.org> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switching Andy's email address. On Mon, Jul 01 2019 at 09:32 -0600, Lina Iyer wrote: >When triggering a TCS to send its contents, reading back the trigger >value may return an incorrect value. That is because, writing the >trigger may raise an interrupt which could be handled immediately and >the trigger value could be reset in the interrupt handler. By doing a >read back we may end up spinning waiting for the value we wrote. > >Fixes: 658628 ("drivers: qcom: rpmh-rsc: add RPMH controller for QCOM >SoCs") >Signed-off-by: Lina Iyer >--- > drivers/soc/qcom/rpmh-rsc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c >index 92461311aef3..2fc2fa879480 100644 >--- a/drivers/soc/qcom/rpmh-rsc.c >+++ b/drivers/soc/qcom/rpmh-rsc.c >@@ -300,7 +300,7 @@ static void __tcs_trigger(struct rsc_drv *drv, int tcs_id) > enable = TCS_AMC_MODE_ENABLE; > write_tcs_reg_sync(drv, RSC_DRV_CONTROL, tcs_id, enable); > enable |= TCS_AMC_MODE_TRIGGER; >- write_tcs_reg_sync(drv, RSC_DRV_CONTROL, tcs_id, enable); >+ write_tcs_reg(drv, RSC_DRV_CONTROL, tcs_id, enable); > } > > static int check_for_req_inflight(struct rsc_drv *drv, struct tcs_group *tcs, >-- >The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, >a Linux Foundation Collaborative Project >