diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2007-07-31 21:34:38 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-08-03 05:36:00 -0400 |
commit | b9c3fdb0f0fe02ba33e87ef947f23cd12e6196fe (patch) | |
tree | 9838d0b84de9cf851aa43e05e81dbbf95db0156f /arch | |
parent | 17aa3a82aa2173a22405f862c4444656f0494a3f (diff) |
[POWERPC] Fix parse_drconf_memory() for 64-bit start addresses
Some new machines use the "ibm,dynamic-reconfiguration-memory" property
to provide memory layout information, rather than via memory nodes.
There is a bug in the code to parse this property for start addresses
over 4GB; we store the start address in an unsigned int, which means
we throw away the high bits and add apparently duplicate regions.
This results in a BUG() in free_bootmem_core(). This fixes it by
using an unsigned long instead.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/mm/numa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index de45aa82d97b..c12adc3ddffd 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -307,9 +307,9 @@ static void __init parse_drconf_memory(struct device_node *memory) | |||
307 | const unsigned int *lm, *dm, *aa; | 307 | const unsigned int *lm, *dm, *aa; |
308 | unsigned int ls, ld, la; | 308 | unsigned int ls, ld, la; |
309 | unsigned int n, aam, aalen; | 309 | unsigned int n, aam, aalen; |
310 | unsigned long lmb_size, size; | 310 | unsigned long lmb_size, size, start; |
311 | int nid, default_nid = 0; | 311 | int nid, default_nid = 0; |
312 | unsigned int start, ai, flags; | 312 | unsigned int ai, flags; |
313 | 313 | ||
314 | lm = of_get_property(memory, "ibm,lmb-size", &ls); | 314 | lm = of_get_property(memory, "ibm,lmb-size", &ls); |
315 | dm = of_get_property(memory, "ibm,dynamic-memory", &ld); | 315 | dm = of_get_property(memory, "ibm,dynamic-memory", &ld); |