diff options
author | Jack Steiner <steiner@sgi.com> | 2009-12-15 19:48:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:20:14 -0500 |
commit | 827f02febfcdfb03bc056bf479a13b5bcb35dfd7 (patch) | |
tree | 770bab4d08009d7a1ab8b1dd8906d01af7414bf8 /drivers/misc | |
parent | 57e6d258b1e41cd7ceb26fa43ce116939d8440b1 (diff) |
gru: initial GRU based on blade topology
Change the GRU initialization code to initialize based on blade topology
instead of node topology. The result is the same but blade-based
initialization is cleaner.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/sgi-gru/grufile.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c index ce5eda985ab0..6318ee5c8d50 100644 --- a/drivers/misc/sgi-gru/grufile.c +++ b/drivers/misc/sgi-gru/grufile.c | |||
@@ -264,11 +264,9 @@ static int gru_init_tables(unsigned long gru_base_paddr, void *gru_base_vaddr) | |||
264 | 264 | ||
265 | max_user_cbrs = GRU_NUM_CB; | 265 | max_user_cbrs = GRU_NUM_CB; |
266 | max_user_dsr_bytes = GRU_NUM_DSR_BYTES; | 266 | max_user_dsr_bytes = GRU_NUM_DSR_BYTES; |
267 | for_each_online_node(nid) { | 267 | for_each_possible_blade(bid) { |
268 | bid = uv_node_to_blade_id(nid); | 268 | pnode = uv_blade_to_pnode(bid); |
269 | pnode = uv_node_to_pnode(nid); | 269 | nid = uv_blade_to_memory_nid(bid); |
270 | if (bid < 0 || gru_base[bid]) | ||
271 | continue; | ||
272 | page = alloc_pages_exact_node(nid, GFP_KERNEL, order); | 270 | page = alloc_pages_exact_node(nid, GFP_KERNEL, order); |
273 | if (!page) | 271 | if (!page) |
274 | goto fail; | 272 | goto fail; |
@@ -298,8 +296,8 @@ static int gru_init_tables(unsigned long gru_base_paddr, void *gru_base_vaddr) | |||
298 | return 0; | 296 | return 0; |
299 | 297 | ||
300 | fail: | 298 | fail: |
301 | for (nid--; nid >= 0; nid--) | 299 | for (bid--; bid >= 0; bid--) |
302 | free_pages((unsigned long)gru_base[nid], order); | 300 | free_pages((unsigned long)gru_base[bid], order); |
303 | return -ENOMEM; | 301 | return -ENOMEM; |
304 | } | 302 | } |
305 | 303 | ||