Skip to content

Commit

Permalink
[PATCH] IB/mthca: allocate correct number of doorbell pages
Browse files Browse the repository at this point in the history
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 <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Roland Dreier authored and Linus Torvalds committed Apr 16, 2005
1 parent e464b2a commit 85665c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/mthca/mthca_memfree.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ int mthca_init_db_tab(struct mthca_dev *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;

Expand Down

0 comments on commit 85665c9

Please sign in to comment.