Hi Arnd,
On Tue, Oct 13, 2026 at 4:53 PM Arnd Bergmann arnd@arndb.de wrote:
On Fri, Oct 2, 2026, at 16:51, Jens Wiklander wrote:
for you to fetch changes up to ccd4b23398acaf2139cf04f1ba0a66150cbf2663:
tee: optee: build the Arm-specific code only on Arm (2026-10-02 16:28:41 +0200)
Build the OP-TEE driver's SMC and FF-A code only where supported
Marouene Boubakri (1): tee: optee: build the Arm-specific code only on Arm
I had a look at the contents and saw that it keeps the IS_REACHABLE() checks that are notoriously error-prone. E.g. this part just looks broken:
@@ -257,8 +266,12 @@ struct optee { const struct optee_ops *ops; struct tee_context *ctx; union { +#ifdef CONFIG_HAVE_ARM_SMCCC struct optee_smc smc; +#endif +#if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT) struct optee_ffa ffa; +#endif }; struct optee_shm_arg_cache shm_arg_cache; struct optee_call_queue call_queue;
The presence of the 'ffa' member in the union is conditional on whether the driver that includes the header is a loadable module or built-in, and this changes the entire structure layout if both types of users are present.
The intention of the patch does make a lot of sense, but as far as I can tell, only the Kconfig change is actually required, while the added preprocessor checks only make it harder to read and it should have been sufficient to change the existing IS_REACHABLE() to IS_ENABLED() for consistency.
Sorry I did not notice this one earlier as I was travelling, but I think I can't pull this version, please respin.
Thanks for catching this. We'll repin.
Cheers, Jens