提交 85665c98 编写于 作者: R Roland Dreier 提交者: Linus Torvalds

[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: NRoland Dreier <roland@topspin.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 e464b2a6
...@@ -446,7 +446,7 @@ int mthca_init_db_tab(struct mthca_dev *dev) ...@@ -446,7 +446,7 @@ int mthca_init_db_tab(struct mthca_dev *dev)
init_MUTEX(&dev->db_tab->mutex); 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->max_group1 = 0;
dev->db_tab->min_group2 = dev->db_tab->npages - 1; dev->db_tab->min_group2 = dev->db_tab->npages - 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册