[Crash-utility] [PATCH] [kdump] Find the PAGESIZE from VMCOREINFO
Suzuki K. Poulose
suzuki at in.ibm.com
Tue Jan 10 06:43:54 UTC 2012
Dave Anderson wrote:
> I'd prefer to use the pre-existing page-size-from-vmcoreinfo algorithm
> by applying it to PPC and 32-bit ELF kdumps. Can you try the attached
> patch?
> --- crash-6.0.2/netdump.c.orig
> +++ crash-6.0.2/netdump.c
> @@ -52,7 +52,7 @@ static void kdump_get_osrelease(void);
> * which can differ from the host machine's page size.
> */
> #define READ_PAGESIZE_FROM_VMCOREINFO() \
> - (machine_type("IA64") || machine_type("PPC64"))
> + (machine_type("IA64") || machine_type("PPC64") || machine_type("PPC"))
>
> /*
> * kdump installs NT_PRSTATUS elf notes only to the cpus
> @@ -1740,6 +1740,9 @@ dump_Elf32_Nhdr(Elf32_Off offset, int st
> netdump_print("(unused)\n");
> nd->vmcoreinfo = (char *)(ptr + note->n_namesz + 1);
> nd->size_vmcoreinfo = note->n_descsz;
> + if (READ_PAGESIZE_FROM_VMCOREINFO() && store)
> + nd->page_size = (uint)
> + vmcoreinfo_read_integer("PAGESIZE", 0);
> } else if (eraseinfo) {
> netdump_print("(unused)\n");
> if (note->n_descsz)
>
>
I tested the above patch and it works fine. You may push this in.
Thanks
Suzuki
More information about the Crash-utility
mailing list