xref: /dflybsd-src/sys/dev/drm/include/linux/swap.h (revision 3a690f1e97b84fb70a78357ce94238f5f74bc4bc)
1*3a690f1eSFrançois Tigeot /*
2*3a690f1eSFrançois Tigeot  * Copyright (c) 2015 François Tigeot
3*3a690f1eSFrançois Tigeot  * All rights reserved.
4*3a690f1eSFrançois Tigeot  *
5*3a690f1eSFrançois Tigeot  * Redistribution and use in source and binary forms, with or without
6*3a690f1eSFrançois Tigeot  * modification, are permitted provided that the following conditions
7*3a690f1eSFrançois Tigeot  * are met:
8*3a690f1eSFrançois Tigeot  * 1. Redistributions of source code must retain the above copyright
9*3a690f1eSFrançois Tigeot  *    notice unmodified, this list of conditions, and the following
10*3a690f1eSFrançois Tigeot  *    disclaimer.
11*3a690f1eSFrançois Tigeot  * 2. Redistributions in binary form must reproduce the above copyright
12*3a690f1eSFrançois Tigeot  *    notice, this list of conditions and the following disclaimer in the
13*3a690f1eSFrançois Tigeot  *    documentation and/or other materials provided with the distribution.
14*3a690f1eSFrançois Tigeot  *
15*3a690f1eSFrançois Tigeot  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16*3a690f1eSFrançois Tigeot  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17*3a690f1eSFrançois Tigeot  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18*3a690f1eSFrançois Tigeot  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19*3a690f1eSFrançois Tigeot  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20*3a690f1eSFrançois Tigeot  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21*3a690f1eSFrançois Tigeot  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22*3a690f1eSFrançois Tigeot  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23*3a690f1eSFrançois Tigeot  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24*3a690f1eSFrançois Tigeot  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*3a690f1eSFrançois Tigeot  */
26*3a690f1eSFrançois Tigeot 
27*3a690f1eSFrançois Tigeot #ifndef _LINUX_SWAP_H_
28*3a690f1eSFrançois Tigeot #define _LINUX_SWAP_H_
29*3a690f1eSFrançois Tigeot 
30*3a690f1eSFrançois Tigeot #include <vm/vm_page2.h>
31*3a690f1eSFrançois Tigeot 
32*3a690f1eSFrançois Tigeot static inline void mark_page_accessed(struct vm_page *m)
33*3a690f1eSFrançois Tigeot {
34*3a690f1eSFrançois Tigeot 	vm_page_flag_set(m, PG_REFERENCED);
35*3a690f1eSFrançois Tigeot }
36*3a690f1eSFrançois Tigeot 
37*3a690f1eSFrançois Tigeot #endif	/* _LINUX_SWAP_H_ */
38