linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Marc Zyngier <maz@kernel.org>
Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org
Subject: [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
Date: Thu, 1 Jul 2021 19:36:18 +0800	[thread overview]
Message-ID: <202107011915.qwp0WyXs-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5819 bytes --]

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@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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35216 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

                 reply	other threads:[~2021-07-01 11:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202107011915.qwp0WyXs-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).