diff options
author | Magnus Damm <magnus@valinux.co.jp> | 2006-11-17 19:56:35 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2006-11-27 12:25:12 +0900 |
commit | 93bd94e000e78e81982d03db0e1ce54a54dad859 (patch) | |
tree | b973dbc25af2758428be69a94b3e8ae738156997 /kexec/arch/ppc64/crashdump-ppc64.c | |
parent | 920a98d04e4f97d0799a8e924e03a8a9721973aa (diff) |
kexec-tools: Add length parameter to get_crash_notes_per_cpu()
kexec-tools: Add length parameter to get_crash_notes_per_cpu()
Let get_crash_notes_per_cpu() pass both physical base address and length.
Under Xen we export this information from the hypervisor, and it would be
a nice improvement for the kernel to actually export the size too. So let's
change the framework to use both base address and length.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Removed trainling whitespace
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 | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c index 4f7e0a2..59acb1c 100644 --- a/kexec/arch/ppc64/crashdump-ppc64.c +++ b/kexec/arch/ppc64/crashdump-ppc64.c @@ -269,7 +269,7 @@ static int prepare_crash_memory_elf64_headers(struct kexec_info *info, int i; char *bufp; long int nr_cpus = 0; - unsigned long notes_addr; + unsigned long notes_addr, notes_len; bufp = (char*) buf; @@ -301,10 +301,8 @@ static int prepare_crash_memory_elf64_headers(struct kexec_info *info, if (nr_cpus < 0) return -1; - /* Need to find a better way to determine per cpu notes section size. */ -#define MAX_NOTE_BYTES 1024 for (i = 0; i < nr_cpus; i++) { - if (get_crash_notes_per_cpu(i, ¬es_addr) < 0) { + if (get_crash_notes_per_cpu(i, ¬es_addr, ¬es_len) < 0) { /* This cpu is not present. Skip it. */ continue; } @@ -314,7 +312,7 @@ static int prepare_crash_memory_elf64_headers(struct kexec_info *info, phdr->p_flags = 0; phdr->p_offset = phdr->p_paddr = notes_addr; phdr->p_vaddr = 0; - phdr->p_filesz = phdr->p_memsz = MAX_NOTE_BYTES; + phdr->p_filesz = phdr->p_memsz = notes_len; /* Do we need any alignment of segments? */ phdr->p_align = 0; |