mbox series

[GIT,PULL] OP-TEE FF-A for V5.16

Message ID 20211018121324.GA2943530@jade (mailing list archive)
State Accepted
Commit 20f6d9586eee5734072886cf052b72807b0afc4c
Headers show
Series [GIT,PULL] OP-TEE FF-A for V5.16 | expand

Pull-request

git://git.linaro.org/people/jens.wiklander/linux-tee.git tags/optee-ffa-for-v5.16

Message

Jens Wiklander Oct. 18, 2021, 12:13 p.m. UTC
Hello arm-soc maintainers,

Please pull these patches which adds support for FF-A [1] in the OP-TEE
driver. There's a bit of shuffling in the code where everyhting related to
the old SMC based ABI is moved to drivers/tee/optee/smc_abi.c, but there
should not be any changed in behavior for with the old ABI.

Note that this is based on top of the recent fix 7f565d0ead26 ("tee: optee:
Fix missing devices unregister during optee_remove") which has already been
requested to be pulled.

Thanks,
Jens

The following changes since commit 7f565d0ead264329749c0da488de9c8dfa2f18ce:

  tee: optee: Fix missing devices unregister during optee_remove (2021-10-12 13:24:39 +0200)

are available in the Git repository at:

  git://git.linaro.org/people/jens.wiklander/linux-tee.git tags/optee-ffa-for-v5.16

for you to fetch changes up to 4615e5a34b95e0d81467f6d2176f19a5d184cb5d:

  optee: add FF-A support (2021-10-18 11:44:23 +0200)

----------------------------------------------------------------
Add FF-A support in OP-TEE driver

Adds supports for the OP-TEE driver to communicate with secure world
using FF-A [1] as transport.

[1] https://developer.arm.com/documentation/den0077/latest

----------------------------------------------------------------
Jens Wiklander (5):
      tee: add sec_world_id to struct tee_shm
      optee: simplify optee_release()
      optee: refactor driver with internal callbacks
      optee: isolate smc abi
      optee: add FF-A support

 drivers/tee/optee/Makefile        |    5 +-
 drivers/tee/optee/call.c          |  445 ++----------
 drivers/tee/optee/core.c          |  719 ++------------------
 drivers/tee/optee/ffa_abi.c       |  911 +++++++++++++++++++++++++
 drivers/tee/optee/optee_ffa.h     |  153 +++++
 drivers/tee/optee/optee_msg.h     |   27 +-
 drivers/tee/optee/optee_private.h |  157 ++++-
 drivers/tee/optee/rpc.c           |  237 +------
 drivers/tee/optee/shm_pool.c      |  101 ---
 drivers/tee/optee/shm_pool.h      |   14 -
 drivers/tee/optee/smc_abi.c       | 1361 +++++++++++++++++++++++++++++++++++++
 include/linux/tee_drv.h           |    7 +-
 12 files changed, 2728 insertions(+), 1409 deletions(-)
 create mode 100644 drivers/tee/optee/ffa_abi.c
 create mode 100644 drivers/tee/optee/optee_ffa.h
 delete mode 100644 drivers/tee/optee/shm_pool.c
 delete mode 100644 drivers/tee/optee/shm_pool.h
 create mode 100644 drivers/tee/optee/smc_abi.c

Comments

patchwork-bot+linux-soc@kernel.org Oct. 20, 2021, 4 p.m. UTC | #1
Hello:

This pull request was applied to soc/soc.git (for-next)
by Arnd Bergmann <arnd@arndb.de>:

On Mon, 18 Oct 2021 14:13:24 +0200 you wrote:
> Hello arm-soc maintainers,
> 
> Please pull these patches which adds support for FF-A [1] in the OP-TEE
> driver. There's a bit of shuffling in the code where everyhting related to
> the old SMC based ABI is moved to drivers/tee/optee/smc_abi.c, but there
> should not be any changed in behavior for with the old ABI.
> 
> [...]

Here is the summary with links:
  - [GIT,PULL] OP-TEE FF-A for V5.16
    https://git.kernel.org/soc/soc/c/20f6d9586eee

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Arnd Bergmann Oct. 20, 2021, 4 p.m. UTC | #2
From: Arnd Bergmann <arnd@arndb.de>

On Mon, 18 Oct 2021 14:13:24 +0200, Jens Wiklander wrote:
> Please pull these patches which adds support for FF-A [1] in the OP-TEE
> driver. There's a bit of shuffling in the code where everyhting related to
> the old SMC based ABI is moved to drivers/tee/optee/smc_abi.c, but there
> should not be any changed in behavior for with the old ABI.
> 
> Note that this is based on top of the recent fix 7f565d0ead26 ("tee: optee:
> Fix missing devices unregister during optee_remove") which has already been
> requested to be pulled.
> 
> [...]

Merged into arm/drivers, thanks!

merge commit: 20f6d9586eee5734072886cf052b72807b0afc4c

       Arnd
Arnd Bergmann Oct. 21, 2021, 11:30 a.m. UTC | #3
On Mon, Oct 18, 2021 at 2:13 PM Jens Wiklander
<jens.wiklander@linaro.org> wrote:
>       optee: isolate smc abi

This one caused a randconfig build regression on 32-bit arm:

/git/arm-soc/drivers/tee/optee/smc_abi.c:405:15: error: implicit
declaration of function 'page_to_section'
[-Werror,-Wimplicit-function-declaration]
        optee_page = page_to_phys(*pages) +
                     ^
/git/arm-soc/arch/arm/include/asm/memory.h:148:43: note: expanded from
macro 'page_to_phys'
#define page_to_phys(page)      (__pfn_to_phys(page_to_pfn(page)))
                                               ^
/git/arm-soc/include/asm-generic/memory_model.h:52:21: note: expanded
from macro 'page_to_pfn'
#define page_to_pfn __page_to_pfn
                    ^
/git/arm-soc/include/asm-generic/memory_model.h:35:14: note: expanded
from macro '__page_to_pfn'
        int __sec = page_to_section(__pg);                      \
                    ^
/git/arm-soc/drivers/tee/optee/smc_abi.c:405:15: note: did you mean
'__nr_to_section'?
/git/arm-soc/arch/arm/include/asm/memory.h:148:43: note: expanded from
macro 'page_to_phys'
#define page_to_phys(page)      (__pfn_to_phys(page_to_pfn(page)))
                                               ^
/git/arm-soc/include/asm-generic/memory_model.h:52:21: note: expanded
from macro 'page_to_pfn'
#define page_to_pfn __page_to_pfn
                    ^
/git/arm-soc/include/asm-generic/memory_model.h:35:14: note: expanded
from macro '__page_to_pfn'
        int __sec = page_to_section(__pg);                      \
                    ^
/git/arm-soc/include/linux/mmzone.h:1365:35: note: '__nr_to_section'
declared here
static inline struct mem_section *__nr_to_section(unsigned long nr)

I have not investigated it, but it's probably trivial. Can have a look
and send a fix to
soc@kernel.org?

      Arnd