linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 9539/12880] drivers/iommu/io-pgtable-arm.c:772:50: error: 'IOMMU_DIRTY_NO_CLEAR' undeclared
@ 2024-07-12  8:20 kernel test robot
  2024-07-12 10:22 ` Shameerali Kolothum Thodi
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-07-12  8:20 UTC (permalink / raw)
  To: Shameer Kolothum
  Cc: oe-kbuild-all, Linux Memory Management List, Will Deacon,
	Ryan Roberts, Jason Gunthorpe, Kevin Tian

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@intel.com/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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407121602.HL9ih1it-lkp@intel.com/

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))
         |                                                  ^~~~~~~~~~~~~~~~~~~~
   drivers/iommu/io-pgtable-arm.c:772:50: note: each undeclared identifier is reported only once for each function it appears in


vim +/IOMMU_DIRTY_NO_CLEAR +772 drivers/iommu/io-pgtable-arm.c

   753	
   754	static int __arm_lpae_iopte_walk_dirty(struct arm_lpae_io_pgtable *data,
   755					       struct io_pgtable_walk_data *walk_data,
   756					       arm_lpae_iopte *ptep,
   757					       int lvl);
   758	
   759	static int io_pgtable_visit_dirty(struct arm_lpae_io_pgtable *data,
   760					  struct io_pgtable_walk_data *walk_data,
   761					  arm_lpae_iopte *ptep, int lvl)
   762	{
   763		struct io_pgtable *iop = &data->iop;
   764		arm_lpae_iopte pte = READ_ONCE(*ptep);
   765	
   766		if (iopte_leaf(pte, lvl, iop->fmt)) {
   767			size_t size = ARM_LPAE_BLOCK_SIZE(lvl, data);
   768	
   769			if (iopte_writeable_dirty(pte)) {
   770				iommu_dirty_bitmap_record(walk_data->dirty,
   771							  walk_data->addr, size);
 > 772				if (!(walk_data->flags & IOMMU_DIRTY_NO_CLEAR))
   773					iopte_set_writeable_clean(ptep);
   774			}
   775			walk_data->addr += size;
   776			return 0;
   777		}
   778	
   779		if (WARN_ON(!iopte_table(pte, lvl)))
   780			return -EINVAL;
   781	
   782		ptep = iopte_deref(pte, data);
   783		return __arm_lpae_iopte_walk_dirty(data, walk_data, ptep, lvl + 1);
   784	}
   785	

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [linux-next:master 9539/12880] drivers/iommu/io-pgtable-arm.c:772:50: error: 'IOMMU_DIRTY_NO_CLEAR' undeclared
  2024-07-12  8:20 [linux-next:master 9539/12880] drivers/iommu/io-pgtable-arm.c:772:50: error: 'IOMMU_DIRTY_NO_CLEAR' undeclared kernel test robot
@ 2024-07-12 10:22 ` Shameerali Kolothum Thodi
  0 siblings, 0 replies; 2+ messages in thread
From: Shameerali Kolothum Thodi @ 2024-07-12 10:22 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, Linux Memory Management List, Will Deacon,
	Ryan Roberts, Jason Gunthorpe, Kevin Tian



> -----Original Message-----
> From: kernel test robot <lkp@intel.com>
> Sent: Friday, July 12, 2024 9:21 AM
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
> Cc: oe-kbuild-all@lists.linux.dev; Linux Memory Management List <linux-
> mm@kvack.org>; Will Deacon <will@kernel.org>; Ryan Roberts
> <ryan.roberts@arm.com>; Jason Gunthorpe <jgg@nvidia.com>; Kevin Tian
> <kevin.tian@intel.com>
> 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@intel.com/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@intel.com/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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202407121602.HL9ih1it-
> lkp@intel.com/
> 
> 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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-12 10:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-12  8:20 [linux-next:master 9539/12880] drivers/iommu/io-pgtable-arm.c:772:50: error: 'IOMMU_DIRTY_NO_CLEAR' undeclared kernel test robot
2024-07-12 10:22 ` Shameerali Kolothum Thodi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox