diff options
author | Jakub Kicinski <kuba@kernel.org> | 2025-02-20 10:36:34 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-02-20 10:37:30 -0800 |
commit | 5d6ba5ab8582aa35c1ee98e47af28e6f6772596c (patch) | |
tree | a4a3a2d311773c19909c9928273e0bcae01a39ce /drivers/crypto/ccp/sp-dev.c | |
parent | 384cba25b886a06c9970189bfa50b7b03a57be65 (diff) | |
parent | 27eddbf3449026a73d6ed52d55b192bfcf526a03 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-6.14-rc4).
No conflicts or adjacent changes.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/crypto/ccp/sp-dev.c')
-rw-r--r-- | drivers/crypto/ccp/sp-dev.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/sp-dev.c b/drivers/crypto/ccp/sp-dev.c index 7eb3e4668286..3467f6db4f50 100644 --- a/drivers/crypto/ccp/sp-dev.c +++ b/drivers/crypto/ccp/sp-dev.c @@ -19,6 +19,7 @@ #include <linux/types.h> #include <linux/ccp.h> +#include "sev-dev.h" #include "ccp-dev.h" #include "sp-dev.h" @@ -253,8 +254,12 @@ unlock: static int __init sp_mod_init(void) { #ifdef CONFIG_X86 + static bool initialized; int ret; + if (initialized) + return 0; + ret = sp_pci_init(); if (ret) return ret; @@ -263,6 +268,8 @@ static int __init sp_mod_init(void) psp_pci_init(); #endif + initialized = true; + return 0; #endif @@ -279,6 +286,13 @@ static int __init sp_mod_init(void) return -ENODEV; } +#if IS_BUILTIN(CONFIG_KVM_AMD) && IS_ENABLED(CONFIG_KVM_AMD_SEV) +int __init sev_module_init(void) +{ + return sp_mod_init(); +} +#endif + static void __exit sp_mod_exit(void) { #ifdef CONFIG_X86 |