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 06/11] crypto: ccp - Specify a single CCP via PCI device ID
Date: Mon, 24 Jun 2019 19:29:11 +0000	[thread overview]
Message-ID: <156140455020.116890.2457308391471121920.stgit@sosrh3.amd.com> (raw)
In-Reply-To: <156140365456.116890.15736288493305066708.stgit@sosrh3.amd.com>

Some processors contain multiple CCPs with differing device IDs. Enable
the selection of specific devices based on ID. The parameter value is
a single PCI ID.

Signed-off-by: Gary R Hook <gary.hook@amd.com>
---
 drivers/crypto/ccp/sp-pci.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/crypto/ccp/sp-pci.c b/drivers/crypto/ccp/sp-pci.c
index 29177d113c90..b024b92fb749 100644
--- a/drivers/crypto/ccp/sp-pci.c
+++ b/drivers/crypto/ccp/sp-pci.c
@@ -36,6 +36,9 @@
 /*
  * Limit CCP use to a specifed number of queues per device.
  */
+static unsigned int pcidev;
+module_param(pcidev, uint, 0444);
+MODULE_PARM_DESC(pcidev, "Device number for a specific CCP");
 
 static struct mutex devcount_mutex ____cacheline_aligned;
 static unsigned int devcount = 0;
@@ -204,6 +207,10 @@ static int sp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	if (maxdev && (devcount >= maxdev)) /* Too many devices? */
 		return 0;
 
+	/* If a specific device ID has been specified, filter for it */
+        if (pcidev && (pdev->device != pcidev))
+                        return 0;
+
 	ret = -ENOMEM;
 	sp = sp_alloc_struct(dev);
 	if (!sp)


  parent reply	other threads:[~2019-06-24 19:29 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 ` [PATCH 01/11] crypto: ccp - Make CCP debugfs support optional Hook, Gary
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 ` Hook, Gary [this message]
2019-06-24 22:41   ` [PATCH 06/11] crypto: ccp - Specify a single CCP via PCI device ID 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=156140455020.116890.2457308391471121920.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.