Clang support for gnu_inline attribute
[uclibc-ng.git] / libc / sysdeps / linux / nds32 / bits / uClibc_page.h
blob0438493dbdc4d414df79e90577d08b6dfe14de30
1 /*
2 * Copyright (C) 2016 Andes Technology, Inc.
3 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
4 */
6 #ifndef _UCLIBC_PAGE_H
7 #define _UCLIBC_PAGE_H
9 /*
10 * Linux/NDS32 supports 4k and 8k pages (build time).
12 * Although uClibc determines page size dynamically from kernel's auxv
13 * still the generic code needs a fall back
14 * _dl_pagesize = auxvt[AT_PAGESZ].a_un.a_val ? : PAGE_SIZE
17 #include <features.h>
19 #if defined(__CONFIG_NDS32_PAGE_SIZE_8K__)
20 #define PAGE_SHIFT 13
21 #else
22 #define PAGE_SHIFT 12
23 #endif
25 #define PAGE_SIZE (1UL << PAGE_SHIFT)
26 #define PAGE_MASK (~(PAGE_SIZE-1))
28 /* TBD: fix this with runtime value for a PAGE_SIZE agnostic uClibc */
29 #define MMAP2_PAGE_SHIFT PAGE_SHIFT
31 #endif /* _UCLIBC_PAGE_H */