RDMA/qib: don't pass bogus GFP_ flags to dma_alloc_coherent
[sfrench/cifs-2.6.git] / drivers / infiniband / hw / qib / qib_init.c
index 45211008449fb64e423947d002b34023f0a0340a..33667becd52b047b1988a2735c66f059e9159009 100644 (file)
@@ -1546,18 +1546,14 @@ int qib_create_rcvhdrq(struct qib_devdata *dd, struct qib_ctxtdata *rcd)
 
        if (!rcd->rcvhdrq) {
                dma_addr_t phys_hdrqtail;
-               gfp_t gfp_flags;
 
                amt = ALIGN(dd->rcvhdrcnt * dd->rcvhdrentsize *
                            sizeof(u32), PAGE_SIZE);
-               gfp_flags = (rcd->ctxt >= dd->first_user_ctxt) ?
-                       GFP_USER : GFP_KERNEL;
 
                old_node_id = dev_to_node(&dd->pcidev->dev);
                set_dev_node(&dd->pcidev->dev, rcd->node_id);
-               rcd->rcvhdrq = dma_alloc_coherent(
-                       &dd->pcidev->dev, amt, &rcd->rcvhdrq_phys,
-                       gfp_flags | __GFP_COMP);
+               rcd->rcvhdrq = dma_alloc_coherent(&dd->pcidev->dev, amt,
+                               &rcd->rcvhdrq_phys, GFP_KERNEL);
                set_dev_node(&dd->pcidev->dev, old_node_id);
 
                if (!rcd->rcvhdrq) {
@@ -1577,7 +1573,7 @@ int qib_create_rcvhdrq(struct qib_devdata *dd, struct qib_ctxtdata *rcd)
                        set_dev_node(&dd->pcidev->dev, rcd->node_id);
                        rcd->rcvhdrtail_kvaddr = dma_alloc_coherent(
                                &dd->pcidev->dev, PAGE_SIZE, &phys_hdrqtail,
-                               gfp_flags);
+                               GFP_KERNEL);
                        set_dev_node(&dd->pcidev->dev, old_node_id);
                        if (!rcd->rcvhdrtail_kvaddr)
                                goto bail_free;
@@ -1621,17 +1617,8 @@ int qib_setup_eagerbufs(struct qib_ctxtdata *rcd)
        struct qib_devdata *dd = rcd->dd;
        unsigned e, egrcnt, egrperchunk, chunk, egrsize, egroff;
        size_t size;
-       gfp_t gfp_flags;
        int old_node_id;
 
-       /*
-        * GFP_USER, but without GFP_FS, so buffer cache can be
-        * coalesced (we hope); otherwise, even at order 4,
-        * heavy filesystem activity makes these fail, and we can
-        * use compound pages.
-        */
-       gfp_flags = __GFP_RECLAIM | __GFP_IO | __GFP_COMP;
-
        egrcnt = rcd->rcvegrcnt;
        egroff = rcd->rcvegr_tid_base;
        egrsize = dd->rcvegrbufsize;
@@ -1663,7 +1650,7 @@ int qib_setup_eagerbufs(struct qib_ctxtdata *rcd)
                rcd->rcvegrbuf[e] =
                        dma_alloc_coherent(&dd->pcidev->dev, size,
                                           &rcd->rcvegrbuf_phys[e],
-                                          gfp_flags);
+                                          GFP_KERNEL);
                set_dev_node(&dd->pcidev->dev, old_node_id);
                if (!rcd->rcvegrbuf[e])
                        goto bail_rcvegrbuf_phys;