criu/include/common
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
..
arch ppc64/aarch64: Dynamically define PAGE_SIZE 2018-07-04 03:17:17 +03:00
asm-generic headers: Fix iquote for include/common 2016-11-03 00:13:04 +03:00
bitops.h files: Fix test and set endianess problem 2017-02-06 14:09:15 +03:00
bitsperlong.h common: bitsperlong -- Specify complete path 2016-11-03 00:13:04 +03:00
bug.h include/common: Move bug.h in 2016-11-03 00:13:03 +03:00
compiler.h utils: Introduce SWAP() helper to exchange two variables 2018-03-02 10:10:34 +03:00
err.h headers: Move err.h to common 2016-11-03 00:13:04 +03:00
list.h common: Move compiler.h into 2016-11-03 00:13:03 +03:00
lock.h compel: Include compel headers as system ones 2017-03-15 00:06:02 +03:00
page.h common: Use complete path in inclusion 2016-11-03 00:13:04 +03:00
scm-code.c util: zero msghdr structures 2017-02-06 13:29:55 +03:00
scm.h scm: Allow to pass flags argument to recv_fds() 2017-02-03 18:04:22 +03:00
xmalloc.h headers: Move xmalloc to common 2016-11-03 00:13:04 +03:00