> -----Original Message----- > From: kernel test robot <lkp@xxxxxxxxx> > Sent: Friday, July 12, 2024 9:21 AM > To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@xxxxxxxxxx> > Cc: oe-kbuild-all@xxxxxxxxxxxxxxx; Linux Memory Management List <linux- > mm@xxxxxxxxx>; Will Deacon <will@xxxxxxxxxx>; Ryan Roberts > <ryan.roberts@xxxxxxx>; Jason Gunthorpe <jgg@xxxxxxxxxx>; Kevin Tian > <kevin.tian@xxxxxxxxx> > Subject: [linux-next:master 9539/12880] drivers/iommu/io-pgtable- > arm.c:772:50: error: 'IOMMU_DIRTY_NO_CLEAR' undeclared > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > master > head: 3fe121b622825ff8cc995a1e6b026181c48188db > commit: 4fe88fd8b4aecb7f9680bf898811db76b94095a9 [9539/12880] > iommu/io-pgtable-arm: Add read_and_clear_dirty() support > config: arm-buildonly-randconfig-r005-20220402 > (https://download.01.org/0day-ci/archive/20240712/202407121602.HL9ih1it- > lkp@xxxxxxxxx/config) > compiler: arm-linux-gnueabi-gcc (GCC) 13.3.0 > reproduce (this is a W=1 build): (https://download.01.org/0day- > ci/archive/20240712/202407121602.HL9ih1it-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/202407121602.HL9ih1it- > lkp@xxxxxxxxx/ > > All errors (new ones prefixed by >>): > > drivers/iommu/io-pgtable-arm.c: In function 'io_pgtable_visit_dirty': > >> drivers/iommu/io-pgtable-arm.c:772:50: error: > 'IOMMU_DIRTY_NO_CLEAR' undeclared (first use in this function) > 772 | if (!(walk_data->flags & IOMMU_DIRTY_NO_CLEAR)) Looks like we need to move the IOMMU_DIRTY_NO_CLEAR define in iommu.h to cover !CONFIG_IOMMU_API case. ---x--- diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 7bc8dff7cf6d..104ce84647d4 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -317,6 +317,9 @@ enum iommu_dev_features { #define IOMMU_PASID_INVALID (-1U) typedef unsigned int ioasid_t; +/* Read but do not clear any dirty bits */ +#define IOMMU_DIRTY_NO_CLEAR (1 << 0) + #ifdef CONFIG_IOMMU_API /** @@ -353,9 +356,6 @@ struct iommu_dirty_bitmap { struct iommu_iotlb_gather *gather; }; -/* Read but do not clear any dirty bits */ -#define IOMMU_DIRTY_NO_CLEAR (1 << 0) - /** * struct iommu_dirty_ops - domain specific dirty tracking operations * @set_dirty_tracking: Enable or Disable dirty tracking on the iommu domain I will sent out a patch. Thanks, Shameer