mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sahil Malhotra <sahil.malhotra@nxp.com>
To: linux-kernel@vger.kernel.org
Cc: Sahil Malhotra <sahil.malhotra@nxp.com>,
	Jens Wiklander <jens.wiklander@linaro.org>
Subject: [PATCH] tee: optee: making OPTEE_SHM_NUM_PRIV_PAGES configurable via Kconfig
Date: Fri,  8 Jun 2018 12:38:13 +0530	[thread overview]
Message-ID: <20180608070813.27263-1-sahil.malhotra@nxp.com> (raw)

This change adds KCONFIG option to set number of pages out of
whole shared memory to be used for OP-TEE driver private data
structures.

Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com>
---
 drivers/tee/optee/Kconfig | 8 ++++++++
 drivers/tee/optee/core.c  | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig
index 524c7a80fde4..f425c960a5a2 100644
--- a/drivers/tee/optee/Kconfig
+++ b/drivers/tee/optee/Kconfig
@@ -12,3 +12,11 @@ config OPTEE_BENCHMARK
 	help
 	  This enables benchmarking feature in 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.
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index 4a2c420d4fe4..8d3be6b1bb96 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -33,7 +33,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
-- 
2.17.0

             reply	other threads:[~2018-06-08  5:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08  7:08 Sahil Malhotra [this message]
2018-06-20  9:12 ` Jens Wiklander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180608070813.27263-1-sahil.malhotra@nxp.com \
    --to=sahil.malhotra@nxp.com \
    --cc=jens.wiklander@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®