Skip to content

Commit

Permalink
powerpc: Fix endian issues in crash dump code
Browse files Browse the repository at this point in the history
A couple more device tree properties that need byte swapping.

Signed-off-by: Anton Blanchard <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
  • Loading branch information
antonblanchard authored and ozbenh committed Dec 13, 2013
1 parent 8d15315 commit a29e30e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/powerpc/kernel/crash_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
unsigned long addr;
const u32 *basep, *sizep;
const __be32 *basep, *sizep;
unsigned int rtas_start = 0, rtas_end = 0;

basep = of_get_property(rtas.dev, "linux,rtas-base", NULL);
sizep = of_get_property(rtas.dev, "rtas-size", NULL);

if (basep && sizep) {
rtas_start = *basep;
rtas_end = *basep + *sizep;
rtas_start = be32_to_cpup(basep);
rtas_end = rtas_start + be32_to_cpup(sizep);
}

for (addr = begin; addr < end; addr += PAGE_SIZE) {
Expand Down

0 comments on commit a29e30e

Please sign in to comment.