* [linux-next:master 6102/7200] include/linux/mmzone.h:1160:29: error: use of undeclared identifier 'PUD_SHIFT'
@ 2026-09-25 10:07 kernel test robot
2026-09-26 11:54 ` Muchun Song
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-09-25 10:07 UTC (permalink / raw)
To: Muchun Song; +Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 4c253ac4b29b8c6cc6fdef8f92d4facde62e63b9
commit: 83c71ba4895fcfd11ec4746d0ef1585c70deb325 [6102/7200] mm/sparse-vmemmap: factor out shared vmemmap tail page allocation
config: riscv-randconfig-r2106-20260925 (https://download.01.org/0day-ci/archive/20260925/202609251257.WwH2kzxF-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260925/202609251257.WwH2kzxF-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/202609251257.WwH2kzxF-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/riscv/kernel/asm-offsets.c:9:
In file included from include/linux/mm.h:8:
In file included from include/linux/gfp.h:7:
>> include/linux/mmzone.h:1160:29: error: use of undeclared identifier 'PUD_SHIFT'
1160 | struct page *vmemmap_tails[VMEMMAP_OPTIMIZATION_NR_ORDERS];
| ^
include/linux/mmzone.h:119:4: note: expanded from macro 'VMEMMAP_OPTIMIZATION_NR_ORDERS'
119 | ((__VMEMMAP_OPTIMIZATION_NR_ORDERS > 0 && \
| ^
include/linux/mmzone.h:117:3: note: expanded from macro '__VMEMMAP_OPTIMIZATION_NR_ORDERS'
117 | (MAX_FOLIO_ORDER - VMEMMAP_OPTIMIZATION_MIN_ORDER + 1)
| ^
include/linux/mmzone.h:94:27: note: expanded from macro 'MAX_FOLIO_ORDER'
94 | #define MAX_FOLIO_ORDER (PUD_SHIFT - PAGE_SHIFT)
| ^
>> include/linux/mmzone.h:1160:29: error: use of undeclared identifier 'PUD_SHIFT'
include/linux/mmzone.h:120:57: note: expanded from macro 'VMEMMAP_OPTIMIZATION_NR_ORDERS'
120 | IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP_OPTIMIZATION)) ? __VMEMMAP_OPTIMIZATION_NR_ORDERS : 0)
| ^
include/linux/mmzone.h:117:3: note: expanded from macro '__VMEMMAP_OPTIMIZATION_NR_ORDERS'
117 | (MAX_FOLIO_ORDER - VMEMMAP_OPTIMIZATION_MIN_ORDER + 1)
| ^
include/linux/mmzone.h:94:27: note: expanded from macro 'MAX_FOLIO_ORDER'
94 | #define MAX_FOLIO_ORDER (PUD_SHIFT - PAGE_SHIFT)
| ^
In file included from arch/riscv/kernel/asm-offsets.c:9:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:98:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
98 | return (set->sig[3] | set->sig[2] |
| ^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
62 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/riscv/kernel/asm-offsets.c:9:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:98:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
98 | return (set->sig[3] | set->sig[2] |
| ^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
62 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/riscv/kernel/asm-offsets.c:9:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:99:4: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
99 | set->sig[1] | set->sig[0]) == 0;
| ^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
62 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/riscv/kernel/asm-offsets.c:9:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:101:11: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
101 | return (set->sig[1] | set->sig[0]) == 0;
| ^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
62 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/riscv/kernel/asm-offsets.c:9:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:114:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
114 | return (set1->sig[3] == set2->sig[3]) &&
| ^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
62 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/riscv/kernel/asm-offsets.c:9:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:114:27: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
114 | return (set1->sig[3] == set2->sig[3]) &&
| ^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
62 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/riscv/kernel/asm-offsets.c:9:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:115:5: warning: array index 2 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
115 | (set1->sig[2] == set2->sig[2]) &&
| ^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
62 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/riscv/kernel/asm-offsets.c:9:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:115:21: warning: array index 2 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
115 | (set1->sig[2] == set2->sig[2]) &&
| ^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
62 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/riscv/kernel/asm-offsets.c:9:
In file included from include/linux/mm.h:36:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:116:5: warning: array index 1 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
116 | (set1->sig[1] == set2->sig[1]) &&
| ^ ~
include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
62 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/riscv/kernel/asm-offsets.c:9:
vim +/PUD_SHIFT +1160 include/linux/mmzone.h
3484b2de9499df Mel Gorman 2014-08-06 1152
7cf91a98e607c2 Joonsoo Kim 2016-03-15 1153 bool contiguous;
7cf91a98e607c2 Joonsoo Kim 2016-03-15 1154
e6ad640bc404eb Shakeel Butt 2022-08-26 1155 CACHELINE_PADDING(_pad3_);
3484b2de9499df Mel Gorman 2014-08-06 1156 /* Zone statistics */
3484b2de9499df Mel Gorman 2014-08-06 1157 atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
f19298b9516c1a Mel Gorman 2021-06-28 1158 atomic_long_t vm_numa_event[NR_VM_NUMA_EVENT_ITEMS];
83c71ba4895fcf Muchun Song 2026-09-11 1159 #ifdef CONFIG_SPARSEMEM_VMEMMAP
e1b6218149da3f Muchun Song 2026-09-10 @1160 struct page *vmemmap_tails[VMEMMAP_OPTIMIZATION_NR_ORDERS];
622026e87c4019 Kiryl Shutsemau 2026-02-27 1161 #endif
22fc6eccbf4ce4 Ravikiran G Thirumalai 2006-01-08 1162 } ____cacheline_internodealigned_in_smp;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1163
:::::: The code at line 1160 was first introduced by commit
:::::: e1b6218149da3f0eef54e9466e3b31ec47d3c991 mm/sparse-vmemmap: rename HVO order macros
:::::: TO: Muchun Song <songmuchun@bytedance.com>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>
--
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 6102/7200] include/linux/mmzone.h:1160:29: error: use of undeclared identifier 'PUD_SHIFT'
2026-09-25 10:07 [linux-next:master 6102/7200] include/linux/mmzone.h:1160:29: error: use of undeclared identifier 'PUD_SHIFT' kernel test robot
@ 2026-09-26 11:54 ` Muchun Song
0 siblings, 0 replies; 2+ messages in thread
From: Muchun Song @ 2026-09-26 11:54 UTC (permalink / raw)
To: kernel test robot
Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List
On Fri, Sep 25, 2026 at 6:07 PM kernel test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 4c253ac4b29b8c6cc6fdef8f92d4facde62e63b9
> commit: 83c71ba4895fcfd11ec4746d0ef1585c70deb325 [6102/7200] mm/sparse-vmemmap: factor out shared vmemmap tail page allocation
> config: riscv-randconfig-r2106-20260925 (https://download.01.org/0day-ci/archive/20260925/202609251257.WwH2kzxF-lkp@intel.com/config)
> compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260925/202609251257.WwH2kzxF-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/202609251257.WwH2kzxF-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> In file included from arch/riscv/kernel/asm-offsets.c:9:
> In file included from include/linux/mm.h:8:
> In file included from include/linux/gfp.h:7:
> >> include/linux/mmzone.h:1160:29: error: use of undeclared identifier 'PUD_SHIFT'
Thanks for the report.
The failure is caused by using VMEMMAP_OPTIMIZATION_NR_ORDERS
as the size of the per-zone vmemmap_tails array in mmzone.h.
The macro expands MAX_FOLIO_ORDER to PUD_SHIFT - PAGE_SHIFT.
However, mmzone.h can be included before the architecture page
table definitions, so PUD_SHIFT is not available at that point.
That said, a simple fix may be difficult to achieve, since the header dependency
problem is hard to resolve. A prerequisite dependency patch is needed to avoid
this kind of header dependency issue. Therefore, I will update a new version of
this series (mm: Switch device DAX to section-based vmemmap optimization) as
soon as possible to fix this problem.
Thanks,
Muchun
> 1160 | struct page *vmemmap_tails[VMEMMAP_OPTIMIZATION_NR_ORDERS];
> | ^
> include/linux/mmzone.h:119:4: note: expanded from macro 'VMEMMAP_OPTIMIZATION_NR_ORDERS'
> 119 | ((__VMEMMAP_OPTIMIZATION_NR_ORDERS > 0 && \
> | ^
> include/linux/mmzone.h:117:3: note: expanded from macro '__VMEMMAP_OPTIMIZATION_NR_ORDERS'
> 117 | (MAX_FOLIO_ORDER - VMEMMAP_OPTIMIZATION_MIN_ORDER + 1)
> | ^
> include/linux/mmzone.h:94:27: note: expanded from macro 'MAX_FOLIO_ORDER'
> 94 | #define MAX_FOLIO_ORDER (PUD_SHIFT - PAGE_SHIFT)
> | ^
> >> include/linux/mmzone.h:1160:29: error: use of undeclared identifier 'PUD_SHIFT'
> include/linux/mmzone.h:120:57: note: expanded from macro 'VMEMMAP_OPTIMIZATION_NR_ORDERS'
> 120 | IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP_OPTIMIZATION)) ? __VMEMMAP_OPTIMIZATION_NR_ORDERS : 0)
> | ^
> include/linux/mmzone.h:117:3: note: expanded from macro '__VMEMMAP_OPTIMIZATION_NR_ORDERS'
> 117 | (MAX_FOLIO_ORDER - VMEMMAP_OPTIMIZATION_MIN_ORDER + 1)
> | ^
> include/linux/mmzone.h:94:27: note: expanded from macro 'MAX_FOLIO_ORDER'
> 94 | #define MAX_FOLIO_ORDER (PUD_SHIFT - PAGE_SHIFT)
> | ^
> In file included from arch/riscv/kernel/asm-offsets.c:9:
> In file included from include/linux/mm.h:36:
> In file included from include/linux/rcuwait.h:6:
> In file included from include/linux/sched/signal.h:6:
> include/linux/signal.h:98:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
> 98 | return (set->sig[3] | set->sig[2] |
> | ^ ~
> include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
> 62 | unsigned long sig[_NSIG_WORDS];
> | ^
> In file included from arch/riscv/kernel/asm-offsets.c:9:
> In file included from include/linux/mm.h:36:
> In file included from include/linux/rcuwait.h:6:
> In file included from include/linux/sched/signal.h:6:
> include/linux/signal.h:98:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
> 98 | return (set->sig[3] | set->sig[2] |
> | ^ ~
> include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
> 62 | unsigned long sig[_NSIG_WORDS];
> | ^
> In file included from arch/riscv/kernel/asm-offsets.c:9:
> In file included from include/linux/mm.h:36:
> In file included from include/linux/rcuwait.h:6:
> In file included from include/linux/sched/signal.h:6:
> include/linux/signal.h:99:4: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
> 99 | set->sig[1] | set->sig[0]) == 0;
> | ^ ~
> include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
> 62 | unsigned long sig[_NSIG_WORDS];
> | ^
> In file included from arch/riscv/kernel/asm-offsets.c:9:
> In file included from include/linux/mm.h:36:
> In file included from include/linux/rcuwait.h:6:
> In file included from include/linux/sched/signal.h:6:
> include/linux/signal.h:101:11: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
> 101 | return (set->sig[1] | set->sig[0]) == 0;
> | ^ ~
> include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
> 62 | unsigned long sig[_NSIG_WORDS];
> | ^
> In file included from arch/riscv/kernel/asm-offsets.c:9:
> In file included from include/linux/mm.h:36:
> In file included from include/linux/rcuwait.h:6:
> In file included from include/linux/sched/signal.h:6:
> include/linux/signal.h:114:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
> 114 | return (set1->sig[3] == set2->sig[3]) &&
> | ^ ~
> include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
> 62 | unsigned long sig[_NSIG_WORDS];
> | ^
> In file included from arch/riscv/kernel/asm-offsets.c:9:
> In file included from include/linux/mm.h:36:
> In file included from include/linux/rcuwait.h:6:
> In file included from include/linux/sched/signal.h:6:
> include/linux/signal.h:114:27: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
> 114 | return (set1->sig[3] == set2->sig[3]) &&
> | ^ ~
> include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
> 62 | unsigned long sig[_NSIG_WORDS];
> | ^
> In file included from arch/riscv/kernel/asm-offsets.c:9:
> In file included from include/linux/mm.h:36:
> In file included from include/linux/rcuwait.h:6:
> In file included from include/linux/sched/signal.h:6:
> include/linux/signal.h:115:5: warning: array index 2 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
> 115 | (set1->sig[2] == set2->sig[2]) &&
> | ^ ~
> include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
> 62 | unsigned long sig[_NSIG_WORDS];
> | ^
> In file included from arch/riscv/kernel/asm-offsets.c:9:
> In file included from include/linux/mm.h:36:
> In file included from include/linux/rcuwait.h:6:
> In file included from include/linux/sched/signal.h:6:
> include/linux/signal.h:115:21: warning: array index 2 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
> 115 | (set1->sig[2] == set2->sig[2]) &&
> | ^ ~
> include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
> 62 | unsigned long sig[_NSIG_WORDS];
> | ^
> In file included from arch/riscv/kernel/asm-offsets.c:9:
> In file included from include/linux/mm.h:36:
> In file included from include/linux/rcuwait.h:6:
> In file included from include/linux/sched/signal.h:6:
> include/linux/signal.h:116:5: warning: array index 1 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
> 116 | (set1->sig[1] == set2->sig[1]) &&
> | ^ ~
> include/uapi/asm-generic/signal.h:62:2: note: array 'sig' declared here
> 62 | unsigned long sig[_NSIG_WORDS];
> | ^
> In file included from arch/riscv/kernel/asm-offsets.c:9:
>
>
> vim +/PUD_SHIFT +1160 include/linux/mmzone.h
>
> 3484b2de9499df Mel Gorman 2014-08-06 1152
> 7cf91a98e607c2 Joonsoo Kim 2016-03-15 1153 bool contiguous;
> 7cf91a98e607c2 Joonsoo Kim 2016-03-15 1154
> e6ad640bc404eb Shakeel Butt 2022-08-26 1155 CACHELINE_PADDING(_pad3_);
> 3484b2de9499df Mel Gorman 2014-08-06 1156 /* Zone statistics */
> 3484b2de9499df Mel Gorman 2014-08-06 1157 atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
> f19298b9516c1a Mel Gorman 2021-06-28 1158 atomic_long_t vm_numa_event[NR_VM_NUMA_EVENT_ITEMS];
> 83c71ba4895fcf Muchun Song 2026-09-11 1159 #ifdef CONFIG_SPARSEMEM_VMEMMAP
> e1b6218149da3f Muchun Song 2026-09-10 @1160 struct page *vmemmap_tails[VMEMMAP_OPTIMIZATION_NR_ORDERS];
> 622026e87c4019 Kiryl Shutsemau 2026-02-27 1161 #endif
> 22fc6eccbf4ce4 Ravikiran G Thirumalai 2006-01-08 1162 } ____cacheline_internodealigned_in_smp;
> ^1da177e4c3f41 Linus Torvalds 2005-04-16 1163
>
> :::::: The code at line 1160 was first introduced by commit
> :::::: e1b6218149da3f0eef54e9466e3b31ec47d3c991 mm/sparse-vmemmap: rename HVO order macros
>
> :::::: TO: Muchun Song <songmuchun@bytedance.com>
> :::::: CC: Andrew Morton <akpm@linux-foundation.org>
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-26 11:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-25 10:07 [linux-next:master 6102/7200] include/linux/mmzone.h:1160:29: error: use of undeclared identifier 'PUD_SHIFT' kernel test robot
2026-09-26 11:54 ` Muchun Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox