* [jgunthorpe:iommu_pages 6/20] drivers/iommu/iommu-pages.c:38:40: error: use of undeclared identifier 'NR_IOMMU_PAGES'; did you mean 'NR_MEMMAP_PAGES'?
@ 2025-01-29 8:18 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-29 8:18 UTC (permalink / raw)
To: Jason Gunthorpe; +Cc: llvm, oe-kbuild-all
tree: https://github.com/jgunthorpe/linux iommu_pages
head: 470a82a6588cba1a19210a78a710620a15b6019b
commit: 6c72aac62af905e9c969c12aa399d8bed4b4d033 [6/20] iommu/pages: De-inline the substantial functions
config: hexagon-randconfig-002-20250129 (https://download.01.org/0day-ci/archive/20250129/202501291628.UWEGyLaJ-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 19306351a2c45e266fa11b41eb1362b20b6ca56d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250129/202501291628.UWEGyLaJ-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/202501291628.UWEGyLaJ-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/iommu/iommu-pages.c:38:40: error: use of undeclared identifier 'NR_IOMMU_PAGES'; did you mean 'NR_MEMMAP_PAGES'?
38 | mod_node_page_state(page_pgdat(page), NR_IOMMU_PAGES, pgcnt);
| ^~~~~~~~~~~~~~
| NR_MEMMAP_PAGES
include/linux/vmstat.h:42:2: note: 'NR_MEMMAP_PAGES' declared here
42 | NR_MEMMAP_PAGES, /* page metadata allocated through buddy allocator */
| ^
drivers/iommu/iommu-pages.c:38:40: warning: implicit conversion from enumeration type 'enum vm_stat_item' to different enumeration type 'enum node_stat_item' [-Wenum-conversion]
38 | mod_node_page_state(page_pgdat(page), NR_IOMMU_PAGES, pgcnt);
| ~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~
drivers/iommu/iommu-pages.c:50:40: error: use of undeclared identifier 'NR_IOMMU_PAGES'; did you mean 'NR_MEMMAP_PAGES'?
50 | mod_node_page_state(page_pgdat(page), NR_IOMMU_PAGES, -pgcnt);
| ^~~~~~~~~~~~~~
| NR_MEMMAP_PAGES
include/linux/vmstat.h:42:2: note: 'NR_MEMMAP_PAGES' declared here
42 | NR_MEMMAP_PAGES, /* page metadata allocated through buddy allocator */
| ^
drivers/iommu/iommu-pages.c:50:40: warning: implicit conversion from enumeration type 'enum vm_stat_item' to different enumeration type 'enum node_stat_item' [-Wenum-conversion]
50 | mod_node_page_state(page_pgdat(page), NR_IOMMU_PAGES, -pgcnt);
| ~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~
2 warnings and 2 errors generated.
vim +38 drivers/iommu/iommu-pages.c
9
10 /**
11 * iommu_alloc_pages_node - Allocate a zeroed page of a given order from
12 * specific NUMA node
13 * @nid: memory NUMA node id
14 * @gfp: buddy allocator flags
15 * @order: page order
16 *
17 * Returns the virtual address of the allocated page. The page must be
18 * freed either by calling iommu_free_page() or via iommu_put_pages_list().
19 */
20 void *iommu_alloc_pages_node(int nid, gfp_t gfp, unsigned int order)
21 {
22 const unsigned long pgcnt = 1UL << order;
23 struct page *page;
24
25 page = alloc_pages_node(nid, gfp | __GFP_ZERO | __GFP_COMP, order);
26 if (unlikely(!page))
27 return NULL;
28
29 /*
30 * All page allocations that should be reported to as "iommu-pagetables"
31 * to userspace must use one of the functions below. This includes
32 * allocations of page-tables and other per-iommu_domain configuration
33 * structures.
34 *
35 * This is necessary for the proper accounting as IOMMU state can be
36 * rather large, i.e. multiple gigabytes in size.
37 */
> 38 mod_node_page_state(page_pgdat(page), NR_IOMMU_PAGES, pgcnt);
39 mod_lruvec_page_state(page, NR_SECONDARY_PAGETABLE, pgcnt);
40
41 return page_address(page);
42 }
43 EXPORT_SYMBOL_GPL(iommu_alloc_pages_node);
44
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-29 8:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-29 8:18 [jgunthorpe:iommu_pages 6/20] drivers/iommu/iommu-pages.c:38:40: error: use of undeclared identifier 'NR_IOMMU_PAGES'; did you mean 'NR_MEMMAP_PAGES'? kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox