diff options
Diffstat (limited to 'arch/powerpc/kernel/machine_kexec.c')
| -rw-r--r-- | arch/powerpc/kernel/machine_kexec.c | 14 | 
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index 75d4f7340da8..015ae55c1868 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c @@ -196,7 +196,9 @@ int overlaps_crashkernel(unsigned long start, unsigned long size)  /* Values we need to export to the second kernel via the device tree. */  static phys_addr_t kernel_end; +static phys_addr_t crashk_base;  static phys_addr_t crashk_size; +static unsigned long long mem_limit;  static struct property kernel_end_prop = {  	.name = "linux,kernel-end", @@ -207,7 +209,7 @@ static struct property kernel_end_prop = {  static struct property crashk_base_prop = {  	.name = "linux,crashkernel-base",  	.length = sizeof(phys_addr_t), -	.value = &crashk_res.start, +	.value = &crashk_base  };  static struct property crashk_size_prop = { @@ -219,9 +221,11 @@ static struct property crashk_size_prop = {  static struct property memory_limit_prop = {  	.name = "linux,memory-limit",  	.length = sizeof(unsigned long long), -	.value = &memory_limit, +	.value = &mem_limit,  }; +#define cpu_to_be_ulong	__PASTE(cpu_to_be, BITS_PER_LONG) +  static void __init export_crashk_values(struct device_node *node)  {  	struct property *prop; @@ -237,8 +241,9 @@ static void __init export_crashk_values(struct device_node *node)  		of_remove_property(node, prop);  	if (crashk_res.start != 0) { +		crashk_base = cpu_to_be_ulong(crashk_res.start),  		of_add_property(node, &crashk_base_prop); -		crashk_size = resource_size(&crashk_res); +		crashk_size = cpu_to_be_ulong(resource_size(&crashk_res));  		of_add_property(node, &crashk_size_prop);  	} @@ -246,6 +251,7 @@ static void __init export_crashk_values(struct device_node *node)  	 * memory_limit is required by the kexec-tools to limit the  	 * crash regions to the actual memory used.  	 */ +	mem_limit = cpu_to_be_ulong(memory_limit);  	of_update_property(node, &memory_limit_prop);  } @@ -264,7 +270,7 @@ static int __init kexec_setup(void)  		of_remove_property(node, prop);  	/* information needed by userspace when using default_machine_kexec */ -	kernel_end = __pa(_end); +	kernel_end = cpu_to_be_ulong(__pa(_end));  	of_add_property(node, &kernel_end_prop);  	export_crashk_values(node);  | 
