tree e9a2d836259c200967e4be4185fcc7cc9a3e80ed
parent e464b2a6c2c297702205ab725fd82489550a7893
author Roland Dreier <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:26:18 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:26:18 -0700

[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]>

 infiniband/hw/mthca/mthca_memfree.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: drivers/infiniband/hw/mthca/mthca_memfree.c
===================================================================
--- 
d7857bd1bcfd5607998b830130f1ef23f7322809/drivers/infiniband/hw/mthca/mthca_memfree.c
  (mode:100644 sha1:a70a1c712b4bc2aa873d1bc0e7e63c46ef4fbf66)
+++ 
e9a2d836259c200967e4be4185fcc7cc9a3e80ed/drivers/infiniband/hw/mthca/mthca_memfree.c
  (mode:100644 sha1:e8f93478f38d94ee96b413b3384f5e53cd021b96)
@@ -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