[arm-platforms:kvm-arm64/mmu/guest-MMIO-guard 21/23] arch/arm64/mm/ioremap.c:40:24: error: storage size of 'res' isn't known
kernel test robot
lkp at intel.com
Thu Jul 1 04:36:18 PDT 2021
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/mmu/guest-MMIO-guard
head: 94758306c5ec640d79f2093597c83bf5faba5495
commit: 96cfc7d33acdc479727f9a9ed37bceb7d9d3f76e [21/23] arm64: Implement ioremap/iounmap hooks calling into KVM's MMIO guard
config: arm64-buildonly-randconfig-r001-20210630 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=96cfc7d33acdc479727f9a9ed37bceb7d9d3f76e
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms kvm-arm64/mmu/guest-MMIO-guard
git checkout 96cfc7d33acdc479727f9a9ed37bceb7d9d3f76e
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/mm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
arch/arm64/mm/ioremap.c: In function 'ioremap_page_range_hook':
arch/arm64/mm/ioremap.c:36:37: error: 'ARM_SMCCC_KVM_FUNC_MMIO_GUARD_MAP' undeclared (first use in this function)
36 | if (!kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_MAP))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/mm/ioremap.c:36:37: note: each undeclared identifier is reported only once for each function it appears in
>> arch/arm64/mm/ioremap.c:40:24: error: storage size of 'res' isn't known
40 | struct arm_smccc_res res;
| ^~~
arch/arm64/mm/ioremap.c:42:3: error: implicit declaration of function 'arm_smccc_1_1_hvc' [-Werror=implicit-function-declaration]
42 | arm_smccc_1_1_hvc(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_MAP_FUNC_ID,
| ^~~~~~~~~~~~~~~~~
arch/arm64/mm/ioremap.c:42:21: error: 'ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_MAP_FUNC_ID' undeclared (first use in this function)
42 | arm_smccc_1_1_hvc(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_MAP_FUNC_ID,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/mm/ioremap.c:44:17: error: 'SMCCC_RET_SUCCESS' undeclared (first use in this function)
44 | if (res.a0 != SMCCC_RET_SUCCESS) {
| ^~~~~~~~~~~~~~~~~
arch/arm64/mm/ioremap.c:40:24: warning: unused variable 'res' [-Wunused-variable]
40 | struct arm_smccc_res res;
| ^~~
arch/arm64/mm/ioremap.c: In function 'iounmap_page_range_hook':
>> arch/arm64/mm/ioremap.c:62:37: error: 'ARM_SMCCC_KVM_FUNC_MMIO_GUARD_UNMAP' undeclared (first use in this function)
62 | if (!kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_UNMAP))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/mm/ioremap.c:66:24: error: storage size of 'res' isn't known
66 | struct arm_smccc_res res;
| ^~~
>> arch/arm64/mm/ioremap.c:68:21: error: 'ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_UNMAP_FUNC_ID' undeclared (first use in this function)
68 | arm_smccc_1_1_hvc(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_UNMAP_FUNC_ID,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/mm/ioremap.c:70:17: error: 'SMCCC_RET_SUCCESS' undeclared (first use in this function)
70 | if (res.a0 != SMCCC_RET_SUCCESS) {
| ^~~~~~~~~~~~~~~~~
arch/arm64/mm/ioremap.c:66:24: warning: unused variable 'res' [-Wunused-variable]
66 | struct arm_smccc_res res;
| ^~~
cc1: some warnings being treated as errors
vim +40 arch/arm64/mm/ioremap.c
24
25 void ioremap_page_range_hook(unsigned long addr, unsigned long end,
26 phys_addr_t phys_addr, pgprot_t prot)
27 {
28 size_t size = end - addr;
29
30 if (!static_branch_unlikely(&ioremap_guard_key))
31 return;
32
33 if (pfn_valid(__phys_to_pfn(phys_addr)))
34 return;
35
36 if (!kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_MAP))
37 return;
38
39 while (size) {
> 40 struct arm_smccc_res res;
41
42 arm_smccc_1_1_hvc(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_MAP_FUNC_ID,
43 phys_addr, prot, &res);
> 44 if (res.a0 != SMCCC_RET_SUCCESS) {
45 pr_warn_ratelimited("Failed to register %llx\n",
46 phys_addr);
47 return;
48 }
49
50 size -= PAGE_SIZE;
51 phys_addr += PAGE_SIZE;
52 };
53 }
54
55 void iounmap_page_range_hook(phys_addr_t phys_addr, size_t size)
56 {
57 if (!static_branch_unlikely(&ioremap_guard_key))
58 return;
59
60 VM_BUG_ON(phys_addr & ~PAGE_MASK || size & ~PAGE_MASK);
61
> 62 if (!kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_UNMAP))
63 return;
64
65 while (size) {
66 struct arm_smccc_res res;
67
> 68 arm_smccc_1_1_hvc(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_UNMAP_FUNC_ID,
69 phys_addr, &res);
70 if (res.a0 != SMCCC_RET_SUCCESS) {
71 pr_warn_ratelimited("Failed to unregister %llx\n",
72 phys_addr);
73 return;
74 }
75
76 size -= PAGE_SIZE;
77 phys_addr += PAGE_SIZE;
78 };
79 }
80
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 35216 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210701/a5542d0e/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list