page allocator: do not check NUMA node ID when the caller knows the node is valid
[linux-2.6.git] / drivers / misc / sgi-gru / grufile.c
index b7a21ce..3ce2920 100644 (file)
@@ -302,7 +302,7 @@ static int gru_init_tables(unsigned long gru_base_paddr, void *gru_base_vaddr)
                pnode = uv_node_to_pnode(nid);
                if (bid < 0 || gru_base[bid])
                        continue;
-               page = alloc_pages_node(nid, GFP_KERNEL, order);
+               page = alloc_pages_exact_node(nid, GFP_KERNEL, order);
                if (!page)
                        goto fail;
                gru_base[bid] = page_address(page);
@@ -375,7 +375,7 @@ static int __init gru_init(void)
        void *gru_start_vaddr;
 
        if (!is_uv_system())
-               return -ENODEV;
+               return 0;
 
 #if defined CONFIG_IA64
        gru_start_paddr = 0xd000000000UL; /* ZZZZZZZZZZZZZZZZZZZ fixme */
@@ -440,7 +440,7 @@ exit1:
 
 static void __exit gru_exit(void)
 {
-       int i, bid;
+       int i, bid, gid;
        int order = get_order(sizeof(struct gru_state) *
                              GRU_CHIPLETS_PER_BLADE);
 
@@ -450,6 +450,9 @@ static void __exit gru_exit(void)
        for (i = 0; i < GRU_CHIPLETS_PER_BLADE; i++)
                free_irq(IRQ_GRU + i, NULL);
 
+       foreach_gid(gid)
+               gru_kservices_exit(GID_TO_GRU(gid));
+
        for (bid = 0; bid < GRU_MAX_BLADES; bid++)
                free_pages((unsigned long)gru_base[bid], order);