Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Dipen Patel <dipenp@nvidia.com>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>
Cc: timestamp@lists.linux.dev, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org, jianhao.xu@seu.edu.cn,
	stable@vger.kernel.org
Subject: Re: [PATCH] hte: tegra194: Initialize slice locks before registering chip
Date: Mon, 31 Aug 2026 21:56:45 -0700	[thread overview]
Message-ID: <fca1cd76-c6e7-4137-bc16-a5046d2c9d9d@nvidia.com> (raw)
In-Reply-To: <20260830161747.2719220-1-runyu.xiao@seu.edu.cn>

On 8/30/26 9:17 AM, Runyu Xiao wrote:
> Registering the HTE chip publishes its request callbacks to consumers.
> Initialize every slice lock before registration so a concurrent HTE
> request cannot use an uninitialized lock.
> 
> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
> Fixes: 09574cca6ad6 ("hte: Add Tegra194 HTE kernel provider")
> Cc: stable@vger.kernel.org
> ---
>  drivers/hte/hte-tegra194.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/hte/hte-tegra194.c b/drivers/hte/hte-tegra194.c
> index 4a7702b32..1612812ab 100644
> --- a/drivers/hte/hte-tegra194.c
> +++ b/drivers/hte/hte-tegra194.c
> @@ -910,17 +910,17 @@ static int tegra_hte_probe(struct platform_device *pdev)
>  
>  	hte_dev->chip = gc;
>  
> +	for (i = 0; i < slices; i++) {
> +		hte_dev->sl[i].flags = 0;
> +		spin_lock_init(&hte_dev->sl[i].s_lock);
> +	}
> +
>  	ret = devm_hte_register_chip(hte_dev->chip);
>  	if (ret) {
>  		dev_err(gc->dev, "hte chip register failed");
>  		return ret;
>  	}
>  
> -	for (i = 0; i < slices; i++) {
> -		hte_dev->sl[i].flags = 0;
> -		spin_lock_init(&hte_dev->sl[i].s_lock);
> -	}
> -
>  	val = HTE_TECTRL_ENABLE_ENABLE |
>  	      (HTE_TECTRL_INTR_ENABLE << HTE_TECTRL_INTR_SHIFT) |
>  	      (hte_dev->itr_thrshld << HTE_TECTRL_OCCU_SHIFT);
Acked-by: Dipen Patel <dipenp@nvidia.com>

      reply	other threads:[~2026-09-01  4:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30 16:17 [PATCH] hte: tegra194: Initialize slice locks before registering chip Runyu Xiao
2026-09-01  4:56 ` Dipen Patel [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=fca1cd76-c6e7-4137-bc16-a5046d2c9d9d@nvidia.com \
    --to=dipenp@nvidia.com \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=runyu.xiao@seu.edu.cn \
    --cc=stable@vger.kernel.org \
    --cc=thierry.reding@kernel.org \
    --cc=timestamp@lists.linux.dev \
    /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