diff options
author | Anton Blanchard <anton@samba.org> | 2013-12-11 23:59:41 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-12-12 23:48:39 -0500 |
commit | a29e30efa3a1b253fd1252731aa774a3544c5c3b (patch) | |
tree | 766a3611abe30be86b9433cb8856b0c44638cfc1 /arch/powerpc/kernel | |
parent | 8d15315537578a9ef5d35912d06127205dd82be8 (diff) |
powerpc: Fix endian issues in crash dump code
A couple more device tree properties that need byte swapping.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/crash_dump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 779a78c26435..11c1d069d920 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c | |||
@@ -124,15 +124,15 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, | |||
124 | void crash_free_reserved_phys_range(unsigned long begin, unsigned long end) | 124 | void crash_free_reserved_phys_range(unsigned long begin, unsigned long end) |
125 | { | 125 | { |
126 | unsigned long addr; | 126 | unsigned long addr; |
127 | const u32 *basep, *sizep; | 127 | const __be32 *basep, *sizep; |
128 | unsigned int rtas_start = 0, rtas_end = 0; | 128 | unsigned int rtas_start = 0, rtas_end = 0; |
129 | 129 | ||
130 | basep = of_get_property(rtas.dev, "linux,rtas-base", NULL); | 130 | basep = of_get_property(rtas.dev, "linux,rtas-base", NULL); |
131 | sizep = of_get_property(rtas.dev, "rtas-size", NULL); | 131 | sizep = of_get_property(rtas.dev, "rtas-size", NULL); |
132 | 132 | ||
133 | if (basep && sizep) { | 133 | if (basep && sizep) { |
134 | rtas_start = *basep; | 134 | rtas_start = be32_to_cpup(basep); |
135 | rtas_end = *basep + *sizep; | 135 | rtas_end = rtas_start + be32_to_cpup(sizep); |
136 | } | 136 | } |
137 | 137 | ||
138 | for (addr = begin; addr < end; addr += PAGE_SIZE) { | 138 | for (addr = begin; addr < end; addr += PAGE_SIZE) { |