xref: /dflybsd-src/sys/dev/drm/include/linux/shmem_fs.h (revision afa4e7079a10b875218e1c8fe8945d130d9cc0c1)
11964046dSFrançois Tigeot /*-
21964046dSFrançois Tigeot  * Copyright (c) 2011 The FreeBSD Foundation
3*a85cb24fSFrançois Tigeot  * Copyright (c) 2014-2020 François Tigeot <ftigeot@wolfpond.org>
41964046dSFrançois Tigeot  * All rights reserved.
51964046dSFrançois Tigeot  *
61964046dSFrançois Tigeot  * Portions of this software were developed by Konstantin Belousov
71964046dSFrançois Tigeot  * under sponsorship from the FreeBSD Foundation.
81964046dSFrançois Tigeot  *
91964046dSFrançois Tigeot  * Redistribution and use in source and binary forms, with or without
101964046dSFrançois Tigeot  * modification, are permitted provided that the following conditions
111964046dSFrançois Tigeot  * are met:
121964046dSFrançois Tigeot  * 1. Redistributions of source code must retain the above copyright
131964046dSFrançois Tigeot  *    notice, this list of conditions and the following disclaimer.
141964046dSFrançois Tigeot  * 2. Redistributions in binary form must reproduce the above copyright
151964046dSFrançois Tigeot  *    notice, this list of conditions and the following disclaimer in the
161964046dSFrançois Tigeot  *    documentation and/or other materials provided with the distribution.
171964046dSFrançois Tigeot  *
181964046dSFrançois Tigeot  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
191964046dSFrançois Tigeot  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
201964046dSFrançois Tigeot  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
211964046dSFrançois Tigeot  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
221964046dSFrançois Tigeot  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
231964046dSFrançois Tigeot  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
241964046dSFrançois Tigeot  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
251964046dSFrançois Tigeot  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
261964046dSFrançois Tigeot  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
271964046dSFrançois Tigeot  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
281964046dSFrançois Tigeot  * SUCH DAMAGE.
291964046dSFrançois Tigeot  *
301964046dSFrançois Tigeot  */
311964046dSFrançois Tigeot 
321964046dSFrançois Tigeot #ifndef _LINUX_SHMEM_FS_H_
331964046dSFrançois Tigeot #define _LINUX_SHMEM_FS_H_
341964046dSFrançois Tigeot 
35*a85cb24fSFrançois Tigeot #include <linux/file.h>
36f0bba3d1SFrançois Tigeot #include <linux/swap.h>
37*a85cb24fSFrançois Tigeot #include <linux/mempolicy.h>
38e72284adSFrançois Tigeot #include <linux/pagemap.h>
39e72284adSFrançois Tigeot 
40f0bba3d1SFrançois Tigeot struct page * shmem_read_mapping_page(vm_object_t, vm_pindex_t);
411964046dSFrançois Tigeot 
42*a85cb24fSFrançois Tigeot struct page *shmem_read_mapping_page_gfp(struct vm_object *mapping,
43*a85cb24fSFrançois Tigeot     pgoff_t index, gfp_t gfp_mask);
44*a85cb24fSFrançois Tigeot 
451964046dSFrançois Tigeot #endif	/* _LINUX_SHMEM_FS_H_ */
46