2 * IBM eServer eHCA Infiniband device driver for Linux on POWER
4 * MR/MW declarations and inline functions
6 * Authors: Dietmar Decker <ddecker@de.ibm.com>
7 * Christoph Raisch <raisch@de.ibm.com>
9 * Copyright (c) 2005 IBM Corporation
11 * All rights reserved.
13 * This source code is distributed under a dual license of GPL v2.0 and OpenIB
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions are met:
21 * Redistributions of source code must retain the above copyright notice, this
22 * list of conditions and the following disclaimer.
24 * Redistributions in binary form must reproduce the above copyright notice,
25 * this list of conditions and the following disclaimer in the documentation
26 * and/or other materials
27 * provided with the distribution.
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
30 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
33 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
36 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
37 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39 * POSSIBILITY OF SUCH DAMAGE.
45 int ehca_reg_mr(struct ehca_shca *shca,
51 struct ehca_mr_pginfo *pginfo,
55 int ehca_reg_mr_rpages(struct ehca_shca *shca,
57 struct ehca_mr_pginfo *pginfo);
59 int ehca_rereg_mr(struct ehca_shca *shca,
65 struct ehca_mr_pginfo *pginfo,
69 int ehca_unmap_one_fmr(struct ehca_shca *shca,
70 struct ehca_mr *e_fmr);
72 int ehca_reg_smr(struct ehca_shca *shca,
73 struct ehca_mr *e_origmr,
74 struct ehca_mr *e_newmr,
81 int ehca_reg_internal_maxmr(struct ehca_shca *shca,
83 struct ehca_mr **maxmr);
85 int ehca_reg_maxmr(struct ehca_shca *shca,
86 struct ehca_mr *e_newmr,
93 int ehca_dereg_internal_maxmr(struct ehca_shca *shca);
95 int ehca_mr_chk_buf_and_calc_size(struct ib_phys_buf *phys_buf_array,
100 int ehca_fmr_check_page_list(struct ehca_mr *e_fmr,
104 int ehca_set_pagebuf(struct ehca_mr_pginfo *pginfo,
108 int ehca_mr_is_maxmr(u64 size,
111 void ehca_mrmw_map_acl(int ib_acl,
114 void ehca_mrmw_set_pgsize_hipz_acl(u32 pgsize, u32 *hipz_acl);
116 void ehca_mrmw_reverse_map_acl(const u32 *hipz_acl,
119 void ehca_mr_deletenew(struct ehca_mr *mr);
121 #endif /*_EHCA_MRMW_H_*/