Content-Type: multipart/mixed; boundary="===============4516609047997216704==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH] iommu/amd: Fix loop timeout issue in iommu_ga_log_enable() Date: Tue, 01 Feb 2022 15:01:19 +0800 Message-ID: <202202011448.2UFIiZHD-lkp@intel.com> In-Reply-To: <20220131161749.4021-1-joro@8bytes.org> List-Id: --===============4516609047997216704== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Joerg, I love your patch! Yet something to improve: [auto build test ERROR on joro-iommu/next] [also build test ERROR on v5.17-rc2 next-20220131] [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] url: https://github.com/0day-ci/linux/commits/Joerg-Roedel/iommu-amd-Fix= -loop-timeout-issue-in-iommu_ga_log_enable/20220201-002214 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/202202= 01/202202011448.2UFIiZHD-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=3D1 build): # https://github.com/0day-ci/linux/commit/5b5785526da0e2a6e793d2107= d09afc9f310f17f git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Joerg-Roedel/iommu-amd-Fix-loop-ti= meout-issue-in-iommu_ga_log_enable/20220201-002214 git checkout 5b5785526da0e2a6e793d2107d09afc9f310f17f # save the config file to linux build tree mkdir build_dir make W=3D1 O=3Dbuild_dir ARCH=3Dx86_64 SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/iommu/amd/init.c: In function 'iommu_ga_log_enable': >> drivers/iommu/amd/init.c:837:3: error: implicit declaration of function = 'udelay' [-Werror=3Dimplicit-function-declaration] 837 | udelay(1); | ^~~~~~ cc1: some warnings being treated as errors vim +/udelay +837 drivers/iommu/amd/init.c 804 = 805 static int iommu_ga_log_enable(struct amd_iommu *iommu) 806 { 807 #ifdef CONFIG_IRQ_REMAP 808 u32 status, i; 809 u64 entry; 810 = 811 if (!iommu->ga_log) 812 return -EINVAL; 813 = 814 /* Check if already running */ 815 status =3D readl(iommu->mmio_base + MMIO_STATUS_OFFSET); 816 if (WARN_ON(status & (MMIO_STATUS_GALOG_RUN_MASK))) 817 return 0; 818 = 819 entry =3D iommu_virt_to_phys(iommu->ga_log) | GA_LOG_SIZE_512; 820 memcpy_toio(iommu->mmio_base + MMIO_GA_LOG_BASE_OFFSET, 821 &entry, sizeof(entry)); 822 entry =3D (iommu_virt_to_phys(iommu->ga_log_tail) & 823 (BIT_ULL(52)-1)) & ~7ULL; 824 memcpy_toio(iommu->mmio_base + MMIO_GA_LOG_TAIL_OFFSET, 825 &entry, sizeof(entry)); 826 writel(0x00, iommu->mmio_base + MMIO_GA_HEAD_OFFSET); 827 writel(0x00, iommu->mmio_base + MMIO_GA_TAIL_OFFSET); 828 = 829 = 830 iommu_feature_enable(iommu, CONTROL_GAINT_EN); 831 iommu_feature_enable(iommu, CONTROL_GALOG_EN); 832 = 833 for (i =3D 0; i < LOOP_TIMEOUT; ++i) { 834 status =3D readl(iommu->mmio_base + MMIO_STATUS_OFFSET); 835 if (status & (MMIO_STATUS_GALOG_RUN_MASK)) 836 break; > 837 udelay(1); 838 } 839 = 840 if (WARN_ON(i >=3D LOOP_TIMEOUT)) 841 return -EINVAL; 842 #endif /* CONFIG_IRQ_REMAP */ 843 return 0; 844 } 845 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============4516609047997216704==--