]> err.no Git - linux-2.6/blobdiff - drivers/infiniband/hw/mthca/mthca_profile.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux-2.6] / drivers / infiniband / hw / mthca / mthca_profile.c
index 58d44aa3c30297a6920c8b292a27cb458b1a7763..605a8d57fac6764c97a7029b887e7517dbdadb9f 100644 (file)
@@ -63,7 +63,7 @@ enum {
        MTHCA_NUM_PDS = 1 << 15
 };
 
-u64 mthca_make_profile(struct mthca_dev *dev,
+s64 mthca_make_profile(struct mthca_dev *dev,
                       struct mthca_profile *request,
                       struct mthca_dev_lim *dev_lim,
                       struct mthca_init_hca_param *init_hca)
@@ -77,7 +77,7 @@ u64 mthca_make_profile(struct mthca_dev *dev,
        };
 
        u64 mem_base, mem_avail;
-       u64 total_size = 0;
+       s64 total_size = 0;
        struct mthca_resource *profile;
        struct mthca_resource tmp;
        int i, j;
@@ -277,7 +277,7 @@ u64 mthca_make_profile(struct mthca_dev *dev,
         * out of the MR pool. They don't use additional memory, but
         * we assign them as part of the HCA profile anyway.
         */
-       if (mthca_is_memfree(dev))
+       if (mthca_is_memfree(dev) || BITS_PER_LONG == 64)
                dev->limits.fmr_reserved_mtts = 0;
        else
                dev->limits.fmr_reserved_mtts = request->fmr_reserved_mtts;