diff options
author | Sachin Sant <sachinp@in.ibm.com> | 2006-09-08 23:10:32 +0530 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2006-10-06 12:44:15 +0900 |
commit | 32b12d965b19c72245ae195d98986a944b87f814 (patch) | |
tree | d66e4f754447baf918f33c3153a299da2d0ecae9 /kexec/arch/ppc64/crashdump-ppc64.c | |
parent | 306543c2def0181b880608b24e0ffb04e5172bec (diff) |
ppc: support 64k page size
* kexec-tools for PPC64 only support 4k page size and does not work with kernels
configured with 64k page size support. This patch adds support for 64k page
size on PPC64 arch.
* Replace PAGE_SIZE by getpagesize()
Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/ppc64/crashdump-ppc64.c')
-rw-r--r-- | kexec/arch/ppc64/crashdump-ppc64.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c index e10766e..cdda575 100644 --- a/kexec/arch/ppc64/crashdump-ppc64.c +++ b/kexec/arch/ppc64/crashdump-ppc64.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <unistd.h> #include <errno.h> #include <limits.h> #include <elf.h> @@ -80,8 +81,8 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges) unsigned long long start, end, cstart, cend; /* create a separate program header for the backup region */ - crash_memory_range[0].start = 0x0000000000000000; - crash_memory_range[0].end = 0x0000000000008000; + crash_memory_range[0].start = BACKUP_SRC_START; + crash_memory_range[0].end = BACKUP_SRC_END; crash_memory_range[0].type = RANGE_RAM; memory_ranges++; @@ -126,8 +127,8 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges) start = ((unsigned long long *)buf)[0]; end = start + ((unsigned long long *)buf)[1]; - if (start == 0 && end >= 0x8000) - start = 0x8000; + if (start == 0 && end >= BACKUP_SRC_END) + start = BACKUP_SRC_END; cstart = crash_base; cend = crash_base + crash_size; @@ -419,8 +420,8 @@ void add_usable_mem_rgns(unsigned long long base, unsigned long long size) unsigned long long end = base + size; unsigned long long ustart, uend; - base = _ALIGN_DOWN(base, PAGE_SIZE); - end = _ALIGN_UP(end, PAGE_SIZE); + base = _ALIGN_DOWN(base, getpagesize()); + end = _ALIGN_UP(end, getpagesize()); for (i=0; i < usablemem_rgns.size; i++) { ustart = usablemem_rgns.ranges[i].start; |