aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_mrmw.h
diff options
context:
space:
mode:
authorHannes Hering <hering2@de.ibm.com>2009-06-23 01:18:51 -0400
committerRoland Dreier <rolandd@cisco.com>2009-06-23 01:18:51 -0400
commit0cf89dcdbc53f2b43e4ce7419b6ff47f4309c2eb (patch)
treebee90178d8da3c89884daed60686fc59a952ce79 /drivers/infiniband/hw/ehca/ehca_mrmw.h
parent65795efbd380a832ae508b04dba8f8e53f0b84d9 (diff)
IB/ehca: Tolerate dynamic memory operations before driver load
Implement toleration of dynamic memory operations and 16 GB gigantic pages, where "toleration" means that the driver can cope with dynamic memory operations that happen before the driver is loaded. While the ehca driver is loaded, dynamic memory operations are still prohibited by returning NOTIFY_BAD from the memory notifier. On module load the driver walks through available system memory, checks for available memory ranges and then registers the kernel internal memory region accordingly. The translation of address ranges is implemented via a 3-level busmap. Signed-off-by: Hannes Hering <hering2@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_mrmw.h')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_mrmw.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.h b/drivers/infiniband/hw/ehca/ehca_mrmw.h
index bc8f4e31c123..50d8b51306dd 100644
--- a/drivers/infiniband/hw/ehca/ehca_mrmw.h
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.h
@@ -42,6 +42,11 @@
42#ifndef _EHCA_MRMW_H_ 42#ifndef _EHCA_MRMW_H_
43#define _EHCA_MRMW_H_ 43#define _EHCA_MRMW_H_
44 44
45enum ehca_reg_type {
46 EHCA_REG_MR,
47 EHCA_REG_BUSMAP_MR
48};
49
45int ehca_reg_mr(struct ehca_shca *shca, 50int ehca_reg_mr(struct ehca_shca *shca,
46 struct ehca_mr *e_mr, 51 struct ehca_mr *e_mr,
47 u64 *iova_start, 52 u64 *iova_start,
@@ -50,7 +55,8 @@ int ehca_reg_mr(struct ehca_shca *shca,
50 struct ehca_pd *e_pd, 55 struct ehca_pd *e_pd,
51 struct ehca_mr_pginfo *pginfo, 56 struct ehca_mr_pginfo *pginfo,
52 u32 *lkey, 57 u32 *lkey,
53 u32 *rkey); 58 u32 *rkey,
59 enum ehca_reg_type reg_type);
54 60
55int ehca_reg_mr_rpages(struct ehca_shca *shca, 61int ehca_reg_mr_rpages(struct ehca_shca *shca,
56 struct ehca_mr *e_mr, 62 struct ehca_mr *e_mr,
@@ -118,4 +124,9 @@ void ehca_mrmw_reverse_map_acl(const u32 *hipz_acl,
118 124
119void ehca_mr_deletenew(struct ehca_mr *mr); 125void ehca_mr_deletenew(struct ehca_mr *mr);
120 126
127int ehca_create_busmap(void);
128
129void ehca_destroy_busmap(void);
130
131extern struct ib_dma_mapping_ops ehca_dma_mapping_ops;
121#endif /*_EHCA_MRMW_H_*/ 132#endif /*_EHCA_MRMW_H_*/