43 #include <linux/slab.h>
56 my_context = kzalloc(
sizeof *my_context,
GFP_KERNEL);
58 ehca_err(device,
"Out of memory device=%p", device);
75 ehca_gen_err(
"Invalid vma struct vm_start=%lx vm_end=%lx",
81 ehca_gen_err(
"Use count overflow vm_start=%lx vm_end=%lx",
91 ehca_gen_err(
"Invalid vma struct vm_start=%lx vm_end=%lx",
100 static const struct vm_operations_struct vm_ops = {
101 .open = ehca_mm_open,
102 .close = ehca_mm_close,
117 physical = galpas->
user.fw_handle;
119 ehca_gen_dbg(
"vsize=%llx physical=%llx", vsize, physical);
142 vma->
vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
145 u64 virt_addr = (
u64)ipz_qeit_calc(queue, ofs);
172 "ehca_mmap_fw() failed rc=%i cq_num=%x",
183 "ehca_mmap_queue() failed rc=%i cq_num=%x",
209 "remap_pfn_range() failed ret=%i qp_num=%x",
210 ret, qp->
ib_qp.qp_num);
221 "ehca_mmap_queue(rq) failed rc=%i qp_num=%x",
222 ret, qp->
ib_qp.qp_num);
233 "ehca_mmap_queue(sq) failed rc=%i qp_num=%x",
234 ret, qp->
ib_qp.qp_num);
241 rsrc_type, qp->
ib_qp.qp_num);
251 u32 idr_handle = fileoffset & 0x1FFFFFF;
252 u32 q_type = (fileoffset >> 27) & 0x1;
253 u32 rsrc_type = (fileoffset >> 25) & 0x3;
269 if (!cq->
ib_cq.uobject || cq->
ib_cq.uobject->context != context)
272 ret = ehca_mmap_cq(vma, cq, rsrc_type);
275 "ehca_mmap_cq() failed rc=%i cq_num=%x",
291 if (!uobject || uobject->
context != context)
294 ret = ehca_mmap_qp(vma, qp, rsrc_type);
297 "ehca_mmap_qp() failed rc=%i qp_num=%x",
298 ret, qp->
ib_qp.qp_num);