From: kernel test robot <lkp@intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [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'?
Date: Wed, 29 Jan 2025 16:18:56 +0800 [thread overview]
Message-ID: <202501291628.UWEGyLaJ-lkp@intel.com> (raw)
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
reply other threads:[~2025-01-29 8:19 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=202501291628.UWEGyLaJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=jgg@nvidia.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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