aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/numa.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/numa.c')
-rw-r--r--arch/powerpc/mm/numa.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index fc519cd90f77..fc6f8ee9656f 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -432,7 +432,8 @@ static int __init parse_numa_properties(void)
432 if (!memcell_buf || len <= 0) 432 if (!memcell_buf || len <= 0)
433 continue; 433 continue;
434 434
435 ranges = memory->n_addrs; 435 /* ranges in cell */
436 ranges = (len >> 2) / (n_mem_addr_cells + n_mem_size_cells);
436new_range: 437new_range:
437 /* these are order-sensitive, and modify the buffer pointer */ 438 /* these are order-sensitive, and modify the buffer pointer */
438 start = read_n_cells(n_mem_addr_cells, &memcell_buf); 439 start = read_n_cells(n_mem_addr_cells, &memcell_buf);
@@ -779,7 +780,8 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
779 if (!memcell_buf || len <= 0) 780 if (!memcell_buf || len <= 0)
780 continue; 781 continue;
781 782
782 ranges = memory->n_addrs; /* ranges in cell */ 783 /* ranges in cell */
784 ranges = (len >> 2) / (n_mem_addr_cells + n_mem_size_cells);
783ha_new_range: 785ha_new_range:
784 start = read_n_cells(n_mem_addr_cells, &memcell_buf); 786 start = read_n_cells(n_mem_addr_cells, &memcell_buf);
785 size = read_n_cells(n_mem_size_cells, &memcell_buf); 787 size = read_n_cells(n_mem_size_cells, &memcell_buf);