All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hook, Gary" <Gary.Hook@amd.com>
To: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Cc: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>,
	"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: [PATCH 01/11] crypto: ccp - Make CCP debugfs support optional
Date: Mon, 24 Jun 2019 19:28:37 +0000	[thread overview]
Message-ID: <156140451586.116890.10264836198229403397.stgit@sosrh3.amd.com> (raw)
In-Reply-To: <156140365456.116890.15736288493305066708.stgit@sosrh3.amd.com>

Add a config option to exclude DebugFS support in the CCP driver.

Signed-off-by: Gary R Hook <gary.hook@amd.com>
---
 drivers/crypto/ccp/Kconfig      |    9 +++++++++
 drivers/crypto/ccp/Makefile     |    4 ++--
 drivers/crypto/ccp/ccp-dev-v5.c |    4 ++++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/ccp/Kconfig b/drivers/crypto/ccp/Kconfig
index b9dfae47aefd..6fcedd7b0d42 100644
--- a/drivers/crypto/ccp/Kconfig
+++ b/drivers/crypto/ccp/Kconfig
@@ -44,3 +44,12 @@ config CRYPTO_DEV_SP_PSP
 	 management commands in Secure Encrypted Virtualization (SEV) mode,
 	 along with software-based Trusted Execution Environment (TEE) to
 	 enable third-party trusted applications.
+
+config CRYPTO_DEV_CCP_DEBUGFS
+	bool "Enable CCP Internals in DebugFS"
+	default n
+	depends on CRYPTO_DEV_SP_CCP
+	help
+	  Expose CCP device information such as operation statistics, feature
+	  information, descriptor queue contents, and module parameter values set
+	  at load time.
diff --git a/drivers/crypto/ccp/Makefile b/drivers/crypto/ccp/Makefile
index 51d1c0cf66c7..6b86f1e6d634 100644
--- a/drivers/crypto/ccp/Makefile
+++ b/drivers/crypto/ccp/Makefile
@@ -5,8 +5,8 @@ ccp-$(CONFIG_CRYPTO_DEV_SP_CCP) += ccp-dev.o \
 	    ccp-ops.o \
 	    ccp-dev-v3.o \
 	    ccp-dev-v5.o \
-	    ccp-dmaengine.o \
-	    ccp-debugfs.o
+	    ccp-dmaengine.o
+ccp-$(CONFIG_CRYPTO_DEV_CCP_DEBUGFS) += ccp-debugfs.o
 ccp-$(CONFIG_PCI) += sp-pci.o
 ccp-$(CONFIG_CRYPTO_DEV_SP_PSP) += psp-dev.o
 
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
index c9bfd4f439ce..a5bd11831b80 100644
--- a/drivers/crypto/ccp/ccp-dev-v5.c
+++ b/drivers/crypto/ccp/ccp-dev-v5.c
@@ -973,8 +973,10 @@ static int ccp5_init(struct ccp_device *ccp)
 	if (ret)
 		goto e_hwrng;
 
+#ifdef CONFIG_CRYPTO_DEV_CCP_DEBUGFS
 	/* Set up debugfs entries */
 	ccp5_debugfs_setup(ccp);
+#endif
 
 	return 0;
 
@@ -1012,11 +1014,13 @@ static void ccp5_destroy(struct ccp_device *ccp)
 	/* Remove this device from the list of available units first */
 	ccp_del_device(ccp);
 
+#ifdef CONFIG_CRYPTO_DEV_CCP_DEBUGFS
 	/* We're in the process of tearing down the entire driver;
 	 * when all the devices are gone clean up debugfs
 	 */
 	if (ccp_present())
 		ccp5_debugfs_destroy();
+#endif
 
 	/* Disable and clear interrupts */
 	ccp5_disable_queue_interrupts(ccp);


  reply	other threads:[~2019-06-24 19:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 19:28 [PATCH 00/11] Add module parameters to control CCP activation Hook, Gary
2019-06-24 19:28 ` Hook, Gary [this message]
2019-06-24 19:28 ` [PATCH 02/11] crypto: ccp - Add a module parameter to specify a queue count Hook, Gary
2019-06-24 21:54   ` Lendacky, Thomas
2019-06-24 19:28 ` [PATCH 03/11] crypto: ccp - Expose the value of nqueues in DebugFS Hook, Gary
2019-06-24 21:59   ` Lendacky, Thomas
2019-06-25 13:06     ` Gary R Hook
2019-06-24 19:28 ` [PATCH 04/11] crypto: ccp - module parameter to limit the number of enabled CCPs Hook, Gary
2019-06-24 22:11   ` Lendacky, Thomas
2019-06-24 19:29 ` [PATCH 05/11] crypto: ccp - Expose maxdev through DebugFS Hook, Gary
2019-06-24 19:29 ` [PATCH 06/11] crypto: ccp - Specify a single CCP via PCI device ID Hook, Gary
2019-06-24 22:41   ` Lendacky, Thomas
2019-06-24 19:29 ` [PATCH 07/11] crypto: ccp - expose the pcidev module parameter in debugfs Hook, Gary
2019-06-24 19:29 ` [PATCH 08/11] crypto: ccp - module parameter to allow CCP selection by PCI bus Hook, Gary
2019-06-24 22:42   ` Lendacky, Thomas
2019-06-24 19:29 ` [PATCH 09/11] crypto: ccp - expose pcibus module parameter in debugfs Hook, Gary
2019-06-24 19:29 ` [PATCH 10/11] crypto: ccp - Add a module parameter to control registration for DMA Hook, Gary
2019-06-24 22:45   ` Lendacky, Thomas
2019-06-24 19:29 ` [PATCH 11/11] crypto: ccp - Expose the registerdma module parameter in DFS Hook, Gary

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=156140451586.116890.10264836198229403397.stgit@sosrh3.amd.com \
    --to=gary.hook@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.