Re: [PATCH v3 09/20] mm: swap: allocate a virtual swap slot for each swapped out page
From: kernel test robot
Date: Wed Feb 11 2026 - 08:44:11 EST
Hi Nhat,
kernel test robot noticed the following build errors:
[auto build test ERROR on 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b]
url: https://github.com/intel-lab-lkp/linux/commits/Nhat-Pham/mm-swap-decouple-swap-cache-from-physical-swap-infrastructure/20260209-120606
base: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
patch link: https://lore.kernel.org/r/20260208215839.87595-10-nphamcs%40gmail.com
patch subject: [PATCH v3 09/20] mm: swap: allocate a virtual swap slot for each swapped out page
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260211/202602111445.rP38hmwx-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260211/202602111445.rP38hmwx-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/202602111445.rP38hmwx-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from include/linux/local_lock.h:5,
from include/linux/mmzone.h:24,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/vswap.c:7:
mm/vswap.c: In function 'vswap_cpu_dead':
>> include/linux/percpu-defs.h:221:45: error: initialization from pointer to non-enclosed address space
221 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
| ^
include/linux/local_lock_internal.h:105:40: note: in definition of macro '__local_lock_acquire'
105 | __l = (local_lock_t *)(lock); \
| ^~~~
include/linux/local_lock.h:17:41: note: in expansion of macro '__local_lock'
17 | #define local_lock(lock) __local_lock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:245:9: note: in expansion of macro '__verify_pcpu_ptr'
245 | __verify_pcpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:256:27: note: in expansion of macro 'raw_cpu_ptr'
256 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/linux/local_lock.h:17:54: note: in expansion of macro 'this_cpu_ptr'
17 | #define local_lock(lock) __local_lock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
mm/vswap.c:653:9: note: in expansion of macro 'local_lock'
653 | local_lock(&percpu_cluster->lock);
| ^~~~~~~~~~
include/linux/percpu-defs.h:221:45: note: expected 'const __seg_gs void *' but pointer is of type 'local_lock_t *'
221 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
| ^
include/linux/local_lock_internal.h:105:40: note: in definition of macro '__local_lock_acquire'
105 | __l = (local_lock_t *)(lock); \
| ^~~~
include/linux/local_lock.h:17:41: note: in expansion of macro '__local_lock'
17 | #define local_lock(lock) __local_lock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:245:9: note: in expansion of macro '__verify_pcpu_ptr'
245 | __verify_pcpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:256:27: note: in expansion of macro 'raw_cpu_ptr'
256 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/linux/local_lock.h:17:54: note: in expansion of macro 'this_cpu_ptr'
17 | #define local_lock(lock) __local_lock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
mm/vswap.c:653:9: note: in expansion of macro 'local_lock'
653 | local_lock(&percpu_cluster->lock);
| ^~~~~~~~~~
>> include/linux/percpu-defs.h:221:45: error: initialization from pointer to non-enclosed address space
221 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
| ^
include/linux/local_lock_internal.h:107:27: note: in definition of macro '__local_lock_acquire'
107 | _Generic((lock), \
| ^~~~
include/linux/local_lock.h:17:41: note: in expansion of macro '__local_lock'
17 | #define local_lock(lock) __local_lock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:245:9: note: in expansion of macro '__verify_pcpu_ptr'
245 | __verify_pcpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:256:27: note: in expansion of macro 'raw_cpu_ptr'
256 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/linux/local_lock.h:17:54: note: in expansion of macro 'this_cpu_ptr'
17 | #define local_lock(lock) __local_lock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
mm/vswap.c:653:9: note: in expansion of macro 'local_lock'
653 | local_lock(&percpu_cluster->lock);
| ^~~~~~~~~~
include/linux/percpu-defs.h:221:45: note: expected 'const __seg_gs void *' but pointer is of type 'local_lock_t *'
221 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
| ^
include/linux/local_lock_internal.h:107:27: note: in definition of macro '__local_lock_acquire'
107 | _Generic((lock), \
| ^~~~
include/linux/local_lock.h:17:41: note: in expansion of macro '__local_lock'
17 | #define local_lock(lock) __local_lock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:245:9: note: in expansion of macro '__verify_pcpu_ptr'
245 | __verify_pcpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:256:27: note: in expansion of macro 'raw_cpu_ptr'
256 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/linux/local_lock.h:17:54: note: in expansion of macro 'this_cpu_ptr'
17 | #define local_lock(lock) __local_lock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
mm/vswap.c:653:9: note: in expansion of macro 'local_lock'
653 | local_lock(&percpu_cluster->lock);
| ^~~~~~~~~~
>> include/linux/percpu-defs.h:221:45: error: initialization from pointer to non-enclosed address space
221 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
| ^
include/linux/local_lock_internal.h:176:40: note: in definition of macro '__local_lock_release'
176 | __l = (local_lock_t *)(lock); \
| ^~~~
include/linux/local_lock.h:38:41: note: in expansion of macro '__local_unlock'
38 | #define local_unlock(lock) __local_unlock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~~~
include/linux/percpu-defs.h:245:9: note: in expansion of macro '__verify_pcpu_ptr'
245 | __verify_pcpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:256:27: note: in expansion of macro 'raw_cpu_ptr'
256 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/linux/local_lock.h:38:56: note: in expansion of macro 'this_cpu_ptr'
38 | #define local_unlock(lock) __local_unlock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
mm/vswap.c:665:9: note: in expansion of macro 'local_unlock'
665 | local_unlock(&percpu_cluster->lock);
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:221:45: note: expected 'const __seg_gs void *' but pointer is of type 'local_lock_t *'
221 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
| ^
include/linux/local_lock_internal.h:176:40: note: in definition of macro '__local_lock_release'
176 | __l = (local_lock_t *)(lock); \
| ^~~~
include/linux/local_lock.h:38:41: note: in expansion of macro '__local_unlock'
38 | #define local_unlock(lock) __local_unlock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~~~
include/linux/percpu-defs.h:245:9: note: in expansion of macro '__verify_pcpu_ptr'
245 | __verify_pcpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:256:27: note: in expansion of macro 'raw_cpu_ptr'
256 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/linux/local_lock.h:38:56: note: in expansion of macro 'this_cpu_ptr'
38 | #define local_unlock(lock) __local_unlock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
mm/vswap.c:665:9: note: in expansion of macro 'local_unlock'
665 | local_unlock(&percpu_cluster->lock);
| ^~~~~~~~~~~~
>> include/linux/percpu-defs.h:221:45: error: initialization from pointer to non-enclosed address space
221 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
| ^
include/linux/local_lock_internal.h:179:27: note: in definition of macro '__local_lock_release'
179 | _Generic((lock), \
| ^~~~
include/linux/local_lock.h:38:41: note: in expansion of macro '__local_unlock'
38 | #define local_unlock(lock) __local_unlock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~~~
include/linux/percpu-defs.h:245:9: note: in expansion of macro '__verify_pcpu_ptr'
245 | __verify_pcpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:256:27: note: in expansion of macro 'raw_cpu_ptr'
256 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/linux/local_lock.h:38:56: note: in expansion of macro 'this_cpu_ptr'
38 | #define local_unlock(lock) __local_unlock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
mm/vswap.c:665:9: note: in expansion of macro 'local_unlock'
665 | local_unlock(&percpu_cluster->lock);
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:221:45: note: expected 'const __seg_gs void *' but pointer is of type 'local_lock_t *'
221 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
| ^
include/linux/local_lock_internal.h:179:27: note: in definition of macro '__local_lock_release'
179 | _Generic((lock), \
| ^~~~
include/linux/local_lock.h:38:41: note: in expansion of macro '__local_unlock'
38 | #define local_unlock(lock) __local_unlock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~~~
include/linux/percpu-defs.h:245:9: note: in expansion of macro '__verify_pcpu_ptr'
245 | __verify_pcpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:256:27: note: in expansion of macro 'raw_cpu_ptr'
256 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/linux/local_lock.h:38:56: note: in expansion of macro 'this_cpu_ptr'
38 | #define local_unlock(lock) __local_unlock(this_cpu_ptr(lock))
| ^~~~~~~~~~~~
mm/vswap.c:665:9: note: in expansion of macro 'local_unlock'
665 | local_unlock(&percpu_cluster->lock);
| ^~~~~~~~~~~~
vim +221 include/linux/percpu-defs.h
62fde54123fb64 Tejun Heo 2014-06-17 207
9c28278a24c01c Tejun Heo 2014-06-17 208 /*
6fbc07bbe2b5a8 Tejun Heo 2014-06-17 209 * __verify_pcpu_ptr() verifies @ptr is a percpu pointer without evaluating
6fbc07bbe2b5a8 Tejun Heo 2014-06-17 210 * @ptr and is invoked once before a percpu area is accessed by all
6fbc07bbe2b5a8 Tejun Heo 2014-06-17 211 * accessors and operations. This is performed in the generic part of
6fbc07bbe2b5a8 Tejun Heo 2014-06-17 212 * percpu and arch overrides don't need to worry about it; however, if an
6fbc07bbe2b5a8 Tejun Heo 2014-06-17 213 * arch wants to implement an arch-specific percpu accessor or operation,
6fbc07bbe2b5a8 Tejun Heo 2014-06-17 214 * it may use __verify_pcpu_ptr() to verify the parameters.
9c28278a24c01c Tejun Heo 2014-06-17 215 *
9c28278a24c01c Tejun Heo 2014-06-17 216 * + 0 is required in order to convert the pointer type from a
9c28278a24c01c Tejun Heo 2014-06-17 217 * potential array type to a pointer to a single item of the array.
9c28278a24c01c Tejun Heo 2014-06-17 218 */
eba117889ac444 Tejun Heo 2014-06-17 219 #define __verify_pcpu_ptr(ptr) \
eba117889ac444 Tejun Heo 2014-06-17 220 do { \
9c28278a24c01c Tejun Heo 2014-06-17 @221 const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
9c28278a24c01c Tejun Heo 2014-06-17 222 (void)__vpp_verify; \
9c28278a24c01c Tejun Heo 2014-06-17 223 } while (0)
9c28278a24c01c Tejun Heo 2014-06-17 224
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki