Re: [PATCH 1/5] firmware: qcom: Add a generic ICE service

From: Konrad Dybcio

Date: Thu Oct 22 2026 - 03:47:25 EST


On 10/21/26 5:43 PM, Harshal Dev wrote:
> Qualcomm platforms such as the IQ-9075 EVK now boot with both QTEE and
> OPTEE. However, the Qualcomm Inline Crypto Engine (ICE) driver
> currently only makes SCM calls into QTEE. With the arrival of ICE
> support on OPTEE for Qualcomm platforms, there is a need for a generic
> layer which re-directs the call to the correct TEE at runtime.
>
> Add a generic ICE service which acts as a common layer with different
> TEE backends plugged in whether it's an SCM implementation or a proper
> TEE bus based implementation (such as for OPTEE).
>
> Signed-off-by: Harshal Dev <harshal.dev@xxxxxxxxxxxxxxxx>
> ---

[...]

> +bool qcom_ice_svc_ops_registered(void)
> +{
> + /*
> + * The barrier for ops_ptr is intended to synchronize the data stores
> + * for the ops data structure when client drivers are in parallel
> + * checking for ICE service availability.
> + */
> + return !!smp_load_acquire(&ops_ptr);
> +}
> +EXPORT_SYMBOL_GPL(qcom_ice_svc_ops_registered);
> +
> +bool qcom_ice_svc_available(void)
> +{
> + if (!ops_ptr)

Should this also be a barrier read?

Konrad