aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/numa.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-12-13 02:01:21 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 22:53:55 -0500
commitcc5d0189b9ba95260857a5018a1c2fef90008507 (patch)
tree1202c94b6b3cb81a96d0a0e54424cad10eef68bb /arch/powerpc/mm/numa.c
parent9cf84d7c97992dbe5360b241327341c07ce30fc9 (diff)
[PATCH] powerpc: Remove device_node addrs/n_addr
The pre-parsed addrs/n_addrs fields in struct device_node are finally gone. Remove the dodgy heuristics that did that parsing at boot and remove the fields themselves since we now have a good replacement with the new OF parsing code. This patch also fixes a bunch of drivers to use the new code instead, so that at least pmac32, pseries, iseries and g5 defconfigs build. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
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);