criu/include/common/arch
Dmitry Safonov 2d965008d3 ppc64/aarch64: Dynamically define PAGE_SIZE
On ppc64/aarch64 Linux can be set to use Large pages, so the PAGE_SIZE
isn't build-time constant anymore. Define it through _SC_PAGESIZE.

There are different sizes for a page on ppc64:
: #if defined(CONFIG_PPC_256K_PAGES)
: #define PAGE_SHIFT              18
: #elif defined(CONFIG_PPC_64K_PAGES)
: #define PAGE_SHIFT              16
: #elif defined(CONFIG_PPC_16K_PAGES)
: #define PAGE_SHIFT              14
: #else
: #define PAGE_SHIFT              12
: #endif

And on aarch64 there are default sizes and possibly someone can set his
own PAGE_SHIFT:
: config ARM64_PAGE_SHIFT
:         int
:         default 16 if ARM64_64K_PAGES
:         default 14 if ARM64_16K_PAGES
:         default 12

On the downside - each time we need PAGE_SIZE, we're doing libc
function call on aarch64/ppc64.

Fixes: #415

Tested-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-07-04 03:17:17 +03:00
..
aarch64/asm ppc64/aarch64: Dynamically define PAGE_SIZE 2018-07-04 03:17:17 +03:00
arm/asm bits: Add test_and_set_bit() 2017-02-06 14:09:13 +03:00
ppc64/asm ppc64/aarch64: Dynamically define PAGE_SIZE 2018-07-04 03:17:17 +03:00
s390/asm s390: Replace flogr instruction with __builtin_clzl() 2017-08-09 18:51:41 +03:00
x86/asm x86/asm: move user code selector values to common 2017-03-15 00:06:17 +03:00