]> git.baikalelectronics.ru Git - kernel.git/commit
tee: optee: Fix dynamic shm pool allocations
authorSumit Garg <sumit.garg@linaro.org>
Fri, 8 Nov 2019 11:27:14 +0000 (16:57 +0530)
committerJens Wiklander <jens.wiklander@linaro.org>
Fri, 15 Nov 2019 10:31:11 +0000 (11:31 +0100)
commitbf7371a0fe7e4a7ecf90ad5ce97ae8e5fae9cc64
treea4ccc6e51e90c9f04e8ff33703894839193ec55e
parent1a1521bb50a95f9e476c2109d83bfa47e4706c56
tee: optee: Fix dynamic shm pool allocations

In case of dynamic shared memory pool, kernel memory allocated using
dmabuf_mgr pool needs to be registered with OP-TEE prior to its usage
during optee_open_session() or optee_invoke_func().

So fix dmabuf_mgr pool allocations via an additional call to
optee_shm_register().

Also, allow kernel pages to be registered as shared memory with OP-TEE.

Fixes: 2d6aab6ca792 ("optee: allow to work without static shared memory")
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/optee/call.c
drivers/tee/optee/shm_pool.c