diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-22 20:35:52 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-22 22:56:57 -0400 |
commit | 3fdfd99051fbc210464378cd44a4b8914282bac3 (patch) | |
tree | 40c58068f5b89509c6d4fd8aa8c35e031dbc9820 /arch/powerpc/mm | |
parent | 4b8692c022a4b149d0c2cc3f4f7a363453fde72a (diff) |
powerpc: Fix erroneous lmb->memblock conversions
Oooops... we missed these. We incorrectly converted strings
used when parsing the device-tree on pseries, thus breaking
access to drconf memory and hotplug memory.
While at it, also revert some variable names that represent
something the FW calls "lmb" and thus don't need to be converted
to "memblock".
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/numa.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index f47364585ecd..aa731af720c0 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -398,15 +398,15 @@ static int of_get_drconf_memory(struct device_node *memory, const u32 **dm) | |||
398 | } | 398 | } |
399 | 399 | ||
400 | /* | 400 | /* |
401 | * Retreive and validate the ibm,memblock-size property for drconf memory | 401 | * Retreive and validate the ibm,lmb-size property for drconf memory |
402 | * from the device tree. | 402 | * from the device tree. |
403 | */ | 403 | */ |
404 | static u64 of_get_memblock_size(struct device_node *memory) | 404 | static u64 of_get_lmb_size(struct device_node *memory) |
405 | { | 405 | { |
406 | const u32 *prop; | 406 | const u32 *prop; |
407 | u32 len; | 407 | u32 len; |
408 | 408 | ||
409 | prop = of_get_property(memory, "ibm,memblock-size", &len); | 409 | prop = of_get_property(memory, "ibm,lmb-size", &len); |
410 | if (!prop || len < sizeof(unsigned int)) | 410 | if (!prop || len < sizeof(unsigned int)) |
411 | return 0; | 411 | return 0; |
412 | 412 | ||
@@ -562,7 +562,7 @@ static unsigned long __init numa_enforce_memory_limit(unsigned long start, | |||
562 | static inline int __init read_usm_ranges(const u32 **usm) | 562 | static inline int __init read_usm_ranges(const u32 **usm) |
563 | { | 563 | { |
564 | /* | 564 | /* |
565 | * For each memblock in ibm,dynamic-memory a corresponding | 565 | * For each lmb in ibm,dynamic-memory a corresponding |
566 | * entry in linux,drconf-usable-memory property contains | 566 | * entry in linux,drconf-usable-memory property contains |
567 | * a counter followed by that many (base, size) duple. | 567 | * a counter followed by that many (base, size) duple. |
568 | * read the counter from linux,drconf-usable-memory | 568 | * read the counter from linux,drconf-usable-memory |
@@ -578,7 +578,7 @@ static void __init parse_drconf_memory(struct device_node *memory) | |||
578 | { | 578 | { |
579 | const u32 *dm, *usm; | 579 | const u32 *dm, *usm; |
580 | unsigned int n, rc, ranges, is_kexec_kdump = 0; | 580 | unsigned int n, rc, ranges, is_kexec_kdump = 0; |
581 | unsigned long memblock_size, base, size, sz; | 581 | unsigned long lmb_size, base, size, sz; |
582 | int nid; | 582 | int nid; |
583 | struct assoc_arrays aa; | 583 | struct assoc_arrays aa; |
584 | 584 | ||
@@ -586,8 +586,8 @@ static void __init parse_drconf_memory(struct device_node *memory) | |||
586 | if (!n) | 586 | if (!n) |
587 | return; | 587 | return; |
588 | 588 | ||
589 | memblock_size = of_get_memblock_size(memory); | 589 | lmb_size = of_get_lmb_size(memory); |
590 | if (!memblock_size) | 590 | if (!lmb_size) |
591 | return; | 591 | return; |
592 | 592 | ||
593 | rc = of_get_assoc_arrays(memory, &aa); | 593 | rc = of_get_assoc_arrays(memory, &aa); |
@@ -611,7 +611,7 @@ static void __init parse_drconf_memory(struct device_node *memory) | |||
611 | continue; | 611 | continue; |
612 | 612 | ||
613 | base = drmem.base_addr; | 613 | base = drmem.base_addr; |
614 | size = memblock_size; | 614 | size = lmb_size; |
615 | ranges = 1; | 615 | ranges = 1; |
616 | 616 | ||
617 | if (is_kexec_kdump) { | 617 | if (is_kexec_kdump) { |
@@ -1072,7 +1072,7 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory, | |||
1072 | { | 1072 | { |
1073 | const u32 *dm; | 1073 | const u32 *dm; |
1074 | unsigned int drconf_cell_cnt, rc; | 1074 | unsigned int drconf_cell_cnt, rc; |
1075 | unsigned long memblock_size; | 1075 | unsigned long lmb_size; |
1076 | struct assoc_arrays aa; | 1076 | struct assoc_arrays aa; |
1077 | int nid = -1; | 1077 | int nid = -1; |
1078 | 1078 | ||
@@ -1080,8 +1080,8 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory, | |||
1080 | if (!drconf_cell_cnt) | 1080 | if (!drconf_cell_cnt) |
1081 | return -1; | 1081 | return -1; |
1082 | 1082 | ||
1083 | memblock_size = of_get_memblock_size(memory); | 1083 | lmb_size = of_get_lmb_size(memory); |
1084 | if (!memblock_size) | 1084 | if (!lmb_size) |
1085 | return -1; | 1085 | return -1; |
1086 | 1086 | ||
1087 | rc = of_get_assoc_arrays(memory, &aa); | 1087 | rc = of_get_assoc_arrays(memory, &aa); |
@@ -1100,7 +1100,7 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory, | |||
1100 | continue; | 1100 | continue; |
1101 | 1101 | ||
1102 | if ((scn_addr < drmem.base_addr) | 1102 | if ((scn_addr < drmem.base_addr) |
1103 | || (scn_addr >= (drmem.base_addr + memblock_size))) | 1103 | || (scn_addr >= (drmem.base_addr + lmb_size))) |
1104 | continue; | 1104 | continue; |
1105 | 1105 | ||
1106 | nid = of_drconf_to_nid_single(&drmem, &aa); | 1106 | nid = of_drconf_to_nid_single(&drmem, &aa); |