Commit 9178052f authored by Jack Steiner's avatar Jack Steiner Committed by Linus Torvalds

gru: handle blades without memory

Do not use alloc_pages_exact_node() to allocate GRU tables.  If a blade
has no local memory, nid will be -1.  Use alloc_pages_node() instead.
Signed-off-by: default avatarJack Steiner <steiner@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b61fc69b
...@@ -266,8 +266,8 @@ static int gru_init_tables(unsigned long gru_base_paddr, void *gru_base_vaddr) ...@@ -266,8 +266,8 @@ static int gru_init_tables(unsigned long gru_base_paddr, void *gru_base_vaddr)
max_user_dsr_bytes = GRU_NUM_DSR_BYTES; max_user_dsr_bytes = GRU_NUM_DSR_BYTES;
for_each_possible_blade(bid) { for_each_possible_blade(bid) {
pnode = uv_blade_to_pnode(bid); pnode = uv_blade_to_pnode(bid);
nid = uv_blade_to_memory_nid(bid); nid = uv_blade_to_memory_nid(bid);/* -1 if no memory on blade */
page = alloc_pages_exact_node(nid, GFP_KERNEL, order); page = alloc_pages_node(nid, GFP_KERNEL, order);
if (!page) if (!page)
goto fail; goto fail;
gru_base[bid] = page_address(page); gru_base[bid] = page_address(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment