blob: a58fc4987e54a63e0f6fb06f734ccd46fb5bad25 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_MMAN_H
20#define _UAPI_LINUX_MMAN_H
21#include <asm/mman.h>
Christopher Ferris1308ad32017-11-14 17:32:13 -080022#include <asm-generic/hugetlb_encode.h>
Christopher Ferris8666d042023-09-06 14:55:31 -070023#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define MREMAP_MAYMOVE 1
Ben Cheng655a7c02013-10-16 16:09:24 -070025#define MREMAP_FIXED 2
Christopher Ferrisaf09c702020-06-01 20:29:29 -070026#define MREMAP_DONTUNMAP 4
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define OVERCOMMIT_GUESS 0
28#define OVERCOMMIT_ALWAYS 1
29#define OVERCOMMIT_NEVER 2
Christopher Ferris24f97eb2019-05-20 12:58:13 -070030#define MAP_SHARED 0x01
31#define MAP_PRIVATE 0x02
32#define MAP_SHARED_VALIDATE 0x03
Christopher Ferris1308ad32017-11-14 17:32:13 -080033#define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT
34#define MAP_HUGE_MASK HUGETLB_FLAG_ENCODE_MASK
Christopher Ferris32ff3f82020-12-14 13:10:04 -080035#define MAP_HUGE_16KB HUGETLB_FLAG_ENCODE_16KB
Christopher Ferris1308ad32017-11-14 17:32:13 -080036#define MAP_HUGE_64KB HUGETLB_FLAG_ENCODE_64KB
37#define MAP_HUGE_512KB HUGETLB_FLAG_ENCODE_512KB
38#define MAP_HUGE_1MB HUGETLB_FLAG_ENCODE_1MB
39#define MAP_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB
40#define MAP_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB
41#define MAP_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB
Christopher Ferris9ce28842018-10-25 12:11:39 -070042#define MAP_HUGE_32MB HUGETLB_FLAG_ENCODE_32MB
Christopher Ferris1308ad32017-11-14 17:32:13 -080043#define MAP_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB
Christopher Ferris9ce28842018-10-25 12:11:39 -070044#define MAP_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB
Christopher Ferris1308ad32017-11-14 17:32:13 -080045#define MAP_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB
46#define MAP_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB
47#define MAP_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB
Christopher Ferris8666d042023-09-06 14:55:31 -070048struct cachestat_range {
49 __u64 off;
50 __u64 len;
51};
52struct cachestat {
53 __u64 nr_cache;
54 __u64 nr_dirty;
55 __u64 nr_writeback;
56 __u64 nr_evicted;
57 __u64 nr_recently_evicted;
58};
Ben Cheng655a7c02013-10-16 16:09:24 -070059#endif