Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72286
b: refs/heads/master
c: 8c08d50
h: refs/heads/master
v: v3
  • Loading branch information
Joachim Fenkes authored and Roland Dreier committed Oct 18, 2007
1 parent 136cfe7 commit 79d6038
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9511724da9c090da5a6dcf6c557b1cedc4f5cfd7
refs/heads/master: 8c08d50d4fc52a9367c356ebbeb194c30fbc7ac8
15 changes: 4 additions & 11 deletions trunk/drivers/infiniband/hw/ehca/ehca_mrmw.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,9 @@ enum ehca_mr_pgsize {

static u32 ehca_encode_hwpage_size(u32 pgsize)
{
u32 idx = 0;
pgsize >>= 12;
/*
* map mr page size into hw code:
* 0, 1, 2, 3 for 4K, 64K, 1M, 64M
*/
while (!(pgsize & 1)) {
idx++;
pgsize >>= 4;
}
return idx;
int log = ilog2(pgsize);
WARN_ON(log < 12 || log > 24 || log & 3);
return (log - 12) / 4;
}

static u64 ehca_get_max_hwpage_size(struct ehca_shca *shca)
Expand Down Expand Up @@ -826,6 +818,7 @@ struct ib_fmr *ehca_alloc_fmr(struct ib_pd *pd,

/* register MR on HCA */
memset(&pginfo, 0, sizeof(pginfo));
pginfo.hwpage_size = hw_pgsize;
/*
* pginfo.num_hwpages==0, ie register_rpages() will not be called
* but deferred to map_phys_fmr()
Expand Down

0 comments on commit 79d6038

Please sign in to comment.