[PATCH] PPC64: ensure that extra rtas segment is a multiple of PAGE_SIZE

Simon Horman horms at verge.net.au
Tue May 20 22:59:06 EDT 2008


On Tue, May 20, 2008 at 11:26:40AM -0400, Neil Horman wrote:
> kexec on ppc64 systems, include an extra PT_LOAD segment if the rtas
> memory hits the stored kdump kernel image.  While the rtas area is
> memory mapped (implying that it begins and ends on a page boundary),
> the whole of the mapped region is not consumed by the rtas features
> (the remaining area just returns 0's).  This unused area is not
> accounted in the rtas prom, which is used to populate the proc files
> which export the size information that is used to define the mapped
> memory region (/proc/device-tree/rtas/rtas-size).  Since this is the
> data that kexec uses to generate the PT_LOAD segment, we wind up with
> a PT_LOAD segment that incorrectly contains a partial page.  This
> causes things like makedumpfile to fail, since it reads memory in page
> sized chunks, and fails on the inability to read only part of a page.
> This patch corrects that by rounding the extra segment size up the
> next whole page size.  This is safe, since the rtas area is mapped to
> a whole page range.  I've tested on both 4k and 64k configured kernels
> on ppc64 and found that it works well.
> 
> Regards Neil

Thanks Neil, applied.

-- 
Horms




More information about the kexec mailing list