Przeglądaj źródła

Merge tag 'tee-drv-for-4.18' of git://git.linaro.org/people/jens.wiklander/linux-tee into next/drivers

Misc enhancement for tee driver subsystem

* Replaces getnstimeofday64() with ktime_get_real_ts64()
* Adds OPTEE_SHM_NUM_PRIV_PAGES to configure how many pages should be
  statically reserved for driver private allocations

* tag 'tee-drv-for-4.18' of git://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: optee: making OPTEE_SHM_NUM_PRIV_PAGES configurable via Kconfig
  tee: replace getnstimeofday64() with ktime_get_real_ts64()

Signed-off-by: Olof Johansson <olof@lixom.net>
Olof Johansson 7 lat temu
rodzic
commit
3287ecdf14
3 zmienionych plików z 10 dodań i 2 usunięć
  1. 8 0
      drivers/tee/optee/Kconfig
  2. 1 1
      drivers/tee/optee/core.c
  3. 1 1
      drivers/tee/optee/rpc.c

+ 8 - 0
drivers/tee/optee/Kconfig

@@ -5,3 +5,11 @@ config OPTEE
 	help
 	  This implements the OP-TEE Trusted Execution Environment (TEE)
 	  driver.
+
+config OPTEE_SHM_NUM_PRIV_PAGES
+	int "Private Shared Memory Pages"
+	default 1
+	depends on OPTEE
+	help
+	  This sets the number of private shared memory pages to be
+	  used by OP-TEE TEE driver.

+ 1 - 1
drivers/tee/optee/core.c

@@ -32,7 +32,7 @@
 
 #define DRIVER_NAME "optee"
 
-#define OPTEE_SHM_NUM_PRIV_PAGES	1
+#define OPTEE_SHM_NUM_PRIV_PAGES	CONFIG_OPTEE_SHM_NUM_PRIV_PAGES
 
 /**
  * optee_from_msg_param() - convert from OPTEE_MSG parameters to

+ 1 - 1
drivers/tee/optee/rpc.c

@@ -48,7 +48,7 @@ static void handle_rpc_func_cmd_get_time(struct optee_msg_arg *arg)
 			OPTEE_MSG_ATTR_TYPE_VALUE_OUTPUT)
 		goto bad;
 
-	getnstimeofday64(&ts);
+	ktime_get_real_ts64(&ts);
 	arg->params[0].u.value.a = ts.tv_sec;
 	arg->params[0].u.value.b = ts.tv_nsec;