From 9d2b6b9b525afe5dc925e024b6f25051d601cae1 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 26 Apr 2016 16:36:30 +0000 Subject: [PATCH] Move definitions of MPOL_* constants to xlat files * mem.c (MPOL_DEFAULT, MPOL_PREFERRED, MPOL_BIND, MPOL_INTERLEAVE): Move to xlat/policies.in. (MPOL_F_NODE, MPOL_F_ADDR): Move to xlat/mempolicyflags.in. (MPOL_MF_STRICT, MPOL_MF_MOVE, MPOL_MF_MOVE_ALL): Move to xlat/mbindflags.in. --- mem.c | 12 ------------ xlat/mbindflags.in | 6 +++--- xlat/mempolicyflags.in | 4 ++-- xlat/policies.in | 8 ++++---- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/mem.c b/mem.c index 1f37826f..09d1af91 100644 --- a/mem.c +++ b/mem.c @@ -315,18 +315,6 @@ SYS_FUNC(remap_file_pages) return RVAL_DECODED; } -#define MPOL_DEFAULT 0 -#define MPOL_PREFERRED 1 -#define MPOL_BIND 2 -#define MPOL_INTERLEAVE 3 - -#define MPOL_F_NODE (1<<0) -#define MPOL_F_ADDR (1<<1) - -#define MPOL_MF_STRICT (1<<0) -#define MPOL_MF_MOVE (1<<1) -#define MPOL_MF_MOVE_ALL (1<<2) - #include "xlat/policies.h" #include "xlat/mbindflags.h" #include "xlat/mempolicyflags.h" diff --git a/xlat/mbindflags.in b/xlat/mbindflags.in index 105504e9..04f3ae65 100644 --- a/xlat/mbindflags.in +++ b/xlat/mbindflags.in @@ -1,3 +1,3 @@ -MPOL_MF_STRICT -MPOL_MF_MOVE -MPOL_MF_MOVE_ALL +MPOL_MF_STRICT 1 +MPOL_MF_MOVE 2 +MPOL_MF_MOVE_ALL 4 diff --git a/xlat/mempolicyflags.in b/xlat/mempolicyflags.in index 89c414b7..bdcc6f3e 100644 --- a/xlat/mempolicyflags.in +++ b/xlat/mempolicyflags.in @@ -1,2 +1,2 @@ -MPOL_F_NODE -MPOL_F_ADDR +MPOL_F_NODE 1 +MPOL_F_ADDR 2 diff --git a/xlat/policies.in b/xlat/policies.in index 22599fd8..fab53962 100644 --- a/xlat/policies.in +++ b/xlat/policies.in @@ -1,4 +1,4 @@ -MPOL_DEFAULT -MPOL_PREFERRED -MPOL_BIND -MPOL_INTERLEAVE +MPOL_DEFAULT 0 +MPOL_PREFERRED 1 +MPOL_BIND 2 +MPOL_INTERLEAVE 3 -- 2.40.0