[CRIU] [PATCH 1/4] headers: common -- Make page.h a symlink to compel

Cyrill Gorcunov gorcunov at openvz.org
Tue Nov 15 03:58:51 PST 2016


We will need to ship these headers in uapi.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 .../src/lib/include/uapi/asm/infect-types.h        |  2 +-
 .../arch/aarch64/src/lib/include/uapi/asm/page.h   | 21 +++++++++++++++++
 .../arm/src/lib/include/uapi/asm/infect-types.h    |  2 +-
 compel/arch/arm/src/lib/include/uapi/asm/page.h    | 19 ++++++++++++++++
 compel/arch/ppc64/src/lib/include/uapi/asm/page.h  | 25 +++++++++++++++++++++
 .../x86/src/lib/include/uapi/asm/infect-types.h    |  2 +-
 compel/arch/x86/src/lib/include/uapi/asm/page.h    | 19 ++++++++++++++++
 include/common/arch/aarch64/asm/page.h             | 22 +-----------------
 include/common/arch/arm/asm/page.h                 | 20 +----------------
 include/common/arch/ppc64/asm/page.h               | 26 +---------------------
 include/common/arch/x86/asm/page.h                 | 20 +----------------
 11 files changed, 91 insertions(+), 87 deletions(-)
 create mode 100644 compel/arch/aarch64/src/lib/include/uapi/asm/page.h
 create mode 100644 compel/arch/arm/src/lib/include/uapi/asm/page.h
 create mode 100644 compel/arch/ppc64/src/lib/include/uapi/asm/page.h
 create mode 100644 compel/arch/x86/src/lib/include/uapi/asm/page.h
 mode change 100644 => 120000 include/common/arch/aarch64/asm/page.h
 mode change 100644 => 120000 include/common/arch/arm/asm/page.h
 mode change 100644 => 120000 include/common/arch/ppc64/asm/page.h
 mode change 100644 => 120000 include/common/arch/x86/asm/page.h

diff --git a/compel/arch/aarch64/src/lib/include/uapi/asm/infect-types.h b/compel/arch/aarch64/src/lib/include/uapi/asm/infect-types.h
index 7bc195b14d92..73096dabc07f 100644
--- a/compel/arch/aarch64/src/lib/include/uapi/asm/infect-types.h
+++ b/compel/arch/aarch64/src/lib/include/uapi/asm/infect-types.h
@@ -5,7 +5,7 @@
 #include <signal.h>
 #include <sys/mman.h>
 #include <asm/ptrace.h>
-#include "common/page.h"
+#include <compel/asm/page.h>
 
 #define SIGMAX			64
 #define SIGMAX_OLD		31
diff --git a/compel/arch/aarch64/src/lib/include/uapi/asm/page.h b/compel/arch/aarch64/src/lib/include/uapi/asm/page.h
new file mode 100644
index 000000000000..de1fe5428c50
--- /dev/null
+++ b/compel/arch/aarch64/src/lib/include/uapi/asm/page.h
@@ -0,0 +1,21 @@
+#ifndef __CR_ASM_PAGE_H__
+#define __CR_ASM_PAGE_H__
+
+#include <unistd.h>
+
+#ifndef PAGE_SHIFT
+# define PAGE_SHIFT	12
+#endif
+
+#ifndef PAGE_SIZE
+# define PAGE_SIZE	(1UL << PAGE_SHIFT)
+#endif
+
+#ifndef PAGE_MASK
+# define PAGE_MASK	(~(PAGE_SIZE - 1))
+#endif
+
+#define PAGE_PFN(addr)	((addr) / PAGE_SIZE)
+#define page_size()	sysconf(_SC_PAGESIZE)
+
+#endif /* __CR_ASM_PAGE_H__ */
diff --git a/compel/arch/arm/src/lib/include/uapi/asm/infect-types.h b/compel/arch/arm/src/lib/include/uapi/asm/infect-types.h
index 1df9f6836069..9ae16e57fe29 100644
--- a/compel/arch/arm/src/lib/include/uapi/asm/infect-types.h
+++ b/compel/arch/arm/src/lib/include/uapi/asm/infect-types.h
@@ -3,7 +3,7 @@
 
 #include <stdint.h>
 #include <sys/mman.h>
-#include "common/page.h"
+#include <compel/asm/page.h>
 
 #define SIGMAX			64
 #define SIGMAX_OLD		31
diff --git a/compel/arch/arm/src/lib/include/uapi/asm/page.h b/compel/arch/arm/src/lib/include/uapi/asm/page.h
new file mode 100644
index 000000000000..134835556c62
--- /dev/null
+++ b/compel/arch/arm/src/lib/include/uapi/asm/page.h
@@ -0,0 +1,19 @@
+#ifndef __CR_ASM_PAGE_H__
+#define __CR_ASM_PAGE_H__
+
+#ifndef PAGE_SHIFT
+# define PAGE_SHIFT	12
+#endif
+
+#ifndef PAGE_SIZE
+# define PAGE_SIZE	(1UL << PAGE_SHIFT)
+#endif
+
+#ifndef PAGE_MASK
+# define PAGE_MASK	(~(PAGE_SIZE - 1))
+#endif
+
+#define PAGE_PFN(addr)	((addr) / PAGE_SIZE)
+#define page_size()	PAGE_SIZE
+
+#endif /* __CR_ASM_PAGE_H__ */
diff --git a/compel/arch/ppc64/src/lib/include/uapi/asm/page.h b/compel/arch/ppc64/src/lib/include/uapi/asm/page.h
new file mode 100644
index 000000000000..9d10455f1c47
--- /dev/null
+++ b/compel/arch/ppc64/src/lib/include/uapi/asm/page.h
@@ -0,0 +1,25 @@
+#ifndef __CR_ASM_PAGE_H__
+#define __CR_ASM_PAGE_H__
+
+#include <unistd.h>
+
+/*
+ * Default config for Pseries is to use 64K pages.
+ * See kernel file arch/powerpc/configs/pseries_*defconfig
+ */
+#ifndef PAGE_SHIFT
+# define PAGE_SHIFT	16
+#endif
+
+#ifndef PAGE_SIZE
+# define PAGE_SIZE	(1UL << PAGE_SHIFT)
+#endif
+
+#ifndef PAGE_MASK
+# define PAGE_MASK	(~(PAGE_SIZE - 1))
+#endif
+
+#define PAGE_PFN(addr)	((addr) / PAGE_SIZE)
+#define page_size()	sysconf(_SC_PAGESIZE)
+
+#endif /* __CR_ASM_PAGE_H__ */
diff --git a/compel/arch/x86/src/lib/include/uapi/asm/infect-types.h b/compel/arch/x86/src/lib/include/uapi/asm/infect-types.h
index dc574c304733..3882f95615d4 100644
--- a/compel/arch/x86/src/lib/include/uapi/asm/infect-types.h
+++ b/compel/arch/x86/src/lib/include/uapi/asm/infect-types.h
@@ -4,7 +4,7 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include <signal.h>
-#include "common/page.h"
+#include <compel/asm/page.h>
 #include <compel/plugins/std/asm/syscall-types.h>
 
 #define SIGMAX			64
diff --git a/compel/arch/x86/src/lib/include/uapi/asm/page.h b/compel/arch/x86/src/lib/include/uapi/asm/page.h
new file mode 100644
index 000000000000..134835556c62
--- /dev/null
+++ b/compel/arch/x86/src/lib/include/uapi/asm/page.h
@@ -0,0 +1,19 @@
+#ifndef __CR_ASM_PAGE_H__
+#define __CR_ASM_PAGE_H__
+
+#ifndef PAGE_SHIFT
+# define PAGE_SHIFT	12
+#endif
+
+#ifndef PAGE_SIZE
+# define PAGE_SIZE	(1UL << PAGE_SHIFT)
+#endif
+
+#ifndef PAGE_MASK
+# define PAGE_MASK	(~(PAGE_SIZE - 1))
+#endif
+
+#define PAGE_PFN(addr)	((addr) / PAGE_SIZE)
+#define page_size()	PAGE_SIZE
+
+#endif /* __CR_ASM_PAGE_H__ */
diff --git a/include/common/arch/aarch64/asm/page.h b/include/common/arch/aarch64/asm/page.h
deleted file mode 100644
index de1fe5428c50..000000000000
--- a/include/common/arch/aarch64/asm/page.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef __CR_ASM_PAGE_H__
-#define __CR_ASM_PAGE_H__
-
-#include <unistd.h>
-
-#ifndef PAGE_SHIFT
-# define PAGE_SHIFT	12
-#endif
-
-#ifndef PAGE_SIZE
-# define PAGE_SIZE	(1UL << PAGE_SHIFT)
-#endif
-
-#ifndef PAGE_MASK
-# define PAGE_MASK	(~(PAGE_SIZE - 1))
-#endif
-
-#define PAGE_PFN(addr)	((addr) / PAGE_SIZE)
-#define page_size()	sysconf(_SC_PAGESIZE)
-
-#endif /* __CR_ASM_PAGE_H__ */
diff --git a/include/common/arch/aarch64/asm/page.h b/include/common/arch/aarch64/asm/page.h
new file mode 120000
index 000000000000..9e8341c4bd3c
--- /dev/null
+++ b/include/common/arch/aarch64/asm/page.h
@@ -0,0 +1 @@
+../../../../../compel/arch/aarch64/src/lib/include/uapi/asm/page.h
\ No newline at end of file
diff --git a/include/common/arch/arm/asm/page.h b/include/common/arch/arm/asm/page.h
deleted file mode 100644
index 134835556c62..000000000000
--- a/include/common/arch/arm/asm/page.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __CR_ASM_PAGE_H__
-#define __CR_ASM_PAGE_H__
-
-#ifndef PAGE_SHIFT
-# define PAGE_SHIFT	12
-#endif
-
-#ifndef PAGE_SIZE
-# define PAGE_SIZE	(1UL << PAGE_SHIFT)
-#endif
-
-#ifndef PAGE_MASK
-# define PAGE_MASK	(~(PAGE_SIZE - 1))
-#endif
-
-#define PAGE_PFN(addr)	((addr) / PAGE_SIZE)
-#define page_size()	PAGE_SIZE
-
-#endif /* __CR_ASM_PAGE_H__ */
diff --git a/include/common/arch/arm/asm/page.h b/include/common/arch/arm/asm/page.h
new file mode 120000
index 000000000000..2fe933b389dd
--- /dev/null
+++ b/include/common/arch/arm/asm/page.h
@@ -0,0 +1 @@
+../../../../../compel/arch/arm/src/lib/include/uapi/asm/page.h
\ No newline at end of file
diff --git a/include/common/arch/ppc64/asm/page.h b/include/common/arch/ppc64/asm/page.h
deleted file mode 100644
index 9d10455f1c47..000000000000
--- a/include/common/arch/ppc64/asm/page.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef __CR_ASM_PAGE_H__
-#define __CR_ASM_PAGE_H__
-
-#include <unistd.h>
-
-/*
- * Default config for Pseries is to use 64K pages.
- * See kernel file arch/powerpc/configs/pseries_*defconfig
- */
-#ifndef PAGE_SHIFT
-# define PAGE_SHIFT	16
-#endif
-
-#ifndef PAGE_SIZE
-# define PAGE_SIZE	(1UL << PAGE_SHIFT)
-#endif
-
-#ifndef PAGE_MASK
-# define PAGE_MASK	(~(PAGE_SIZE - 1))
-#endif
-
-#define PAGE_PFN(addr)	((addr) / PAGE_SIZE)
-#define page_size()	sysconf(_SC_PAGESIZE)
-
-#endif /* __CR_ASM_PAGE_H__ */
diff --git a/include/common/arch/ppc64/asm/page.h b/include/common/arch/ppc64/asm/page.h
new file mode 120000
index 000000000000..01c2623aef75
--- /dev/null
+++ b/include/common/arch/ppc64/asm/page.h
@@ -0,0 +1 @@
+../../../../../compel/arch/ppc64/src/lib/include/uapi/asm/page.h
\ No newline at end of file
diff --git a/include/common/arch/x86/asm/page.h b/include/common/arch/x86/asm/page.h
deleted file mode 100644
index 134835556c62..000000000000
--- a/include/common/arch/x86/asm/page.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __CR_ASM_PAGE_H__
-#define __CR_ASM_PAGE_H__
-
-#ifndef PAGE_SHIFT
-# define PAGE_SHIFT	12
-#endif
-
-#ifndef PAGE_SIZE
-# define PAGE_SIZE	(1UL << PAGE_SHIFT)
-#endif
-
-#ifndef PAGE_MASK
-# define PAGE_MASK	(~(PAGE_SIZE - 1))
-#endif
-
-#define PAGE_PFN(addr)	((addr) / PAGE_SIZE)
-#define page_size()	PAGE_SIZE
-
-#endif /* __CR_ASM_PAGE_H__ */
diff --git a/include/common/arch/x86/asm/page.h b/include/common/arch/x86/asm/page.h
new file mode 120000
index 000000000000..8e1d46117e88
--- /dev/null
+++ b/include/common/arch/x86/asm/page.h
@@ -0,0 +1 @@
+../../../../../compel/arch/x86/src/lib/include/uapi/asm/page.h
\ No newline at end of file
-- 
2.7.4



More information about the CRIU mailing list