summaryrefslogtreecommitdiff
path: root/kexec/crashdump-elf.c
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2007-02-14 11:57:38 +0900
committerSimon Horman <horms@verge.net.au>2007-02-14 11:57:38 +0900
commit38f3a78abeb98361c1c63a5d1b7031af542545e7 (patch)
tree97ab6651b938a467837d2e63e301285972aa8fa3 /kexec/crashdump-elf.c
parent5417f8ed03ab87fdcfeb78418ac066cc26598d58 (diff)
kexec-tools: Add alignment parameter to crash_create_XXX_headers
crash_create_XXX_headers assumes that all arhitectures need an alignment of 1024bytes. But on ia64 at least this is not true. This patch adds an alignment parameter to crash_create_XXX_headers, and calls passes a value of 1024 for all architectures except ia64, where EFI_PAGE_SIZE (4096) is passed. If there are problems with alignment on other architectures hopefully this facility will work for them too. Cc: Bernhard Walle <bwalle@suse.de> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Zou, Nanhai <nanhai.zou@intel.com> Signed-off-by: Simon Horman <horms@verge.net.au> kexec/arch/i386/crashdump-x86.c | 4 ++-- kexec/arch/ia64/crashdump-ia64.c | 5 +++-- kexec/arch/ppc64/crashdump-ppc64.c | 4 ++-- kexec/arch/x86_64/crashdump-x86_64.c | 2 +- kexec/crashdump-elf.c | 11 ++--------- kexec/crashdump.h | 6 ++++-- 6 files changed, 14 insertions(+), 18 deletions(-)
Diffstat (limited to 'kexec/crashdump-elf.c')
-rw-r--r--kexec/crashdump-elf.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/kexec/crashdump-elf.c b/kexec/crashdump-elf.c
index e702a53..b8e1f49 100644
--- a/kexec/crashdump-elf.c
+++ b/kexec/crashdump-elf.c
@@ -27,11 +27,11 @@ do { \
int FUNC(struct kexec_info *info,
struct crash_elf_info *elf_info,
struct memory_range *range, int ranges,
- void **buf, unsigned long *size)
+ void **buf, unsigned long *size, unsigned long align)
{
EHDR *elf;
PHDR *phdr;
- int i, sz, align;
+ int i, sz;
char *bufp;
long int nr_cpus = 0;
uint64_t notes_addr, notes_len;
@@ -72,13 +72,6 @@ int FUNC(struct kexec_info *info,
sz += sizeof(PHDR);
}
- /*
- * The kernel command line option memmap= requires 1k granularity,
- * therefore we align the size to 1024 here.
- */
-
- align = 1024;
-
sz += align - 1;
sz &= ~(align - 1);