* [PATCH] hte: tegra194: Initialize slice locks before registering chip
@ 2026-08-30 16:17 Runyu Xiao
2026-09-01 4:56 ` Dipen Patel
0 siblings, 1 reply; 2+ messages in thread
From: Runyu Xiao @ 2026-08-30 16:17 UTC (permalink / raw)
To: Dipen Patel, Thierry Reding, Jonathan Hunter
Cc: timestamp, linux-tegra, linux-kernel, runyu.xiao, jianhao.xu,
stable
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);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hte: tegra194: Initialize slice locks before registering chip
2026-08-30 16:17 [PATCH] hte: tegra194: Initialize slice locks before registering chip Runyu Xiao
@ 2026-09-01 4:56 ` Dipen Patel
0 siblings, 0 replies; 2+ messages in thread
From: Dipen Patel @ 2026-09-01 4:56 UTC (permalink / raw)
To: Runyu Xiao, Thierry Reding, Jonathan Hunter
Cc: timestamp, linux-tegra, linux-kernel, jianhao.xu, stable
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-01 4:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-30 16:17 [PATCH] hte: tegra194: Initialize slice locks before registering chip Runyu Xiao
2026-09-01 4:56 ` Dipen Patel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox