From: Roland Dreier <[email protected]>
Doorbell record pages are allocated in HCA page size chunks (always 4096
bytes), so we need to divide by 4096 and not PAGE_SIZE when figuring out how
many pages we'll need space for.
Signed-off-by: Roland Dreier <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
25-akpm/drivers/infiniband/hw/mthca/mthca_memfree.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/infiniband/hw/mthca/mthca_memfree.c~ib-mthca-allocate-correct-number-of-doorbell-pages drivers/infiniband/hw/mthca/mthca_memfree.c
--- 25/drivers/infiniband/hw/mthca/mthca_memfree.c~ib-mthca-allocate-correct-number-of-doorbell-pages 2005-04-12 03:21:43.467528832 -0700
+++ 25-akpm/drivers/infiniband/hw/mthca/mthca_memfree.c 2005-04-12 03:21:43.470528376 -0700
@@ -446,7 +446,7 @@ int mthca_init_db_tab(struct mthca_dev *
init_MUTEX(&dev->db_tab->mutex);
- dev->db_tab->npages = dev->uar_table.uarc_size / PAGE_SIZE;
+ dev->db_tab->npages = dev->uar_table.uarc_size / 4096;
dev->db_tab->max_group1 = 0;
dev->db_tab->min_group2 = dev->db_tab->npages - 1;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]