summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorMarouene Boubakri <marouene.boubakri@oss.nxp.com>2026-09-24 12:51:45 +0200
committerJens Wiklander <jens.wiklander@oss.qualcomm.com>2026-10-02 16:28:41 +0200
commitccd4b23398acaf2139cf04f1ba0a66150cbf2663 (patch)
tree532f3da2dc0a7301568dec49a8aaa6b076a52c00 /include/uapi/linux
parent8d3ae59288f1e7d58d76558a6ee96d533bc5019f (diff)
downloadlinux-next-ccd4b23398acaf2139cf04f1ba0a66150cbf2663.tar.gz
linux-next-ccd4b23398acaf2139cf04f1ba0a66150cbf2663.zip
tee: optee: build the Arm-specific code only on Arm
The OP-TEE driver reaches OP-TEE through the SMC ABI or the FF-A ABI, both specific to Arm, yet builds both unconditionally together with the SMC Calling Convention definitions they rely on: ffa_abi.c is always compiled and only its registration is conditioned on IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT), and optee_private.h includes <linux/arm-smccc.h> and defines the SMC and FF-A specific types for every file of the driver. This is fine as long as the driver depends on HAVE_ARM_SMCCC, but it keeps the driver from being built for an architecture without SMCCC, such as RISC-V. Build smc_abi.c only when HAVE_ARM_SMCCC is set and ffa_abi.c only when the FF-A transport is enabled, and provide stubs for their registration otherwise, so that it fails with -EOPNOTSUPP as the FF-A ABI already does when the FF-A transport is not reachable. Keep the SMCCC header, the SMC invoke function type, the SMC and FF-A specific structures and the SMC RPC register parameters in optee_private.h under the same conditions, and drop the unused <linux/arm-smccc.h> include from notif.c. Make OPTEE depend on ARM_FFA_TRANSPORT || !ARM_FFA_TRANSPORT, as it already does for RPMB, so that the driver is limited to a module when the FF-A transport is one, rather than built in without FF-A support. ffa_abi.c is thus built exactly when the FF-A transport is reachable from the driver, and the IS_REACHABLE() checks in optee_ffa_abi_register() and optee_ffa_abi_unregister() are always true, so drop them. OPTEE still depends on HAVE_ARM_SMCCC, so smc_abi.c is still always built. The only visible change is that OPTEE=y can no longer be combined with ARM_FFA_TRANSPORT=m: such a configuration now resolves to OPTEE=m, with the FF-A ABI available. Signed-off-by: Marouene Boubakri <marouene.boubakri@oss.nxp.com> Signed-off-by: Jens Wiklander <jens.wiklander@oss.qualcomm.com>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions