summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Damm <magnus@valinux.co.jp>2006-11-27 15:49:19 +0900
committerSimon Horman <horms@verge.net.au>2006-11-27 17:11:54 +0900
commitb7e11ae11043339839b3b0dcd88821bb0b134149 (patch)
tree44c4b273546bf649e115f0f0679689c5a54e961f
parentb5c22baac1a632363a91da666886bb0ae285bd67 (diff)
kexec-tools: 1k alignment comment
kexec-tools: 1k alignment comment This patch adds the 1k alignment comment as suggested by Vivek. Signed-off-by: Magnus Damm <magnus@valinux.co.jp> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/crashdump-elf.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/kexec/crashdump-elf.c b/kexec/crashdump-elf.c
index 4c55baf..5ec5a07 100644
--- a/kexec/crashdump-elf.c
+++ b/kexec/crashdump-elf.c
@@ -11,10 +11,9 @@ int FUNC(struct kexec_info *info,
{
EHDR *elf;
PHDR *phdr;
- int i, sz;
+ int i, sz, align;
char *bufp;
long int nr_cpus = 0;
- int align = 1024;
uint64_t notes_addr, notes_len;
int (*get_note_info)(int cpu, uint64_t *addr, uint64_t *len);
@@ -53,6 +52,13 @@ 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);