[IA64] Kexec/Kdump: honour non-zero crashkernel offset.

There seems to be a value in both allowing the kernel to determine
the base offset of the crashkernel automatically and allowing
users's to sepcify it.

The old behaviour on ia64, which is still the current behaviour on
most architectures is for the user to always specify the address.
Recently ia64 was changed so that it is always automatically determined.

With this patch the kernel automatically determines the offset if
the supplied value is 0, otherwise it uses the value provided.

This should probably be backed by a documentation change.

Signed-Off-By: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by Horms and committed by Tony Luck ad1c3ba7 45a98fc6

+10 -4
+10 -4
arch/ia64/kernel/setup.c
··· 256 257 #ifdef CONFIG_KEXEC 258 /* crashkernel=size@offset specifies the size to reserve for a crash 259 - * kernel.(offset is ingored for keep compatibility with other archs) 260 * By reserving this memory we guarantee that linux never set's it 261 * up as a DMA target.Useful for holding code to do something 262 * appropriate after a kernel panic. ··· 266 unsigned long base, size; 267 if (from) { 268 size = memparse(from + 12, &from); 269 if (size) { 270 - sort_regions(rsvd_region, n); 271 - base = kdump_find_rsvd_region(size, 272 - rsvd_region, n); 273 if (base != ~0UL) { 274 rsvd_region[n].start = 275 (unsigned long)__va(base);
··· 256 257 #ifdef CONFIG_KEXEC 258 /* crashkernel=size@offset specifies the size to reserve for a crash 259 + * kernel. If offset is 0, then it is determined automatically. 260 * By reserving this memory we guarantee that linux never set's it 261 * up as a DMA target.Useful for holding code to do something 262 * appropriate after a kernel panic. ··· 266 unsigned long base, size; 267 if (from) { 268 size = memparse(from + 12, &from); 269 + if (*from == '@') 270 + base = memparse(from+1, &from); 271 + else 272 + base = 0; 273 if (size) { 274 + if (!base) { 275 + sort_regions(rsvd_region, n); 276 + base = kdump_find_rsvd_region(size, 277 + rsvd_region, n); 278 + } 279 if (base != ~0UL) { 280 rsvd_region[n].start = 281 (unsigned long)__va(base);