diff options
author | Suzuki K. Poulose <suzuki@in.ibm.com> | 2011-10-03 15:48:12 +0530 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-10-21 16:46:21 +0900 |
commit | 90da2c3735b9ee4ddc80257c6036816bd570dcc8 (patch) | |
tree | 5a8e668d4e9e2b0d630ea948426f7a017a2d1f5e /kexec/arch/ppc/crashdump-powerpc.c | |
parent | ec4d31441ed4ea6ab320b63cc1472eda46e70ca2 (diff) |
kexec: powerpc: crash_dump: No backup region for PPC BookE
Disable backup regions for BookE in case of a CRASH Dump, as they can
be run from anywhere.
The patch introduces --with-booke option to support the BookE.
With the patch, we get :
## On a 256M machine:
# busybox cat /proc/cmdline
init=/bin/init console=ttyS0,16550 crashkernel=128M@100M
# kexec -p root/vmlinux
usable memory rgns size:1 base:6400000 size:8000000
CRASH MEMORY RANGES
0000000000000000-0000000006400000
000000000e400000-0000000010000000
Command line after adding elfcorehdr: elfcorehdr=112380K
Command line after adding elfcorehdr: elfcorehdr=112380K savemaxmem=256M
Signed-off-by: Suzuki K. Poulose<suzuki@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/ppc/crashdump-powerpc.c')
-rw-r--r-- | kexec/arch/ppc/crashdump-powerpc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kexec/arch/ppc/crashdump-powerpc.c b/kexec/arch/ppc/crashdump-powerpc.c index 243721a..7c9dbff 100644 --- a/kexec/arch/ppc/crashdump-powerpc.c +++ b/kexec/arch/ppc/crashdump-powerpc.c @@ -95,11 +95,13 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges) } memset(crash_memory_range, 0, crash_rng_len); +#ifndef CONFIG_BOOKE /* create a separate program header for the backup region */ crash_memory_range[0].start = BACKUP_SRC_START; crash_memory_range[0].end = BACKUP_SRC_END + 1; crash_memory_range[0].type = RANGE_RAM; memory_ranges++; +#endif dir = opendir(device_tree); if (!dir) { @@ -143,9 +145,10 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges) " excedeed the max limit\n"); goto err; } - +#ifndef CONFIG_BOOKE if (start == 0 && end >= (BACKUP_SRC_END + 1)) start = BACKUP_SRC_END + 1; +#endif cstart = crash_base; cend = crash_base + crash_size; @@ -310,6 +313,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline, info->backup_src_start = BACKUP_SRC_START; info->backup_src_size = BACKUP_SRC_SIZE; +#ifndef CONFIG_BOOKE /* Create a backup region segment to store backup data*/ sz = (BACKUP_SRC_SIZE + align - 1) & ~(align - 1); tmp = xmalloc(sz); @@ -317,6 +321,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline, info->backup_start = add_buffer(info, tmp, sz, sz, align, 0, max_addr, 1); reserve(info->backup_start, sz); +#endif /* On powerpc memory ranges in device-tree is denoted as start * and size rather than start and end, as is the case with |