1dc21752eSDennis Dalessandro #ifndef DEF_RDMAVTMMAP_H 2dc21752eSDennis Dalessandro #define DEF_RDMAVTMMAP_H 3dc21752eSDennis Dalessandro 4dc21752eSDennis Dalessandro /* 5fe314195SDennis Dalessandro * Copyright(c) 2016 Intel Corporation. 6dc21752eSDennis Dalessandro * 7dc21752eSDennis Dalessandro * This file is provided under a dual BSD/GPLv2 license. When using or 8dc21752eSDennis Dalessandro * redistributing this file, you may do so under either license. 9dc21752eSDennis Dalessandro * 10dc21752eSDennis Dalessandro * GPL LICENSE SUMMARY 11dc21752eSDennis Dalessandro * 12dc21752eSDennis Dalessandro * This program is free software; you can redistribute it and/or modify 13dc21752eSDennis Dalessandro * it under the terms of version 2 of the GNU General Public License as 14dc21752eSDennis Dalessandro * published by the Free Software Foundation. 15dc21752eSDennis Dalessandro * 16dc21752eSDennis Dalessandro * This program is distributed in the hope that it will be useful, but 17dc21752eSDennis Dalessandro * WITHOUT ANY WARRANTY; without even the implied warranty of 18dc21752eSDennis Dalessandro * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19dc21752eSDennis Dalessandro * General Public License for more details. 20dc21752eSDennis Dalessandro * 21dc21752eSDennis Dalessandro * BSD LICENSE 22dc21752eSDennis Dalessandro * 23dc21752eSDennis Dalessandro * Redistribution and use in source and binary forms, with or without 24dc21752eSDennis Dalessandro * modification, are permitted provided that the following conditions 25dc21752eSDennis Dalessandro * are met: 26dc21752eSDennis Dalessandro * 27dc21752eSDennis Dalessandro * - Redistributions of source code must retain the above copyright 28dc21752eSDennis Dalessandro * notice, this list of conditions and the following disclaimer. 29dc21752eSDennis Dalessandro * - Redistributions in binary form must reproduce the above copyright 30dc21752eSDennis Dalessandro * notice, this list of conditions and the following disclaimer in 31dc21752eSDennis Dalessandro * the documentation and/or other materials provided with the 32dc21752eSDennis Dalessandro * distribution. 33dc21752eSDennis Dalessandro * - Neither the name of Intel Corporation nor the names of its 34dc21752eSDennis Dalessandro * contributors may be used to endorse or promote products derived 35dc21752eSDennis Dalessandro * from this software without specific prior written permission. 36dc21752eSDennis Dalessandro * 37dc21752eSDennis Dalessandro * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 38dc21752eSDennis Dalessandro * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 39dc21752eSDennis Dalessandro * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 40dc21752eSDennis Dalessandro * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 41dc21752eSDennis Dalessandro * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42dc21752eSDennis Dalessandro * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 43dc21752eSDennis Dalessandro * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 44dc21752eSDennis Dalessandro * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 45dc21752eSDennis Dalessandro * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 46dc21752eSDennis Dalessandro * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 47dc21752eSDennis Dalessandro * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48dc21752eSDennis Dalessandro * 49dc21752eSDennis Dalessandro */ 50dc21752eSDennis Dalessandro 51dc21752eSDennis Dalessandro #include <rdma/rdma_vt.h> 52dc21752eSDennis Dalessandro 53822514d7SDennis Dalessandro void rvt_mmap_init(struct rvt_dev_info *rdi); 5479a225beSDennis Dalessandro void rvt_release_mmap_info(struct kref *ref); 5579a225beSDennis Dalessandro int rvt_mmap(struct ib_ucontext *context, struct vm_area_struct *vma); 5679a225beSDennis Dalessandro struct rvt_mmap_info *rvt_create_mmap_info(struct rvt_dev_info *rdi, 5779a225beSDennis Dalessandro u32 size, 5879a225beSDennis Dalessandro struct ib_ucontext *context, 5979a225beSDennis Dalessandro void *obj); 6079a225beSDennis Dalessandro void rvt_update_mmap_info(struct rvt_dev_info *rdi, struct rvt_mmap_info *ip, 6179a225beSDennis Dalessandro u32 size, void *obj); 62dc21752eSDennis Dalessandro 63dc21752eSDennis Dalessandro #endif /* DEF_RDMAVTMMAP_H */ 64