From: Jason Gunthorpe Date: Thu, 20 Nov 2025 15:06:46 +0000 (-0400) Subject: powerpc/pseries/svm: Make mem_encrypt.h self contained X-Git-Tag: v6.19-rc1~133^2^8~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=416d9a220e678d6b1c5fc206226cfb7fa7efa80e;p=thirdparty%2Flinux.git powerpc/pseries/svm: Make mem_encrypt.h self contained Add the missing forward declarations and includes so it does not have implicit dependencies. mem_encrypt.h is a public header imported by drivers. Users should not have to guess what include files are needed. Resolves a kbuild splat: In file included from drivers/iommu/generic_pt/fmt/iommu_amdv1.c:15: In file included from drivers/iommu/generic_pt/fmt/iommu_template.h:36: In file included from drivers/iommu/generic_pt/fmt/amdv1.h:23: In file included from include/linux/mem_encrypt.h:17: >> arch/powerpc/include/asm/mem_encrypt.h:13:49: warning: declaration of 'struct device' will not be visible outside of this function [-Wvisibility] 13 | static inline bool force_dma_unencrypted(struct device *dev) Fixes: 879ced2bab1b ("iommupt: Add the AMD IOMMU v1 page table format") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202511161358.rS5pSb3U-lkp@intel.com/ Signed-off-by: Jason Gunthorpe Reviewed-by: Vasant Hegde Reviewed-by: Christophe Leroy Reviewed-by: Kevin Tian Signed-off-by: Joerg Roedel --- diff --git a/arch/powerpc/include/asm/mem_encrypt.h b/arch/powerpc/include/asm/mem_encrypt.h index 2f26b8fc8d297..e355ca46fad93 100644 --- a/arch/powerpc/include/asm/mem_encrypt.h +++ b/arch/powerpc/include/asm/mem_encrypt.h @@ -9,6 +9,9 @@ #define _ASM_POWERPC_MEM_ENCRYPT_H #include +#include + +struct device; static inline bool force_dma_unencrypted(struct device *dev) {