diff options
Diffstat (limited to 'arch/powerpc/kernel/machine_kexec.c')
-rw-r--r-- | arch/powerpc/kernel/machine_kexec.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index 5df777794403..fa9f6c72f557 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
@@ -165,7 +165,7 @@ void __init reserve_crashkernel(void) | |||
165 | if (memory_limit && memory_limit <= crashk_res.end) { | 165 | if (memory_limit && memory_limit <= crashk_res.end) { |
166 | memory_limit = crashk_res.end + 1; | 166 | memory_limit = crashk_res.end + 1; |
167 | printk("Adjusted memory limit for crashkernel, now 0x%llx\n", | 167 | printk("Adjusted memory limit for crashkernel, now 0x%llx\n", |
168 | (unsigned long long)memory_limit); | 168 | memory_limit); |
169 | } | 169 | } |
170 | 170 | ||
171 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | 171 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " |
@@ -204,6 +204,12 @@ static struct property crashk_size_prop = { | |||
204 | .value = &crashk_size, | 204 | .value = &crashk_size, |
205 | }; | 205 | }; |
206 | 206 | ||
207 | static struct property memory_limit_prop = { | ||
208 | .name = "linux,memory-limit", | ||
209 | .length = sizeof(unsigned long long), | ||
210 | .value = &memory_limit, | ||
211 | }; | ||
212 | |||
207 | static void __init export_crashk_values(struct device_node *node) | 213 | static void __init export_crashk_values(struct device_node *node) |
208 | { | 214 | { |
209 | struct property *prop; | 215 | struct property *prop; |
@@ -223,6 +229,12 @@ static void __init export_crashk_values(struct device_node *node) | |||
223 | crashk_size = resource_size(&crashk_res); | 229 | crashk_size = resource_size(&crashk_res); |
224 | prom_add_property(node, &crashk_size_prop); | 230 | prom_add_property(node, &crashk_size_prop); |
225 | } | 231 | } |
232 | |||
233 | /* | ||
234 | * memory_limit is required by the kexec-tools to limit the | ||
235 | * crash regions to the actual memory used. | ||
236 | */ | ||
237 | prom_update_property(node, &memory_limit_prop); | ||
226 | } | 238 | } |
227 | 239 | ||
228 | static int __init kexec_setup(void) | 240 | static int __init kexec_setup(void) |