[PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST

Sasha Levin posted 1 patch 2 days, 17 hours ago
There is a newer version of this series
kernel/liveupdate/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
Posted by Sasha Levin 2 days, 17 hours ago
Currently allmodconfig sets CONFIG_DEFERRED_STRUCT_PAGE_INIT which prevents KHO
from building.

Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/liveupdate/Kconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig
index d2aeaf13c3acb..355b43492b8a4 100644
--- a/kernel/liveupdate/Kconfig
+++ b/kernel/liveupdate/Kconfig
@@ -1,14 +1,14 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
 menu "Live Update and Kexec HandOver"
-	depends on !DEFERRED_STRUCT_PAGE_INIT
+	depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
 
 config KEXEC_HANDOVER
 	bool "kexec handover"
-	depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE
-	depends on !DEFERRED_STRUCT_PAGE_INIT
+	depends on (ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE) || COMPILE_TEST
+	depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
 	select MEMBLOCK_KHO_SCRATCH
-	select KEXEC_FILE
+	select KEXEC_FILE if ARCH_SUPPORTS_KEXEC_FILE
 	select LIBFDT
 	select CMA
 	help
-- 
2.51.0
Re: [PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
Posted by kernel test robot 1 day, 23 hours ago
Hi Sasha,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.19-rc8 next-20260204]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sasha-Levin/kexec-allow-KEXEC_HANDOVER-to-build-with-COMPILE_TEST/20260205-023202
base:   linus/master
patch link:    https://lore.kernel.org/r/20260204182816.2463931-1-sashal%40kernel.org
patch subject: [PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
config: sh-kismet-CONFIG_CMA-CONFIG_KEXEC_HANDOVER-0-0 (https://download.01.org/0day-ci/archive/20260205/202602051345.Yz2vgJHk-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20260205/202602051345.Yz2vgJHk-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/202602051345.Yz2vgJHk-lkp@intel.com/

kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for CMA when selected by KEXEC_HANDOVER
   WARNING: unmet direct dependencies detected for CMA
     Depends on [n]: MMU [=n]
     Selected by [y]:
     - KEXEC_HANDOVER [=y] && (ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE || COMPILE_TEST [=y]) && (!DEFERRED_STRUCT_PAGE_INIT [=n] || COMPILE_TEST [=y])

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
Posted by Mike Rapoport 1 day, 23 hours ago
On Wed, Feb 04, 2026 at 01:28:16PM -0500, Sasha Levin wrote:
> Currently allmodconfig sets CONFIG_DEFERRED_STRUCT_PAGE_INIT which prevents KHO
> from building.
> 
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
>  kernel/liveupdate/Kconfig | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig
> index d2aeaf13c3acb..355b43492b8a4 100644
> --- a/kernel/liveupdate/Kconfig
> +++ b/kernel/liveupdate/Kconfig
> @@ -1,14 +1,14 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  
>  menu "Live Update and Kexec HandOver"
> -	depends on !DEFERRED_STRUCT_PAGE_INIT
> +	depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
>  
>  config KEXEC_HANDOVER
>  	bool "kexec handover"
> -	depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE
> -	depends on !DEFERRED_STRUCT_PAGE_INIT
> +	depends on (ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE) || COMPILE_TEST

I don't think we want to build this for all architectures.
Let's keep depends on ARCH_ as it was.

> +	depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
>  	select MEMBLOCK_KHO_SCRATCH
> -	select KEXEC_FILE
> +	select KEXEC_FILE if ARCH_SUPPORTS_KEXEC_FILE
>  	select LIBFDT
>  	select CMA
>  	help
> -- 
> 2.51.0
> 

-- 
Sincerely yours,
Mike.
Re: [PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
Posted by Pratyush Yadav 1 day, 23 hours ago
On Thu, Feb 05 2026, Mike Rapoport wrote:

> On Wed, Feb 04, 2026 at 01:28:16PM -0500, Sasha Levin wrote:
>> Currently allmodconfig sets CONFIG_DEFERRED_STRUCT_PAGE_INIT which prevents KHO
>> from building.
>> 
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>> ---
>>  kernel/liveupdate/Kconfig | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>> 
>> diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig
>> index d2aeaf13c3acb..355b43492b8a4 100644
>> --- a/kernel/liveupdate/Kconfig
>> +++ b/kernel/liveupdate/Kconfig
>> @@ -1,14 +1,14 @@
>>  # SPDX-License-Identifier: GPL-2.0-only
>>  
>>  menu "Live Update and Kexec HandOver"
>> -	depends on !DEFERRED_STRUCT_PAGE_INIT
>> +	depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
>>  
>>  config KEXEC_HANDOVER
>>  	bool "kexec handover"
>> -	depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE
>> -	depends on !DEFERRED_STRUCT_PAGE_INIT
>> +	depends on (ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE) || COMPILE_TEST
>
> I don't think we want to build this for all architectures.
> Let's keep depends on ARCH_ as it was.

Yep. All these test robot warnings are because a bunch of KHO/LUO code
assumes 64-bit arch.

>
>> +	depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
>>  	select MEMBLOCK_KHO_SCRATCH
>> -	select KEXEC_FILE
>> +	select KEXEC_FILE if ARCH_SUPPORTS_KEXEC_FILE

If arch does not support kexec_file we can't use KHO at all anyway. So I
am not sure if this makes sense.

>>  	select LIBFDT
>>  	select CMA
>>  	help
>> -- 
>> 2.51.0
>> 

-- 
Regards,
Pratyush Yadav
Re: [PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
Posted by kernel test robot 2 days, 9 hours ago
Hi Sasha,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.19-rc8 next-20260204]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sasha-Levin/kexec-allow-KEXEC_HANDOVER-to-build-with-COMPILE_TEST/20260205-023202
base:   linus/master
patch link:    https://lore.kernel.org/r/20260204182816.2463931-1-sashal%40kernel.org
patch subject: [PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
config: um-allyesconfig (https://download.01.org/0day-ci/archive/20260205/202602050952.VeOX2Uoh-lkp@intel.com/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/20260205/202602050952.VeOX2Uoh-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/202602050952.VeOX2Uoh-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/liveupdate/kexec_handover.c: In function 'kho_fill_kimage':
   kernel/liveupdate/kexec_handover.c:1547:26: error: storage size of 'scratch' isn't known
    1547 |         struct kexec_buf scratch;
         |                          ^~~~~~~
   kernel/liveupdate/kexec_handover.c:1552:14: error: invalid use of undefined type 'struct kimage'
    1552 |         image->kho.fdt = virt_to_phys(kho_out.fdt);
         |              ^~
   kernel/liveupdate/kexec_handover.c:1556:18: error: 'struct kexec_buf' has no member named 'image'
    1556 |                 .image = image,
         |                  ^~~~~
>> kernel/liveupdate/kexec_handover.c:1556:26: warning: excess elements in struct initializer
    1556 |                 .image = image,
         |                          ^~~~~
   kernel/liveupdate/kexec_handover.c:1556:26: note: (near initialization for '(anonymous)')
   kernel/liveupdate/kexec_handover.c:1557:18: error: 'struct kexec_buf' has no member named 'buffer'
    1557 |                 .buffer = kho_scratch,
         |                  ^~~~~~
   kernel/liveupdate/kexec_handover.c:1557:27: warning: excess elements in struct initializer
    1557 |                 .buffer = kho_scratch,
         |                           ^~~~~~~~~~~
   kernel/liveupdate/kexec_handover.c:1557:27: note: (near initialization for '(anonymous)')
   kernel/liveupdate/kexec_handover.c:1558:18: error: 'struct kexec_buf' has no member named 'bufsz'
    1558 |                 .bufsz = scratch_size,
         |                  ^~~~~
   kernel/liveupdate/kexec_handover.c:1558:26: warning: excess elements in struct initializer
    1558 |                 .bufsz = scratch_size,
         |                          ^~~~~~~~~~~~
   kernel/liveupdate/kexec_handover.c:1558:26: note: (near initialization for '(anonymous)')
   kernel/liveupdate/kexec_handover.c:1559:18: error: 'struct kexec_buf' has no member named 'mem'
    1559 |                 .mem = KEXEC_BUF_MEM_UNKNOWN,
         |                  ^~~
   kernel/liveupdate/kexec_handover.c:1559:24: error: 'KEXEC_BUF_MEM_UNKNOWN' undeclared (first use in this function)
    1559 |                 .mem = KEXEC_BUF_MEM_UNKNOWN,
         |                        ^~~~~~~~~~~~~~~~~~~~~
   kernel/liveupdate/kexec_handover.c:1559:24: note: each undeclared identifier is reported only once for each function it appears in
   kernel/liveupdate/kexec_handover.c:1559:24: warning: excess elements in struct initializer
   kernel/liveupdate/kexec_handover.c:1559:24: note: (near initialization for '(anonymous)')
   kernel/liveupdate/kexec_handover.c:1560:18: error: 'struct kexec_buf' has no member named 'memsz'
    1560 |                 .memsz = scratch_size,
         |                  ^~~~~
   kernel/liveupdate/kexec_handover.c:1560:26: warning: excess elements in struct initializer
    1560 |                 .memsz = scratch_size,
         |                          ^~~~~~~~~~~~
   kernel/liveupdate/kexec_handover.c:1560:26: note: (near initialization for '(anonymous)')
   kernel/liveupdate/kexec_handover.c:1561:18: error: 'struct kexec_buf' has no member named 'buf_align'
    1561 |                 .buf_align = SZ_64K, /* Makes it easier to map */
         |                  ^~~~~~~~~
   In file included from include/linux/mm.h:29,
                    from include/linux/pid_namespace.h:7,
                    from include/linux/ptrace.h:10,
                    from include/linux/elfcore.h:11,
                    from include/linux/vmcore_info.h:6,
                    from include/linux/kexec.h:18,
                    from kernel/liveupdate/kexec_handover.c:16:
>> include/linux/sizes.h:28:41: warning: excess elements in struct initializer
      28 | #define SZ_64K                          0x00010000
         |                                         ^~~~~~~~~~
   kernel/liveupdate/kexec_handover.c:1561:30: note: in expansion of macro 'SZ_64K'
    1561 |                 .buf_align = SZ_64K, /* Makes it easier to map */
         |                              ^~~~~~
   include/linux/sizes.h:28:41: note: (near initialization for '(anonymous)')
      28 | #define SZ_64K                          0x00010000
         |                                         ^~~~~~~~~~
   kernel/liveupdate/kexec_handover.c:1561:30: note: in expansion of macro 'SZ_64K'
    1561 |                 .buf_align = SZ_64K, /* Makes it easier to map */
         |                              ^~~~~~
   kernel/liveupdate/kexec_handover.c:1562:18: error: 'struct kexec_buf' has no member named 'buf_max'
    1562 |                 .buf_max = ULONG_MAX,
         |                  ^~~~~~~
   In file included from include/linux/limits.h:7,
                    from include/linux/overflow.h:6,
                    from include/linux/bits.h:32,
                    from include/linux/bitops.h:6,
                    from include/linux/bitmap.h:8,
                    from include/linux/nodemask.h:91,
                    from include/linux/numa.h:6,
                    from include/linux/cma.h:7,
                    from kernel/liveupdate/kexec_handover.c:13:
>> include/vdso/limits.h:13:25: warning: excess elements in struct initializer
      13 | #define ULONG_MAX       (~0UL)
         |                         ^
   kernel/liveupdate/kexec_handover.c:1562:28: note: in expansion of macro 'ULONG_MAX'
    1562 |                 .buf_max = ULONG_MAX,
         |                            ^~~~~~~~~
   include/vdso/limits.h:13:25: note: (near initialization for '(anonymous)')
      13 | #define ULONG_MAX       (~0UL)
         |                         ^
   kernel/liveupdate/kexec_handover.c:1562:28: note: in expansion of macro 'ULONG_MAX'
    1562 |                 .buf_max = ULONG_MAX,
         |                            ^~~~~~~~~
   kernel/liveupdate/kexec_handover.c:1563:18: error: 'struct kexec_buf' has no member named 'top_down'
    1563 |                 .top_down = true,
         |                  ^~~~~~~~
   kernel/liveupdate/kexec_handover.c:1563:29: warning: excess elements in struct initializer
    1563 |                 .top_down = true,
         |                             ^~~~
   kernel/liveupdate/kexec_handover.c:1563:29: note: (near initialization for '(anonymous)')
   kernel/liveupdate/kexec_handover.c:1555:37: error: invalid use of undefined type 'struct kexec_buf'
    1555 |         scratch = (struct kexec_buf){
         |                                     ^
   kernel/liveupdate/kexec_handover.c:1565:15: error: implicit declaration of function 'kexec_add_buffer' [-Wimplicit-function-declaration]
    1565 |         err = kexec_add_buffer(&scratch);
         |               ^~~~~~~~~~~~~~~~
   kernel/liveupdate/kexec_handover.c:1568:14: error: invalid use of undefined type 'struct kimage'
    1568 |         image->kho.scratch = &image->segment[image->nr_segments - 1];
         |              ^~
   kernel/liveupdate/kexec_handover.c:1568:36: error: invalid use of undefined type 'struct kimage'
    1568 |         image->kho.scratch = &image->segment[image->nr_segments - 1];
         |                                    ^~
   kernel/liveupdate/kexec_handover.c:1568:51: error: invalid use of undefined type 'struct kimage'
    1568 |         image->kho.scratch = &image->segment[image->nr_segments - 1];
         |                                                   ^~
>> kernel/liveupdate/kexec_handover.c:1547:26: warning: unused variable 'scratch' [-Wunused-variable]
    1547 |         struct kexec_buf scratch;
         |                          ^~~~~~~
   kernel/liveupdate/kexec_handover.c: In function 'kho_locate_mem_hole':
   kernel/liveupdate/kexec_handover.c:1599:32: error: invalid use of undefined type 'struct kexec_buf'
    1599 |         if (!kho_enable || kbuf->image->type == KEXEC_TYPE_CRASH)
         |                                ^~
   kernel/liveupdate/kexec_handover.c:1599:49: error: 'KEXEC_TYPE_CRASH' undeclared (first use in this function); did you mean 'KEXEC_ON_CRASH'?
    1599 |         if (!kho_enable || kbuf->image->type == KEXEC_TYPE_CRASH)
         |                                                 ^~~~~~~~~~~~~~~~
         |                                                 KEXEC_ON_CRASH


vim +1556 kernel/liveupdate/kexec_handover.c

3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1542  
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1543  int kho_fill_kimage(struct kimage *image)
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1544  {
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1545  	ssize_t scratch_size;
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1546  	int err = 0;
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09 @1547  	struct kexec_buf scratch;
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1548  
d7255959b69a4e kernel/liveupdate/kexec_handover.c Pasha Tatashin            2025-11-14  1549  	if (!kho_enable)
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1550  		return 0;
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1551  
70f9133096c833 kernel/kexec_handover.c            Mike Rapoport (Microsoft  2025-11-01  1552) 	image->kho.fdt = virt_to_phys(kho_out.fdt);
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1553  
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1554  	scratch_size = sizeof(*kho_scratch) * kho_scratch_cnt;
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1555  	scratch = (struct kexec_buf){
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09 @1556  		.image = image,
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1557  		.buffer = kho_scratch,
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1558  		.bufsz = scratch_size,
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1559  		.mem = KEXEC_BUF_MEM_UNKNOWN,
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1560  		.memsz = scratch_size,
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1561  		.buf_align = SZ_64K, /* Makes it easier to map */
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1562  		.buf_max = ULONG_MAX,
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1563  		.top_down = true,
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1564  	};
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1565  	err = kexec_add_buffer(&scratch);
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1566  	if (err)
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1567  		return err;
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09 @1568  	image->kho.scratch = &image->segment[image->nr_segments - 1];
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1569  
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1570  	return 0;
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1571  }
3bdecc3c93f9f6 kernel/kexec_handover.c            Alexander Graf            2025-05-09  1572  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
Posted by kernel test robot 2 days, 9 hours ago
Hi Sasha,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.19-rc8 next-20260204]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sasha-Levin/kexec-allow-KEXEC_HANDOVER-to-build-with-COMPILE_TEST/20260205-023202
base:   linus/master
patch link:    https://lore.kernel.org/r/20260204182816.2463931-1-sashal%40kernel.org
patch subject: [PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20260205/202602051021.dhUjHKwO-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/20260205/202602051021.dhUjHKwO-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/202602051021.dhUjHKwO-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> mm/memfd_luo.c:316:10: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
     315 |                         pr_warn_ratelimited("Unable to restore folio at physical address: %llx\n",
         |                                                                                           ~~~~
         |                                                                                           %x
     316 |                                             phys);
         |                                             ^~~~
   include/linux/printk.h:722:49: note: expanded from macro 'pr_warn_ratelimited'
     722 |         printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |                                                ~~~     ^~~~~~~~~~~
   include/linux/printk.h:706:17: note: expanded from macro 'printk_ratelimited'
     706 |                 printk(fmt, ##__VA_ARGS__);                             \
         |                        ~~~    ^~~~~~~~~~~
   include/linux/printk.h:512:60: note: expanded from macro 'printk'
     512 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:484:19: note: expanded from macro 'printk_index_wrap'
     484 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   mm/memfd_luo.c:372:11: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
     371 |                         pr_err("Unable to restore folio at physical address: %llx\n",
         |                                                                              ~~~~
         |                                                                              %x
     372 |                                phys);
         |                                ^~~~
   include/linux/printk.h:555:33: note: expanded from macro 'pr_err'
     555 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |                                ~~~     ^~~~~~~~~~~
   include/linux/printk.h:512:60: note: expanded from macro 'printk'
     512 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:484:19: note: expanded from macro 'printk_index_wrap'
     484 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   2 warnings generated.
--
>> kernel/liveupdate/kexec_handover.c:25:10: fatal error: 'asm/early_ioremap.h' file not found
      25 | #include <asm/early_ioremap.h>
         |          ^~~~~~~~~~~~~~~~~~~~~
   1 error generated.
--
>> kernel/liveupdate/kexec_handover_debugfs.c:99:29: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
      99 |                 seq_printf(m, "0x%llx\n", kho_scratch[i].addr);
         |                                  ~~~~     ^~~~~~~~~~~~~~~~~~~
         |                                  %x
   kernel/liveupdate/kexec_handover_debugfs.c:108:29: warning: format specifies type 'unsigned long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
     108 |                 seq_printf(m, "0x%llx\n", kho_scratch[i].size);
         |                                  ~~~~     ^~~~~~~~~~~~~~~~~~~
         |                                  %x
   2 warnings generated.


vim +25 kernel/liveupdate/kexec_handover.c

c609c144b0e8db kernel/kexec_handover.c Alexander Graf 2025-05-09  24  
c609c144b0e8db kernel/kexec_handover.c Alexander Graf 2025-05-09 @25  #include <asm/early_ioremap.h>
c609c144b0e8db kernel/kexec_handover.c Alexander Graf 2025-05-09  26  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
Posted by kernel test robot 2 days, 11 hours ago
Hi Sasha,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.19-rc8 next-20260204]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sasha-Levin/kexec-allow-KEXEC_HANDOVER-to-build-with-COMPILE_TEST/20260205-023202
base:   linus/master
patch link:    https://lore.kernel.org/r/20260204182816.2463931-1-sashal%40kernel.org
patch subject: [PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20260205/202602050807.0QRxP8b3-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260205/202602050807.0QRxP8b3-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/202602050807.0QRxP8b3-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/liveupdate/kexec_handover_debugfs.c: In function 'scratch_phys_show':
>> kernel/liveupdate/kexec_handover_debugfs.c:99:37: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' {aka 'unsigned int'} [-Wformat=]
      99 |                 seq_printf(m, "0x%llx\n", kho_scratch[i].addr);
         |                                  ~~~^     ~~~~~~~~~~~~~~~~~~~
         |                                     |                   |
         |                                     |                   phys_addr_t {aka unsigned int}
         |                                     long long unsigned int
         |                                  %x
   kernel/liveupdate/kexec_handover_debugfs.c: In function 'scratch_len_show':
   kernel/liveupdate/kexec_handover_debugfs.c:108:37: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t' {aka 'unsigned int'} [-Wformat=]
     108 |                 seq_printf(m, "0x%llx\n", kho_scratch[i].size);
         |                                  ~~~^     ~~~~~~~~~~~~~~~~~~~
         |                                     |                   |
         |                                     |                   phys_addr_t {aka unsigned int}
         |                                     long long unsigned int
         |                                  %x
   In file included from include/linux/io.h:12,
                    from kernel/liveupdate/kexec_handover_debugfs.c:13:
   kernel/liveupdate/kexec_handover_debugfs.c: In function 'kho_in_debugfs_init':
>> arch/sh/include/asm/io.h:266:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     266 | #define phys_to_virt(address)   ((void *)(address))
         |                                  ^
   kernel/liveupdate/kexec_handover_debugfs.c:151:45: note: in expansion of macro 'phys_to_virt'
     151 |                                             phys_to_virt(*fdt_phys));
         |                                             ^~~~~~~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for CMA
   Depends on [n]: MMU [=n]
   Selected by [y]:
   - KEXEC_HANDOVER [=y] && (ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE || COMPILE_TEST [=y]) && (!DEFERRED_STRUCT_PAGE_INIT [=n] || COMPILE_TEST [=y])


vim +99 kernel/liveupdate/kexec_handover_debugfs.c

03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01   92  
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01   93  DEFINE_DEBUGFS_ATTRIBUTE(kho_out_finalize_fops, kho_out_finalize_get,
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01   94  			 kho_out_finalize_set, "%llu\n");
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01   95  
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01   96  static int scratch_phys_show(struct seq_file *m, void *v)
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01   97  {
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01   98  	for (int i = 0; i < kho_scratch_cnt; i++)
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01  @99  		seq_printf(m, "0x%llx\n", kho_scratch[i].addr);
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01  100  
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01  101  	return 0;
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01  102  }
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01  103  DEFINE_SHOW_ATTRIBUTE(scratch_phys);
03d3963464a436 kernel/kexec_handover_debugfs.c Pasha Tatashin 2025-11-01  104  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
Posted by Suren Baghdasaryan 2 days, 13 hours ago
On Wed, Feb 4, 2026 at 10:28 AM Sasha Levin <sashal@kernel.org> wrote:
>
> Currently allmodconfig sets CONFIG_DEFERRED_STRUCT_PAGE_INIT which prevents KHO
> from building.
>
> Signed-off-by: Sasha Levin <sashal@kernel.org>

Ok, now allmodconfig enables CONFIG_KEXEC_HANDOVER and I can see the
breakage Greg was talking about in
https://lore.kernel.org/all/2026020419-extortion-swinging-6394@gregkh/

Tested-by: Suren Baghdasaryan <surenb@google.com>

> ---
>  kernel/liveupdate/Kconfig | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig
> index d2aeaf13c3acb..355b43492b8a4 100644
> --- a/kernel/liveupdate/Kconfig
> +++ b/kernel/liveupdate/Kconfig
> @@ -1,14 +1,14 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>
>  menu "Live Update and Kexec HandOver"
> -       depends on !DEFERRED_STRUCT_PAGE_INIT
> +       depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
>
>  config KEXEC_HANDOVER
>         bool "kexec handover"
> -       depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE
> -       depends on !DEFERRED_STRUCT_PAGE_INIT
> +       depends on (ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE) || COMPILE_TEST
> +       depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
>         select MEMBLOCK_KHO_SCRATCH
> -       select KEXEC_FILE
> +       select KEXEC_FILE if ARCH_SUPPORTS_KEXEC_FILE
>         select LIBFDT
>         select CMA
>         help
> --
> 2.51.0
>
[PATCH v2] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
Posted by Sasha Levin 14 hours ago
Currently allmodconfig sets CONFIG_DEFERRED_STRUCT_PAGE_INIT which prevents KHO
from building.

Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Changes since v1:
- Only add COMPILE_TEST to the DEFERRED_STRUCT_PAGE_INIT guards.

 kernel/liveupdate/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig
index d2aeaf13c3acb..a5d5391e9cf76 100644
--- a/kernel/liveupdate/Kconfig
+++ b/kernel/liveupdate/Kconfig
@@ -1,12 +1,12 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
 menu "Live Update and Kexec HandOver"
-	depends on !DEFERRED_STRUCT_PAGE_INIT
+	depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
 
 config KEXEC_HANDOVER
 	bool "kexec handover"
 	depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE
-	depends on !DEFERRED_STRUCT_PAGE_INIT
+	depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
 	select MEMBLOCK_KHO_SCRATCH
 	select KEXEC_FILE
 	select LIBFDT
-- 
2.51.0
Re: [PATCH v2] kexec: allow KEXEC_HANDOVER to build with COMPILE_TEST
Posted by Mike Rapoport 4 hours ago
On Fri, Feb 06, 2026 at 04:52:44PM -0500, Sasha Levin wrote:
> Currently allmodconfig sets CONFIG_DEFERRED_STRUCT_PAGE_INIT which prevents KHO
> from building.
> 
> Signed-off-by: Sasha Levin <sashal@kernel.org>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

> ---
> Changes since v1:
> - Only add COMPILE_TEST to the DEFERRED_STRUCT_PAGE_INIT guards.
> 
>  kernel/liveupdate/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig
> index d2aeaf13c3acb..a5d5391e9cf76 100644
> --- a/kernel/liveupdate/Kconfig
> +++ b/kernel/liveupdate/Kconfig
> @@ -1,12 +1,12 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  
>  menu "Live Update and Kexec HandOver"
> -	depends on !DEFERRED_STRUCT_PAGE_INIT
> +	depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
>  
>  config KEXEC_HANDOVER
>  	bool "kexec handover"
>  	depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE
> -	depends on !DEFERRED_STRUCT_PAGE_INIT
> +	depends on !DEFERRED_STRUCT_PAGE_INIT || COMPILE_TEST
>  	select MEMBLOCK_KHO_SCRATCH
>  	select KEXEC_FILE
>  	select LIBFDT
> -- 
> 2.51.0
> 

-- 
Sincerely yours,
Mike.