aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_dev.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2005-04-16 18:26:26 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:26:26 -0400
commit9095e208d84c349193fa19245cd5a8bc1a9774b8 (patch)
treecdef394c9e01b44d59125b8a4e299e4a7d984384 /drivers/infiniband/hw/mthca/mthca_dev.h
parent8df8a34de60f8e51c87e5c145679f1a896133199 (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.h9
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 d4bd9aa232b1..1faaf542a4e1 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 {
170 struct mthca_alloc alloc; 170 struct mthca_alloc alloc;
171}; 171};
172 172
173struct mthca_buddy {
174 unsigned long **bits;
175 int max_order;
176 spinlock_t lock;
177};
178
173struct mthca_mr_table { 179struct mthca_mr_table {
174 struct mthca_alloc mpt_alloc; 180 struct mthca_alloc mpt_alloc;
175 int max_mtt_order; 181 struct mthca_buddy mtt_buddy;
176 unsigned long **mtt_buddy;
177 u64 mtt_base; 182 u64 mtt_base;
178 struct mthca_icm_table *mtt_table; 183 struct mthca_icm_table *mtt_table;
179 struct mthca_icm_table *mpt_table; 184 struct mthca_icm_table *mpt_table;