diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2005-04-16 15:26:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:26:26 -0700 |
commit | 9095e208d84c349193fa19245cd5a8bc1a9774b8 (patch) | |
tree | cdef394c9e01b44d59125b8a4e299e4a7d984384 /drivers/infiniband/hw/mthca/mthca_dev.h | |
parent | 8df8a34de60f8e51c87e5c145679f1a896133199 (diff) |
[PATCH] IB/mthca: encapsulate MTT buddy allocator
Encapsulate the buddy allocator used for MTT segments. This cleans up the
code and also gets us ready to add FMR support.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_dev.h')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_dev.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h index d4bd9aa232b..1faaf542a4e 100644 --- a/drivers/infiniband/hw/mthca/mthca_dev.h +++ b/drivers/infiniband/hw/mthca/mthca_dev.h @@ -170,10 +170,15 @@ struct mthca_pd_table { struct mthca_alloc alloc; }; +struct mthca_buddy { + unsigned long **bits; + int max_order; + spinlock_t lock; +}; + struct mthca_mr_table { struct mthca_alloc mpt_alloc; - int max_mtt_order; - unsigned long **mtt_buddy; + struct mthca_buddy mtt_buddy; u64 mtt_base; struct mthca_icm_table *mtt_table; struct mthca_icm_table *mpt_table; |