Commit a29e30ef authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

powerpc: Fix endian issues in crash dump code

A couple more device tree properties that need byte swapping.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 8d153155
...@@ -124,15 +124,15 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, ...@@ -124,15 +124,15 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
void crash_free_reserved_phys_range(unsigned long begin, unsigned long end) void crash_free_reserved_phys_range(unsigned long begin, unsigned long end)
{ {
unsigned long addr; unsigned long addr;
const u32 *basep, *sizep; const __be32 *basep, *sizep;
unsigned int rtas_start = 0, rtas_end = 0; unsigned int rtas_start = 0, rtas_end = 0;
basep = of_get_property(rtas.dev, "linux,rtas-base", NULL); basep = of_get_property(rtas.dev, "linux,rtas-base", NULL);
sizep = of_get_property(rtas.dev, "rtas-size", NULL); sizep = of_get_property(rtas.dev, "rtas-size", NULL);
if (basep && sizep) { if (basep && sizep) {
rtas_start = *basep; rtas_start = be32_to_cpup(basep);
rtas_end = *basep + *sizep; rtas_end = rtas_start + be32_to_cpup(sizep);
} }
for (addr = begin; addr < end; addr += PAGE_SIZE) { for (addr = begin; addr < end; addr += PAGE_SIZE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment