public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Mukesh, Savaliya" <msavaliy@codeaurora.org>
To: Douglas Anderson <dianders@chromium.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, swboyd@chromium.org,
	Rajendra Nayak <rnayak@codeaurora.org>,
	Akash Asthana <akashast@codeaurora.org>,
	Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>,
	Wolfram Sang <wsa@the-dreams.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Matthias Kaehlcke <mka@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: qcom-geni-se: Don't use relaxed writes when writing commands
Date: Thu, 23 Jul 2020 14:27:20 +0530	[thread overview]
Message-ID: <c41ccd0e-e18b-02eb-79b7-2cad604b5090@codeaurora.org> (raw)
In-Reply-To: <20200722150113.1.Ia50ab5cb8a6d3a73d302e6bdc25542d48ffd27f4@changeid>


On 7/23/2020 3:31 AM, Douglas Anderson wrote:
> Writing the command is the final step in kicking off a transfer.
> Let's use writel() to ensure that any other memory accesses are done
> before the command kicks off.  It's expected that this is mostly
> relevant if we're in DMA mode but since it doesn't appear to regress
> performance in a measurable way [1] even in PIO mode and it's easier
> to reason about then let's just always use it.
>
> NOTE: this patch came about due to code inspection.  No actual
> problems were observed that this patch fixes.
>
> [1] Tested by timing "flashrom -p ec" on a Chromebook which stresses
> GENI SPI a lot.
>
> Suggested-by: Stephen Boyd <swboyd@chromium.org>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
> ---
>
>   include/linux/qcom-geni-se.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/qcom-geni-se.h b/include/linux/qcom-geni-se.h
> index dd464943f717..f50c73be1428 100644
> --- a/include/linux/qcom-geni-se.h
> +++ b/include/linux/qcom-geni-se.h
> @@ -262,7 +262,7 @@ static inline void geni_se_setup_m_cmd(struct geni_se *se, u32 cmd, u32 params)
>   	u32 m_cmd;
>   
>   	m_cmd = (cmd << M_OPCODE_SHFT) | (params & M_PARAMS_MSK);
> -	writel_relaxed(m_cmd, se->base + SE_GENI_M_CMD0);
> +	writel(m_cmd, se->base + SE_GENI_M_CMD0);
>   }
>   
>   /**
> @@ -282,7 +282,7 @@ static inline void geni_se_setup_s_cmd(struct geni_se *se, u32 cmd, u32 params)
>   	s_cmd &= ~(S_OPCODE_MSK | S_PARAMS_MSK);
>   	s_cmd |= (cmd << S_OPCODE_SHFT);
>   	s_cmd |= (params & S_PARAMS_MSK);
> -	writel_relaxed(s_cmd, se->base + SE_GENI_S_CMD0);
> +	writel(s_cmd, se->base + SE_GENI_S_CMD0);
>   }
>   
>   /**

      parent reply	other threads:[~2020-07-23  8:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22 22:01 [PATCH] soc: qcom-geni-se: Don't use relaxed writes when writing commands Douglas Anderson
2020-07-23  0:50 ` Stephen Boyd
2020-07-23  5:13 ` Akash Asthana
2020-07-23  8:57 ` Mukesh, Savaliya [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c41ccd0e-e18b-02eb-79b7-2cad604b5090@codeaurora.org \
    --to=msavaliy@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=akashast@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=rnayak@codeaurora.org \
    --cc=saiprakash.ranjan@codeaurora.org \
    --cc=swboyd@chromium.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox