From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Guru Das Srinagesh <linux@gurudas.dev>,
Sibi Sankar <sibi.sankar@oss.qualcomm.com>,
Elliot Berman <quic_eberman@quicinc.com>,
Andrew Halaney <ahalaney@redhat.com>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] firmware: qcom: scm: Fix tzmem state on probe retry
Date: Tue, 30 Jun 2026 12:12:08 +0200 [thread overview]
Message-ID: <569d7a0a-fbde-4e8b-a148-376e93150dbd@oss.qualcomm.com> (raw)
In-Reply-To: <20260629141750.996853-4-mukesh.ojha@oss.qualcomm.com>
On 6/29/26 4:17 PM, Mukesh Ojha wrote:
> qcom_tzmem_enable() returns -EBUSY if called a second time, but this
> causes probe retries to fail permanently if a later step in
> qcom_scm_probe() defers after qcom_tzmem_enable() has already succeeded.
>
> Use DO_ONCE() to ensure qcom_tzmem_init() runs exactly once across all
> calls in a thread-safe manner. qcom_tzmem_dev is set on every call since
> probe retries use the same device pointer. The result of the first
> initialisation is cached and returned to every subsequent caller.
>
> Fixes: 40289e35ca52 ("firmware: qcom: scm: enable the TZ mem allocator")
> Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
next prev parent reply other threads:[~2026-06-30 10:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 14:17 [PATCH v2 0/3] Misc. SCM driver fixes Mukesh Ojha
2026-06-29 14:17 ` [PATCH v2 1/3] firmware: qcom: scm: Fix NULL dereference in IRQ handler before __scm is published Mukesh Ojha
2026-06-30 9:50 ` Konrad Dybcio
2026-06-30 10:07 ` Mukesh Ojha
2026-06-29 14:17 ` [PATCH v2 2/3] firmware: qcom: scm: Fix reserved memory cleanup on probe failure Mukesh Ojha
2026-06-30 10:07 ` Konrad Dybcio
2026-07-02 10:28 ` Mukesh Ojha
2026-06-29 14:17 ` [PATCH v2 3/3] firmware: qcom: scm: Fix tzmem state on probe retry Mukesh Ojha
2026-06-30 10:12 ` Konrad Dybcio [this message]
2026-06-30 13:50 ` [PATCH v2 0/3] Misc. SCM driver fixes Bartosz Golaszewski
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=569d7a0a-fbde-4e8b-a148-376e93150dbd@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=ahalaney@redhat.com \
--cc=andersson@kernel.org \
--cc=brgl@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@gurudas.dev \
--cc=mukesh.ojha@oss.qualcomm.com \
--cc=quic_eberman@quicinc.com \
--cc=sibi.sankar@oss.qualcomm.com \
/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