[CRIU] [PATCH 09/10] common: Move in bit operation helpers

Cyrill Gorcunov gorcunov at openvz.org
Mon Oct 24 04:58:09 PDT 2016


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/arch/aarch64/include/asm/types.h                                 | 2 +-
 criu/arch/arm/include/asm/types.h                                     | 2 +-
 criu/arch/ppc64/include/asm/types.h                                   | 2 +-
 criu/arch/x86/cpu.c                                                   | 2 +-
 criu/arch/x86/include/asm/types.h                                     | 2 +-
 criu/bitmap.c                                                         | 2 +-
 criu/include/bitops.h                                                 | 2 +-
 criu/include/bitsperlong.h                                            | 2 +-
 criu/pie/log-simple.c                                                 | 2 +-
 .../arch/aarch64/include => include/common/arch/aarch64}/asm/bitops.h | 2 +-
 .../ppc64/include => include/common/arch/aarch64}/asm/bitsperlong.h   | 0
 {criu/arch/arm/include => include/common/arch/arm}/asm/bitops.h       | 2 +-
 {criu/arch/arm/include => include/common/arch/arm}/asm/bitsperlong.h  | 0
 {criu/arch/ppc64/include => include/common/arch/ppc64}/asm/bitops.h   | 2 +-
 .../aarch64/include => include/common/arch/ppc64}/asm/bitsperlong.h   | 0
 {criu/arch/x86/include => include/common/arch/x86}/asm/bitops.h       | 2 +-
 {criu/arch/x86/include => include/common/arch/x86}/asm/bitsperlong.h  | 0
 {criu/include => include/common}/asm-generic/bitops.h                 | 0
 include/common/bitops.h                                               | 4 ++++
 include/common/bitsperlong.h                                          | 4 ++++
 20 files changed, 21 insertions(+), 13 deletions(-)
 rename {criu/arch/aarch64/include => include/common/arch/aarch64}/asm/bitops.h (75%)
 rename {criu/arch/ppc64/include => include/common/arch/aarch64}/asm/bitsperlong.h (100%)
 rename {criu/arch/arm/include => include/common/arch/arm}/asm/bitops.h (75%)
 rename {criu/arch/arm/include => include/common/arch/arm}/asm/bitsperlong.h (100%)
 rename {criu/arch/ppc64/include => include/common/arch/ppc64}/asm/bitops.h (99%)
 rename {criu/arch/aarch64/include => include/common/arch/ppc64}/asm/bitsperlong.h (100%)
 rename {criu/arch/x86/include => include/common/arch/x86}/asm/bitops.h (98%)
 rename {criu/arch/x86/include => include/common/arch/x86}/asm/bitsperlong.h (100%)
 rename {criu/include => include/common}/asm-generic/bitops.h (100%)
 create mode 100644 include/common/bitops.h
 create mode 100644 include/common/bitsperlong.h

diff --git a/criu/arch/aarch64/include/asm/types.h b/criu/arch/aarch64/include/asm/types.h
index 0fd5972ae543..bb9896c36839 100644
--- a/criu/arch/aarch64/include/asm/types.h
+++ b/criu/arch/aarch64/include/asm/types.h
@@ -7,7 +7,7 @@
 #include "images/core.pb-c.h"
 
 #include "asm/page.h"
-#include "asm/bitops.h"
+#include "bitops.h"
 #include "asm/int.h"
 
 #include "uapi/std/asm/syscall-types.h"
diff --git a/criu/arch/arm/include/asm/types.h b/criu/arch/arm/include/asm/types.h
index 4f3b7cf52d3b..ee63ba6df16d 100644
--- a/criu/arch/arm/include/asm/types.h
+++ b/criu/arch/arm/include/asm/types.h
@@ -6,7 +6,7 @@
 #include "images/core.pb-c.h"
 
 #include "asm/page.h"
-#include "asm/bitops.h"
+#include "bitops.h"
 #include "asm/int.h"
 
 #include "uapi/std/asm/syscall-types.h"
diff --git a/criu/arch/ppc64/include/asm/types.h b/criu/arch/ppc64/include/asm/types.h
index cc4699bdae39..a4089eedc0bf 100644
--- a/criu/arch/ppc64/include/asm/types.h
+++ b/criu/arch/ppc64/include/asm/types.h
@@ -6,7 +6,7 @@
 #include "images/core.pb-c.h"
 
 #include "asm/page.h"
