From: Michael S. Tsirkin Date: Fri, 22 Sep 2006 22:17:18 +0000 (-0700) Subject: IB/mthca: Don't use privileged UAR for kernel access X-Git-Tag: v2.6.19-rc1~1293^2~63 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fd558f454b666aca218a990d44f9e1ffac6ed4d;p=linux-2.6 IB/mthca: Don't use privileged UAR for kernel access Make kernel use UAR2 instead of UAR1 for hardware access: this adds sanity checking from the hardware side, without any performance cost. Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/mthca/mthca_uar.c b/drivers/infiniband/hw/mthca/mthca_uar.c index 8e9219842b..8b72848641 100644 --- a/drivers/infiniband/hw/mthca/mthca_uar.c +++ b/drivers/infiniband/hw/mthca/mthca_uar.c @@ -60,7 +60,7 @@ int mthca_init_uar_table(struct mthca_dev *dev) ret = mthca_alloc_init(&dev->uar_table.alloc, dev->limits.num_uars, dev->limits.num_uars - 1, - dev->limits.reserved_uars); + dev->limits.reserved_uars + 1); if (ret) return ret;