1a113b103SEmmanuel Vadot /*- 2a113b103SEmmanuel Vadot * Copyright (c) 2020 The FreeBSD Foundation 3a113b103SEmmanuel Vadot * 4a113b103SEmmanuel Vadot * This software was developed by Emmanuel Vadot under sponsorship 5a113b103SEmmanuel Vadot * from the FreeBSD Foundation. 6a113b103SEmmanuel Vadot * 7a113b103SEmmanuel Vadot * Redistribution and use in source and binary forms, with or without 8a113b103SEmmanuel Vadot * modification, are permitted provided that the following conditions 9a113b103SEmmanuel Vadot * are met: 10a113b103SEmmanuel Vadot * 1. Redistributions of source code must retain the above copyright 11a113b103SEmmanuel Vadot * notice, this list of conditions and the following disclaimer. 12a113b103SEmmanuel Vadot * 2. Redistributions in binary form must reproduce the above copyright 13a113b103SEmmanuel Vadot * notice, this list of conditions and the following disclaimer in the 14a113b103SEmmanuel Vadot * documentation and/or other materials provided with the distribution. 15a113b103SEmmanuel Vadot * 16a113b103SEmmanuel Vadot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17a113b103SEmmanuel Vadot * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18a113b103SEmmanuel Vadot * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19a113b103SEmmanuel Vadot * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20a113b103SEmmanuel Vadot * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21a113b103SEmmanuel Vadot * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22a113b103SEmmanuel Vadot * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23a113b103SEmmanuel Vadot * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24a113b103SEmmanuel Vadot * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25a113b103SEmmanuel Vadot * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26a113b103SEmmanuel Vadot * SUCH DAMAGE. 27a113b103SEmmanuel Vadot * 28a113b103SEmmanuel Vadot * $FreeBSD$ 29a113b103SEmmanuel Vadot */ 30a113b103SEmmanuel Vadot 31307f78f3SVladimir Kondratyev #ifndef _LINUXKPI_LINUX_PAGEMAP_H_ 32307f78f3SVladimir Kondratyev #define _LINUXKPI_LINUX_PAGEMAP_H_ 33a113b103SEmmanuel Vadot 34a113b103SEmmanuel Vadot #include <linux/mm.h> 35b829f450SEmmanuel Vadot #include <linux/highmem.h> 36*3d47e3bfSJean-Sébastien Pédron #include <linux/vmalloc.h> 37a113b103SEmmanuel Vadot 38a113b103SEmmanuel Vadot static inline void 39a113b103SEmmanuel Vadot release_pages(struct page **pages, int nr) 40a113b103SEmmanuel Vadot { 41a113b103SEmmanuel Vadot int i; 42a113b103SEmmanuel Vadot 43a113b103SEmmanuel Vadot for (i = 0; i < nr; i++) 44a113b103SEmmanuel Vadot put_page(pages[i]); 45a113b103SEmmanuel Vadot } 46a113b103SEmmanuel Vadot 474aa82e43SEmmanuel Vadot static inline void 484aa82e43SEmmanuel Vadot mapping_clear_unevictable(vm_object_t mapping) 494aa82e43SEmmanuel Vadot { 504aa82e43SEmmanuel Vadot } 514aa82e43SEmmanuel Vadot 52a113b103SEmmanuel Vadot #endif 53