diff options
Diffstat (limited to 'kexec/crashdump-elf.c')
-rw-r--r-- | kexec/crashdump-elf.c | 10 |
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); |