Commit ae7d45fb authored by Mario Limonciello's avatar Mario Limonciello Committed by Herbert Xu

crypto: ccp - Add a header for multiple drivers to use `__psp_pa`

The TEE subdriver for CCP, the amdtee driver and the i2c-designware-amdpsp
drivers all include `psp-sev.h` even though they don't use SEV
functionality.

Move the definition of `__psp_pa` into a common header to be included
by all of these drivers.
Reviewed-by: default avatarJan Dabros <jsd@semihalf.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> # For the drivers/i2c/busses/i2c-designware-amdpsp.c
Acked-by: Sumit Garg <sumit.garg@linaro.org> # For TEE subsystem bits
Acked-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Acked-by: Sean Christopherson <seanjc@google.com> # KVM
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent a7ca7bbd
......@@ -12,6 +12,7 @@
#include <linux/kvm_host.h>
#include <linux/kernel.h>
#include <linux/highmem.h>
#include <linux/psp.h>
#include <linux/psp-sev.h>
#include <linux/pagemap.h>
#include <linux/swap.h>
......
......@@ -24,6 +24,7 @@
#include <linux/cpufeature.h>
#include <linux/fs.h>
#include <linux/fs_struct.h>
#include <linux/psp.h>
#include <asm/smp.h>
#include <asm/cacheflush.h>
......
......@@ -13,7 +13,7 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/gfp.h>
#include <linux/psp-sev.h>
#include <linux/psp.h>
#include <linux/psp-tee.h>
#include "psp-dev.h"
......
......@@ -4,7 +4,7 @@
#include <linux/bits.h>
#include <linux/i2c.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/psp-sev.h>
#include <linux/psp.h>
#include <linux/types.h>
#include <linux/workqueue.h>
......
......@@ -8,7 +8,7 @@
#include <linux/tee_drv.h>
#include <linux/psp-tee.h>
#include <linux/slab.h>
#include <linux/psp-sev.h>
#include <linux/psp.h>
#include "amdtee_if.h"
#include "amdtee_private.h"
......
......@@ -5,7 +5,7 @@
#include <linux/slab.h>
#include <linux/tee_drv.h>
#include <linux/psp-sev.h>
#include <linux/psp.h>
#include "amdtee_private.h"
static int pool_op_alloc(struct tee_shm_pool *pool, struct tee_shm *shm,
......
......@@ -14,14 +14,6 @@
#include <uapi/linux/psp-sev.h>
#ifdef CONFIG_X86
#include <linux/mem_encrypt.h>
#define __psp_pa(x) __sme_pa(x)
#else
#define __psp_pa(x) __pa(x)
#endif
#define SEV_FW_BLOB_MAX_SIZE 0x4000 /* 16KB */
/**
......
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __PSP_H
#define __PSP_H
#ifdef CONFIG_X86
#include <linux/mem_encrypt.h>
#define __psp_pa(x) __sme_pa(x)
#else
#define __psp_pa(x) __pa(x)
#endif
#endif /* __PSP_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment