tree 80a7695578c0e9adf96996a46f6ea3633e31f8a7
parent 2c1d5be32bba9185cdb98b06154c9e8d04c94e33
author Roland Dreier <[EMAIL PROTECTED]> Tue Apr 12 08:26:45 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:26:45 2005

[PATCH] IB/mthca: allocate correct number of doorbell pages

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]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 mthca_memfree.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: drivers/infiniband/hw/mthca/mthca_memfree.c
===================================================================
--- 
600a28a4fcdaf518144c49acfe1e5d1e9f6042c6/drivers/infiniband/hw/mthca/mthca_memfree.c
  (mode:100644 sha1:4f60d62437c3e78885297ed2872491ee558ab328)
+++ 
80a7695578c0e9adf96996a46f6ea3633e31f8a7/drivers/infiniband/hw/mthca/mthca_memfree.c
  (mode:100644 sha1:3ac0037726ef46bac15f9526b3601e45530ef4db)
@@ -446,7 +446,7 @@
 
        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 bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to