summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/aarch64/bits/uClibc_page.h
blob: 4f92abcf84ff791282cc61e1af6e3bb286bc47bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
 */

#ifndef _UCLIBC_PAGE_H
#define _UCLIBC_PAGE_H

/*
 * AARCH64 supports 4k, 16k, 64k pages (build time).
 */

#include <features.h>

#if defined(__CONFIG_AARCH64_PAGE_SIZE_64K__)
#define PAGE_SHIFT		16
#elif defined(__CONFIG_AARCH64_PAGE_SIZE_16K__)
#define PAGE_SHIFT		14
#else
#define PAGE_SHIFT		12
#endif

#define PAGE_SIZE	(1UL << PAGE_SHIFT)
#define PAGE_MASK	(~(PAGE_SIZE-1))

#endif /* _UCLIBC_PAGE_H */