Re: [PATCH v4 1/4] iommu/amd: Add support to remap/unmap IOMMU buffers for kdump

From: kernel test robot
Date: Thu Jul 24 2025 - 08:00:44 EST


Hi Ashish,

kernel test robot noticed the following build warnings:

[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on herbert-crypto-2.6/master linus/master v6.16-rc7 next-20250724]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Ashish-Kalra/iommu-amd-Add-support-to-remap-unmap-IOMMU-buffers-for-kdump/20250722-055642
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link: https://lore.kernel.org/r/6a48567cd99a0ef915862b3c6590d1415d287870.1753133022.git.ashish.kalra%40amd.com
patch subject: [PATCH v4 1/4] iommu/amd: Add support to remap/unmap IOMMU buffers for kdump
config: x86_64-randconfig-r133-20250724 (https://download.01.org/0day-ci/archive/20250724/202507241929.76UExdsw-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250724/202507241929.76UExdsw-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507241929.76UExdsw-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/iommu/amd/init.c:723:41: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] __iomem * @@
drivers/iommu/amd/init.c:723:41: sparse: expected void *
drivers/iommu/amd/init.c:723:41: sparse: got void [noderef] __iomem *
>> drivers/iommu/amd/init.c:723:41: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] __iomem * @@
drivers/iommu/amd/init.c:723:41: sparse: expected void *
drivers/iommu/amd/init.c:723:41: sparse: got void [noderef] __iomem *
>> drivers/iommu/amd/init.c:723:41: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] __iomem * @@
drivers/iommu/amd/init.c:723:41: sparse: expected void *
drivers/iommu/amd/init.c:723:41: sparse: got void [noderef] __iomem *

vim +723 drivers/iommu/amd/init.c

707
708 static inline void *iommu_memremap(unsigned long paddr, size_t size)
709 {
710 phys_addr_t phys;
711
712 if (!paddr)
713 return NULL;
714
715 /*
716 * Obtain true physical address in kdump kernel when SME is enabled.
717 * Currently, previous kernel with SME enabled and kdump kernel
718 * with SME support disabled is not supported.
719 */
720 phys = __sme_clr(paddr);
721
722 if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
> 723 return ioremap_encrypted(phys, size);
724 else
725 return memremap(phys, size, MEMREMAP_WB);
726 }
727

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki