Thread (41 messages) 41 messages, 6 authors, 2026-03-30

Re: [PATCH v2 02/15] firmware: qcom: Add a generic PAS service

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2026-03-27 13:56:52
Also in: ath12k, dri-devel, linux-arm-msm, linux-devicetree, linux-media, linux-remoteproc, linux-wireless, lkml, op-tee

On 23/03/2026 15:26, Konrad Dybcio wrote:
quoted
quoted
This pattern has been carried from the PAS API contract among kernel
clients and the SCM PAS service earlier. The clients don't hold a
reference to the PAS data like underlying platform or TEE device etc.
Hence the need to have a global data pointer to hold reference to the
ops data structure registered by drivers having different lifetime of
devices. Also, the PAS APIs can be called from very different client
driver contexts.

Surely, avoiding global data is always better given a better alternative
is there. Do you have any better alternative proposal here?
Why it cannot be part of the context?

Look at your API, e.g.:
qcom_pas_init_image(). It takes struct qcom_pas_context which should
contain the ops.
This would make the client have to select the ops. The whole point is to
avoid that, since the client has no clue (and is supposed not to have any).
Yeah, I see. The problem is that this patchset just keeps growing the
singletons so except existing 'struct qcom_scm *__scm' in qcom_scm.c,
this one brings at least three new: 'ops_ptr', 'qcom_pas_ops_scm' and
'qcom_pas_ops_tee'.

I don't think you need all four in total, but only one which will hold
whatever pointers are necessary.

Best regards,
Krzysztof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help