IB/qib: Don't mark VL15 bufs as WC to avoid a rare 7322 chip problem
[pandora-kernel.git] / drivers / infiniband / hw / qib / qib_iba7322.c
index 503992d..3e9828b 100644 (file)
@@ -6119,9 +6119,25 @@ static int qib_init_7322_variables(struct qib_devdata *dd)
        qib_set_ctxtcnt(dd);
 
        if (qib_wc_pat) {
-               ret = init_chip_wc_pat(dd, NUM_VL15_BUFS * dd->align4k);
+               resource_size_t vl15off;
+               /*
+                * We do not set WC on the VL15 buffers to avoid
+                * a rare problem with unaligned writes from
+                * interrupt-flushed store buffers, so we need
+                * to map those separately here.  We can't solve
+                * this for the rarely used mtrr case.
+                */
+               ret = init_chip_wc_pat(dd, 0);
                if (ret)
                        goto bail;
+
+               /* vl15 buffers start just after the 4k buffers */
+               vl15off = dd->physaddr + (dd->piobufbase >> 32) +
+                       dd->piobcnt4k * dd->align4k;
+               dd->piovl15base = ioremap_nocache(vl15off,
+                                                 NUM_VL15_BUFS * dd->align4k);
+               if (!dd->piovl15base)
+                       goto bail;
        }
        qib_7322_set_baseaddrs(dd); /* set chip access pointers now */