13779d0eaSFrançois Tigeot /* 2*2cce721cSFrançois Tigeot * Copyright (c) 2015-2017 François Tigeot <ftigeot@wolfpond.org> 33779d0eaSFrançois Tigeot * All rights reserved. 43779d0eaSFrançois Tigeot * 53779d0eaSFrançois Tigeot * Redistribution and use in source and binary forms, with or without 63779d0eaSFrançois Tigeot * modification, are permitted provided that the following conditions 73779d0eaSFrançois Tigeot * are met: 83779d0eaSFrançois Tigeot * 1. Redistributions of source code must retain the above copyright 93779d0eaSFrançois Tigeot * notice unmodified, this list of conditions, and the following 103779d0eaSFrançois Tigeot * disclaimer. 113779d0eaSFrançois Tigeot * 2. Redistributions in binary form must reproduce the above copyright 123779d0eaSFrançois Tigeot * notice, this list of conditions and the following disclaimer in the 133779d0eaSFrançois Tigeot * documentation and/or other materials provided with the distribution. 143779d0eaSFrançois Tigeot * 153779d0eaSFrançois Tigeot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 163779d0eaSFrançois Tigeot * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 173779d0eaSFrançois Tigeot * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 183779d0eaSFrançois Tigeot * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 193779d0eaSFrançois Tigeot * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 203779d0eaSFrançois Tigeot * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 213779d0eaSFrançois Tigeot * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 223779d0eaSFrançois Tigeot * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 233779d0eaSFrançois Tigeot * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 243779d0eaSFrançois Tigeot * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 253779d0eaSFrançois Tigeot */ 263779d0eaSFrançois Tigeot 273779d0eaSFrançois Tigeot #ifndef _LINUX_VMALLOC_H_ 283779d0eaSFrançois Tigeot #define _LINUX_VMALLOC_H_ 293779d0eaSFrançois Tigeot 30*2cce721cSFrançois Tigeot #include <linux/spinlock.h> 31*2cce721cSFrançois Tigeot #include <linux/init.h> 32*2cce721cSFrançois Tigeot #include <linux/list.h> 33*2cce721cSFrançois Tigeot #include <asm/page.h> /* pgprot_t */ 34*2cce721cSFrançois Tigeot #include <linux/rbtree.h> 35d11dcf6aSFrançois Tigeot 36646a8671SFrançois Tigeot void *vmap(struct vm_page **pages, unsigned int count, 37646a8671SFrançois Tigeot unsigned long flags, unsigned long prot); 38d11dcf6aSFrançois Tigeot 39646a8671SFrançois Tigeot void vunmap(const void *addr); 403779d0eaSFrançois Tigeot 41*2cce721cSFrançois Tigeot void *vmalloc_user(unsigned long size); 42*2cce721cSFrançois Tigeot 43*2cce721cSFrançois Tigeot void vfree(const void *addr); 44*2cce721cSFrançois Tigeot 453779d0eaSFrançois Tigeot #endif /* _LINUX_VMALLOC_H_ */ 46