-#include "asm/bitops.h"
+#include "bitops.h"
 #include "asm/int.h"
 
 #include "uapi/std/asm/syscall-types.h"
diff --git a/criu/arch/x86/cpu.c b/criu/arch/x86/cpu.c
index 1252f7f4c74f..89fc86029454 100644
--- a/criu/arch/x86/cpu.c
+++ b/criu/arch/x86/cpu.c
@@ -6,7 +6,7 @@
 
 #include <sys/types.h>
 
-#include "asm/bitops.h"
+#include "bitops.h"
 #include "asm/types.h"
 #include "asm/cpu.h"
 #include "asm/fpu.h"
diff --git a/criu/arch/x86/include/asm/types.h b/criu/arch/x86/include/asm/types.h
index f9ec569dc0a4..c371e4b98876 100644
--- a/criu/arch/x86/include/asm/types.h
+++ b/criu/arch/x86/include/asm/types.h
@@ -5,7 +5,7 @@
 #include <signal.h>
 
 #include "asm/page.h"
-#include "asm/bitops.h"
+#include "bitops.h"
 #include "asm/int.h"
 
 #include "uapi/std/asm/syscall-types.h"
diff --git a/criu/bitmap.c b/criu/bitmap.c
index 03d8bc24b312..a28a89d8d307 100644
--- a/criu/bitmap.c
+++ b/criu/bitmap.c
@@ -1,4 +1,4 @@
-#include "bitsperlong.h"
+#include "common/bitsperlong.h"
 
 #define BIT_WORD(nr)		((nr) / BITS_PER_LONG)
 
diff --git a/criu/include/bitops.h b/criu/include/bitops.h
index f38b9c6bc7b2..cfc49915560a 100644
--- a/criu/include/bitops.h
+++ b/criu/include/bitops.h
@@ -1,4 +1,4 @@
 #ifndef __CR_INC_BITOPS_H__
 #define __CR_INC_BITOPS_H__
-#include "asm/bitops.h"
+#include "common/bitops.h"
 #endif
diff --git a/criu/include/bitsperlong.h b/criu/include/bitsperlong.h
index b69de22996b1..0e530d5f467b 100644
--- a/criu/include/bitsperlong.h
+++ b/criu/include/bitsperlong.h
@@ -1,4 +1,4 @@
 #ifndef __CR_INC_BITSPERLONG_H__
 #define __CR_INC_BITSPERLONG_H__
-#include "asm/bitsperlong.h"
+#include "common/bitsperlong.h"
 #endif
diff --git a/criu/pie/log-simple.c b/criu/pie/log-simple.c
index 4220d363f1d1..8d48aa6d3394 100644
--- a/criu/pie/log-simple.c
+++ b/criu/pie/log-simple.c
@@ -1,6 +1,6 @@
 #include <stdarg.h>
 
-#include "bitsperlong.h"
+#include "common/bitsperlong.h"
 #include "uapi/std/syscall.h"
 #include "log.h"
 
diff --git a/criu/arch/aarch64/include/asm/bitops.h b/include/common/arch/aarch64/asm/bitops.h
similarity index 75%
rename from criu/arch/aarch64/include/asm/bitops.h
rename to include/common/arch/aarch64/asm/bitops.h
index b1c06b8d4176..cc1b7ca569f7 100644
--- a/criu/arch/aarch64/include/asm/bitops.h
+++ b/include/common/arch/aarch64/asm/bitops.h
@@ -2,6 +2,6 @@
 #define __CR_ASM_BITOPS_H__
 
 #include "common/compiler.h"
-#include "asm-generic/bitops.h"
+#include "common/asm-generic/bitops.h"
 
 #endif /* __CR_ASM_BITOPS_H__ */
