[PATCH] powerpc/kexec/core: use big-endian types for crash variables

Aditya Gupta adityag at linux.ibm.com
Sun Mar 8 14:29:05 PDT 2026


On 25/12/24 08:42PM, Sourabh Jain wrote:
> Use explicit word-sized big-endian types for kexec and crash related
> variables. This makes the endianness unambiguous and avoids type
> mismatches that trigger sparse warnings.
> 
> The change addresses sparse warnings like below (seen on both 32-bit
> and 64-bit builds):
> 
> <...snip...>
> ...
>
>  /* Values we need to export to the second kernel via the device tree. */
> -static phys_addr_t crashk_base;
> -static phys_addr_t crashk_size;
> -static unsigned long long mem_limit;
> +static __be_word crashk_base;
> +static __be_word crashk_size;
> +static __be_word mem_limit;
> ...
>  
>  static struct property memory_limit_prop = {
>  	.name = "linux,memory-limit",
> -	.length = sizeof(unsigned long long),
> +	.length = sizeof(__be_word),
>  	.value = &mem_limit,

'mem_limit' has slight change here. it used to be 64bit always,
but now on ppc32 it will be 32bit

I see only one usage of this in arch/powerpc/kernel/prom.c, and don't
see any issue with usage due to the 32-bit/64-bit memory_limit

For the patch:
Reviewed-by: Aditya Gupta <adityaglinux.ibm.com>

Thanks,
- Aditya G




More information about the kexec mailing list