optee: isolate smc abi
authorJens Wiklander <jens.wiklander@linaro.org>
Wed, 21 Jul 2021 14:30:28 +0000 (16:30 +0200)
committerJens Wiklander <jens.wiklander@linaro.org>
Mon, 18 Oct 2021 09:44:23 +0000 (11:44 +0200)
commitc51a564a5b48355f30309b84cdffe3f96d1ae0d3
tree2dd51d153a652e9d6a03558bfe968f580961c6d9
parent4602c5842f649da2fbd2cea3560af750cfbd59e3
optee: isolate smc abi

Isolate the ABI based on raw SMCs. Code specific to the raw SMC ABI is
moved into smc_abi.c. This makes room for other ABIs with a clear
separation.

The driver changes to use module_init()/module_exit() instead of
module_platform_driver(). The platform_driver_register() and
platform_driver_unregister() functions called directly to keep the same
behavior. This is needed because module_platform_driver() is based on
module_driver() which can only be used once in a module.

A function optee_rpc_cmd() is factored out from the function
handle_rpc_func_cmd() to handle the ABI independent part of RPC
processing.

This patch is not supposed to change the driver behavior, it's only a
matter of reorganizing the code.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/optee/Makefile
drivers/tee/optee/call.c
drivers/tee/optee/core.c
drivers/tee/optee/optee_private.h
drivers/tee/optee/rpc.c
drivers/tee/optee/shm_pool.c [deleted file]
drivers/tee/optee/shm_pool.h [deleted file]
drivers/tee/optee/smc_abi.c [new file with mode: 0644]