[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220331211213.2844-4-mario.limonciello@amd.com>
Date: Thu, 31 Mar 2022 16:12:12 -0500
From: Mario Limonciello <mario.limonciello@....com>
To: Tom Lendacky <thomas.lendacky@....com>,
John Allen <john.allen@....com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S . Miller" <davem@...emloft.net>
CC: open list <linux-kernel@...r.kernel.org>,
"open list:AMD CRYPTOGRAPHIC COPROCESSOR (CCP) DRIVER"
<linux-crypto@...r.kernel.org>,
Kerneis Gabriel <Gabriel.Kerneis@....gouv.fr>,
Richard Hughes <hughsient@...il.com>,
"Mario Limonciello" <mario.limonciello@....com>
Subject: [PATCH v3 3/4] crypto: ccp: Allow PSP driver to load without SEV/TEE support
Previously the PSP probe routine would fail if both SEV and TEE were
missing. This is possibly the case for some client parts.
As capabilities can now be accessed from userspace, it may still be
useful to have the PSP driver finish loading so that those capabilities
can be read.
Signed-off-by: Mario Limonciello <mario.limonciello@....com>
---
v2->v3:
* Remove helper function, and still set up IRQs even in this case to keep
cleanup process the same
v1->v2:
* Whitespace fixes
---
drivers/crypto/ccp/psp-dev.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c
index 8cd404121cd5..a3b7b5130be4 100644
--- a/drivers/crypto/ccp/psp-dev.c
+++ b/drivers/crypto/ccp/psp-dev.c
@@ -99,18 +99,6 @@ static int psp_check_tee_support(struct psp_device *psp)
return 0;
}
-static int psp_check_support(struct psp_device *psp)
-{
- int sev_support = psp_check_sev_support(psp);
- int tee_support = psp_check_tee_support(psp);
-
- /* Return error if device neither supports SEV nor TEE */
- if (sev_support && tee_support)
- return -ENODEV;
-
- return 0;
-}
-
static int psp_init(struct psp_device *psp)
{
int ret;
@@ -156,10 +144,6 @@ int psp_dev_init(struct sp_device *sp)
if (ret)
goto e_disable;
- ret = psp_check_support(psp);
- if (ret)
- goto e_disable;
-
/* Disable and clear interrupts until ready */
iowrite32(0, psp->io_regs + psp->vdata->inten_reg);
iowrite32(-1, psp->io_regs + psp->vdata->intsts_reg);
--
2.34.1
Powered by blists - more mailing lists