diff --git a/criu/arch/ppc64/include/asm/bitsperlong.h b/include/common/arch/aarch64/asm/bitsperlong.h
similarity index 100%
rename from criu/arch/ppc64/include/asm/bitsperlong.h
rename to include/common/arch/aarch64/asm/bitsperlong.h
diff --git a/criu/arch/arm/include/asm/bitops.h b/include/common/arch/arm/asm/bitops.h
similarity index 75%
rename from criu/arch/arm/include/asm/bitops.h
rename to include/common/arch/arm/asm/bitops.h
index b1c06b8d4176..cc1b7ca569f7 100644
--- a/criu/arch/arm/include/asm/bitops.h
+++ b/include/common/arch/arm/asm/bitops.h
@@ -2,6 +2,6 @@
 #define __CR_ASM_BITOPS_H__
 
 #include "common/compiler.h"
-#include "asm-generic/bitops.h"
+#include "common/asm-generic/bitops.h"
 
 #endif /* __CR_ASM_BITOPS_H__ */
diff --git a/criu/arch/arm/include/asm/bitsperlong.h b/include/common/arch/arm/asm/bitsperlong.h
similarity index 100%
rename from criu/arch/arm/include/asm/bitsperlong.h
rename to include/common/arch/arm/asm/bitsperlong.h
diff --git a/criu/arch/ppc64/include/asm/bitops.h b/include/common/arch/ppc64/asm/bitops.h
similarity index 99%
rename from criu/arch/ppc64/include/asm/bitops.h
rename to include/common/arch/ppc64/asm/bitops.h
index d038aa161c35..0b6b2f6f0780 100644
--- a/criu/arch/ppc64/include/asm/bitops.h
+++ b/include/common/arch/ppc64/asm/bitops.h
@@ -40,7 +40,7 @@
 
 #include "common/compiler.h"
 
-#include "asm/bitsperlong.h"
+#include "common/asm/bitsperlong.h"
 
 #define DIV_ROUND_UP(n,d)       (((n) + (d) - 1) / (d))
 #define BITS_TO_LONGS(nr)       DIV_ROUND_UP(nr, BITS_PER_LONG)
diff --git a/criu/arch/aarch64/include/asm/bitsperlong.h b/include/common/arch/ppc64/asm/bitsperlong.h
similarity index 100%
rename from criu/arch/aarch64/include/asm/bitsperlong.h
rename to include/common/arch/ppc64/asm/bitsperlong.h
diff --git a/criu/arch/x86/include/asm/bitops.h b/include/common/arch/x86/asm/bitops.h
similarity index 98%
rename from criu/arch/x86/include/asm/bitops.h
rename to include/common/arch/x86/asm/bitops.h
index 7d6283183953..5c689553288d 100644
--- a/criu/arch/x86/include/asm/bitops.h
+++ b/include/common/arch/x86/asm/bitops.h
@@ -1,7 +1,7 @@
 #ifndef __CR_BITOPS_H__
 #define __CR_BITOPS_H__
 
-#include "asm/bitsperlong.h"
+#include "common/asm/bitsperlong.h"
 
 #define DIV_ROUND_UP(n,d)	(((n) + (d) - 1) / (d))
 #define BITS_TO_LONGS(nr)	DIV_ROUND_UP(nr, BITS_PER_LONG)
diff --git a/criu/arch/x86/include/asm/bitsperlong.h b/include/common/arch/x86/asm/bitsperlong.h
similarity index 100%
rename from criu/arch/x86/include/asm/bitsperlong.h
rename to include/common/arch/x86/asm/bitsperlong.h
diff --git a/criu/include/asm-generic/bitops.h b/include/common/asm-generic/bitops.h
similarity index 100%
rename from criu/include/asm-generic/bitops.h
rename to include/common/asm-generic/bitops.h
diff --git a/include/common/bitops.h b/include/common/bitops.h
new file mode 100644
index 000000000000..154c3510e107
--- /dev/null
+++ b/include/common/bitops.h
@@ -0,0 +1,4 @@
+#ifndef __CR_COMMON_BITOPS_H__
+#define __CR_COMMON_BITOPS_H__
+#include "asm/bitops.h"
+#endif
diff --git a/include/common/bitsperlong.h b/include/common/bitsperlong.h
new file mode 100644
index 000000000000..0eb7043d7ed1
--- /dev/null
+++ b/include/common/bitsperlong.h
@@ -0,0 +1,4 @@
+#ifndef __CR_COMMON_BITSPERLONG_H__
+#define __CR_COMMON_BITSPERLONG_H__
+#include "asm/bitsperlong.h"
+#endif
-- 
2.7.4



More information about the CRIU mailing list