From: Unnathi Chalicheemala <unnathi.chalicheemala@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@oss.qualcomm.com,
Prasad Sodagudi <prasad.sodagudi@oss.qualcomm.com>,
Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com>,
Trilok Soni <quic_tsoni@quicinc.com>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Unnathi Chalicheemala <unnathi.chalicheemala@oss.qualcomm.com>
Subject: [PATCH v6 0/3] SCM: Support latest version of waitq-aware firmware
Date: Fri, 25 Apr 2025 16:48:00 -0700 [thread overview]
Message-ID: <20250425-multi_waitq_scm-v6-0-cba8ca5a6d03@oss.qualcomm.com> (raw)
This series adds support for the latest improvements made in SCM
firmware that allow for multiple wait-queues in firmware.
To support multi VM synchronization when VMs make SMC calls on same CPU,
waitqueue mechanism is added in firmware which runs at EL2 & EL3 exception
levels.
P.S. While at Qualcomm, Guru Das Srinagesh authored the initial version of
these patches.
Thanks Guru!
---
Changes in v6:
- Added R-b tag from Bartosz for first patch.
- Check if QCOM_SCM_WAITQ_GET_INFO is available before making scm call,
instead of assuming failing scm call to mean WAITQ_GET_INFO is not
supported on target.
- Add a new patch to check for waitq idle state in wait_for_wq_completion().
- Link to v5: https://lore.kernel.org/all/20250227-multi_waitq_scm-v5-0-16984ea97edf@oss.qualcomm.com/
Changes in v5:
- Use GIC_SPI and GIC_ESPI macros from dt-bindings instead of redefining
- Modified qcom_scm_query_waitq_count to take struct qcom_scm as
argument; scm is anyway stored to global struct __scm after
smp_store_and_release().
- Tested on SM8650 which has multi-waitq support and SM8550, which
doesn't. No error logs are seen.
-Link to v4: https://lore.kernel.org/all/cover.1730742637.git.quic_uchalich@quicinc.com/
Changes in v4:
- Moving back to redefining GIC_IRQ_TYPE_SPI and GIC_IRQ_TYPE_ESPI macros
in qcom_scm as seeing compilation issues in linux/irq.h when including
arm-gic header. Will send a fixes patch and move to dt-bindings in next patchset.
- Fixed a few compilation errors.
- Link to v3: https://lore.kernel.org/all/cover.1730735881.git.quic_uchalich@quicinc.com/
Changes in v3:
- Use GIC_SPI and GIC_ESPI macros from dt-bindings instead of redefining
- Prettified qcom_scm_fill_irq_fwspec_params()
- Moved waitq initialization before smp_store_release()
- There is no Gunyah hypercall API that can be used to fetch IRQ information hence
introducing new SCM call.
- Link to v2: https://lore.kernel.org/all/cover.1724968351.git.quic_uchalich@quicinc.com/
Changes in v2:
- Dropped "Initialize waitq before setting global __scm" as it was merged here:
https://lore.kernel.org/r/1711034642-22860-4-git-send-email-quic_mojha@quicinc.com
- Decoupled "Remove QCOM_SMC_WAITQ_FLAG_WAKE_ALL" from series
- Converted xarray to a statically sized array
- Initialize waitq array in probe function
- Remove reinit of waitq completion struct in scm_get_completion()
- Introduced new APIs to get no. of waitqueue contexts and waitqueue IRQ no.
directly from firmware.
- Link to v1: https://lore.kernel.org/all/20240228-multi_waitq-v1-0-ccb096419af0@quicinc.com/
---
Unnathi Chalicheemala (3):
firmware: qcom_scm: Add API to get waitqueue IRQ info
firmware: qcom_scm: Support multiple waitq contexts
firmware: qcom_scm: Check for waitq state in wait_for_wq_completion()
drivers/firmware/qcom/qcom_scm.c | 130 +++++++++++++++++++++++++++++++++------
drivers/firmware/qcom/qcom_scm.h | 1 +
2 files changed, 112 insertions(+), 19 deletions(-)
---
base-commit: c3137514f1f13532bec4083832e7b95b90b73abc
change-id: 20250227-multi_waitq_scm-5bf05480b7b1
Best regards,
--
Unnathi Chalicheemala <unnathi.chalicheemala@oss.qualcomm.com>
next reply other threads:[~2025-04-25 23:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 23:48 Unnathi Chalicheemala [this message]
2025-04-25 23:48 ` [PATCH v6 1/3] firmware: qcom_scm: Add API to get waitqueue IRQ info Unnathi Chalicheemala
2025-04-25 23:48 ` [PATCH v6 2/3] firmware: qcom_scm: Support multiple waitq contexts Unnathi Chalicheemala
2025-05-09 9:48 ` Pavan Kondeti
2025-05-21 23:24 ` Unnathi Chalicheemala
2025-04-25 23:48 ` [PATCH v6 3/3] firmware: qcom_scm: Check for waitq state in wait_for_wq_completion() Unnathi Chalicheemala
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=20250425-multi_waitq_scm-v6-0-cba8ca5a6d03@oss.qualcomm.com \
--to=unnathi.chalicheemala@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=kernel@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prasad.sodagudi@oss.qualcomm.com \
--cc=quic_satyap@quicinc.com \
--cc=quic_tsoni@quicinc.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
all inboxes | Powered by JetHome®