summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2009-12-15 16:48:03 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 07:20:14 -0800
commit9178052fda2f934535f0b9940b987c3ac4c51bd7 (patch)
tree2260823536e4199b9e4d2acb0b4c455877f4f391 /drivers
parentb61fc69bb61838e99b368d208e6e2ee363eba2a1 (diff)
downloadlinux-3.10-9178052fda2f934535f0b9940b987c3ac4c51bd7.tar.gz
linux-3.10-9178052fda2f934535f0b9940b987c3ac4c51bd7.tar.bz2
linux-3.10-9178052fda2f934535f0b9940b987c3ac4c51bd7.zip
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: 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')
-rw-r--r--drivers/misc/sgi-gru/grufile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c
index 6318ee5c8d5..2e574fd5d3f 100644
--- a/drivers/misc/sgi-gru/grufile.c
+++ b/drivers/misc/sgi-gru/grufile.c
@@ -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;
for_each_possible_blade(bid) {
pnode = uv_blade_to_pnode(bid);
- nid = uv_blade_to_memory_nid(bid);
- page = alloc_pages_exact_node(nid, GFP_KERNEL, order);
+ nid = uv_blade_to_memory_nid(bid);/* -1 if no memory on blade */
+ page = alloc_pages_node(nid, GFP_KERNEL, order);
if (!page)
goto fail;
gru_base[bid] = page_address(page);