[CRIU] [PATCH 01/22] compel: Adjust uapi ifdefs and add comments
Cyrill Gorcunov
gorcunov at openvz.org
Wed Oct 19 12:21:16 PDT 2016
- for generated headers which are exported use UAPI_
prefix in infdefs
- Add uapi comment on shipped .S
The overall structure of the compel will be adjusted
so I only change the files which are left in place.
The rest of rest of such changed will be done on next
patches.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
.../aarch64/plugins/include/asm/syscall-types.h | 6 +++---
.../aarch64/plugins/std/syscalls/syscall-aux.S | 3 +++
.../aarch64/plugins/std/syscalls/syscall-aux.h | 3 +++
.../arch/arm/plugins/include/asm/syscall-types.h | 6 +++---
compel/arch/arm/plugins/std/syscalls/syscall-aux.S | 3 +++
compel/arch/arm/plugins/std/syscalls/syscall-aux.h | 3 +++
.../arch/ppc64/plugins/include/asm/syscall-types.h | 6 +++---
.../ppc64/plugins/std/syscalls/Makefile.syscalls | 12 +++++------
compel/arch/x86/plugins/include/asm/prologue.h | 6 +++---
.../arch/x86/plugins/include/asm/syscall-types.h | 6 +++---
.../x86/plugins/std/syscalls/Makefile.syscalls | 24 +++++++++++-----------
11 files changed, 45 insertions(+), 33 deletions(-)
diff --git a/compel/arch/aarch64/plugins/include/asm/syscall-types.h b/compel/arch/aarch64/plugins/include/asm/syscall-types.h
index ee0e2185ddb0..fa5d03fda749 100644
--- a/compel/arch/aarch64/plugins/include/asm/syscall-types.h
+++ b/compel/arch/aarch64/plugins/include/asm/syscall-types.h
@@ -1,5 +1,5 @@
-#ifndef COMPEL_ARCH_SYSCALL_TYPES_H__
-#define COMPEL_ARCH_SYSCALL_TYPES_H__
+#ifndef UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__
+#define UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__
#define SA_RESTORER 0x04000000
@@ -25,4 +25,4 @@ typedef struct {
k_rtsigset_t rt_sa_mask;
} rt_sigaction_t;
-#endif /* COMPEL_ARCH_SYSCALL_TYPES_H__ */
+#endif /* UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__ */
diff --git a/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.S b/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.S
index 00ccf79c30e3..8ac5fafe489b 100644
--- a/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.S
+++ b/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.S
@@ -1,3 +1,6 @@
+/*
+ * STD plugin UAPI
+ */
/**
* This source contains emulation of syscalls
* that are not implemented in the AArch64 Linux kernel
diff --git a/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.h b/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.h
index 6272bf3a82fd..71d9efa22914 100644
--- a/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.h
+++ b/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.h
@@ -1,3 +1,6 @@
+/*
+ * STD plugin UAPI
+ */
#ifndef __NR_openat
# define __NR_openat 56
#endif
diff --git a/compel/arch/arm/plugins/include/asm/syscall-types.h b/compel/arch/arm/plugins/include/asm/syscall-types.h
index cdb03ef4c5fd..5be842d10824 100644
--- a/compel/arch/arm/plugins/include/asm/syscall-types.h
+++ b/compel/arch/arm/plugins/include/asm/syscall-types.h
@@ -1,5 +1,5 @@
-#ifndef COMPEL_ARCH_SYSCALL_TYPES_H__
-#define COMPEL_ARCH_SYSCALL_TYPES_H__
+#ifndef UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__
+#define UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__
#define SA_RESTORER 0x04000000
@@ -25,4 +25,4 @@ typedef struct {
k_rtsigset_t rt_sa_mask;
} rt_sigaction_t;
-#endif /* COMPEL_ARCH_SYSCALL_TYPES_H__ */
+#endif /* UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__ */
diff --git a/compel/arch/arm/plugins/std/syscalls/syscall-aux.S b/compel/arch/arm/plugins/std/syscalls/syscall-aux.S
index 8bc01c3eccb2..22323474ecac 100644
--- a/compel/arch/arm/plugins/std/syscalls/syscall-aux.S
+++ b/compel/arch/arm/plugins/std/syscalls/syscall-aux.S
@@ -1,3 +1,6 @@
+/*
+ * STD plugin UAPI
+ */
nr_sys_mmap:
.long 192
diff --git a/compel/arch/arm/plugins/std/syscalls/syscall-aux.h b/compel/arch/arm/plugins/std/syscalls/syscall-aux.h
index 0b029301f279..bf8cb3e20ae3 100644
--- a/compel/arch/arm/plugins/std/syscalls/syscall-aux.h
+++ b/compel/arch/arm/plugins/std/syscalls/syscall-aux.h
@@ -1,3 +1,6 @@
+/*
+ * STD plugin UAPI
+ */
#ifndef __NR_mmap2
# define __NR_mmap2 192
#endif
diff --git a/compel/arch/ppc64/plugins/include/asm/syscall-types.h b/compel/arch/ppc64/plugins/include/asm/syscall-types.h
index 7754721e2423..305fb1c2668e 100644
--- a/compel/arch/ppc64/plugins/include/asm/syscall-types.h
+++ b/compel/arch/ppc64/plugins/include/asm/syscall-types.h
@@ -1,5 +1,5 @@
-#ifndef COMPEL_ARCH_SYSCALL_TYPES_H__
-#define COMPEL_ARCH_SYSCALL_TYPES_H__
+#ifndef UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__
+#define UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__
#define SA_RESTORER 0x04000000U
@@ -25,4 +25,4 @@ typedef struct {
k_rtsigset_t rt_sa_mask;
} rt_sigaction_t;
-#endif /* COMPEL_ARCH_SYSCALL_TYPES_H__ */
+#endif /* UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__ */
diff --git a/compel/arch/ppc64/plugins/std/syscalls/Makefile.syscalls b/compel/arch/ppc64/plugins/std/syscalls/Makefile.syscalls
index 65299cb1e53f..894e9dea2f31 100644
--- a/compel/arch/ppc64/plugins/std/syscalls/Makefile.syscalls
+++ b/compel/arch/ppc64/plugins/std/syscalls/Makefile.syscalls
@@ -17,22 +17,22 @@ std-obj-y += $(sys-asm:.S=).o
$(sys-codes): $(sys-def)
$(E) " GEN " $@
$(Q) echo "/* Autogenerated, don't edit */" > $@
- $(Q) echo "#ifndef __ASM_CR_SYSCALL_CODES_H__" >> $@
- $(Q) echo "#define __ASM_CR_SYSCALL_CODES_H__" >> $@
+ $(Q) echo "#ifndef UAPI_COMPEL_PLUGIN_STD_SYSCALL_CODES_H__" >> $@
+ $(Q) echo "#define UAPI_COMPEL_PLUGIN_STD_SYSCALL_CODES_H__" >> $@
$(Q) cat $< | awk '/^__NR/{SYSN=$$1; sub("^__NR", "SYS", SYSN);'\
'print "\n#ifndef ", $$1, "\n#define", $$1, $$2, "\n#endif";'\
'print "#ifndef ", SYSN, "\n#define ", SYSN, $$1, "\n#endif"}' >> $@
- $(Q) echo "#endif /* __ASM_CR_SYSCALL_CODES_H__ */" >> $@
+ $(Q) echo "#endif /* UAPI_COMPEL_PLUGIN_STD_SYSCALL_CODES_H__ */" >> $@
$(sys-proto): $(sys-def)
$(E) " GEN " $@
$(Q) echo "/* Autogenerated, don't edit */" > $@
- $(Q) echo "#ifndef __ASM_CR_SYSCALL_PROTO_H__" >> $@
- $(Q) echo "#define __ASM_CR_SYSCALL_PROTO_H__" >> $@
+ $(Q) echo "#ifndef UAPI_COMPEL_PLUGIN_STD_SYSCALL_PROTO_H__" >> $@
+ $(Q) echo "#define UAPI_COMPEL_PLUGIN_STD_SYSCALL_PROTO_H__" >> $@
$(Q) echo "#include \"uapi/std/syscall-codes.h\"" >> $@
$(Q) echo "#include \"uapi/std/syscall-types.h\"" >> $@
$(Q) cat $< | awk '/^__NR/{print "extern long", $$3, substr($$0, index($$0,$$4)), ";"}' >> $@
- $(Q) echo "#endif /* __ASM_CR_SYSCALL_PROTO_H__ */" >> $@
+ $(Q) echo "#endif /* UAPI_COMPEL_PLUGIN_STD_SYSCALL_PROTO_H__ */" >> $@
$(sys-asm): $(sys-def) $(sys-asm-common) $(sys-codes) $(sys-proto)
$(E) " GEN " $@
diff --git a/compel/arch/x86/plugins/include/asm/prologue.h b/compel/arch/x86/plugins/include/asm/prologue.h
index 9d812eec9f06..9c20ddcc838f 100644
--- a/compel/arch/x86/plugins/include/asm/prologue.h
+++ b/compel/arch/x86/plugins/include/asm/prologue.h
@@ -1,5 +1,5 @@
-#ifndef __ASM_PROLOGUE_H__
-#define __ASM_PROLOGUE_H__
+#ifndef COMPEL_PLUGIN_STD_ASM_PROLOGUE_H__
+#define COMPEL_PLUGIN_STD_ASM_PROLOGUE_H__
#ifndef __ASSEMBLY__
@@ -33,4 +33,4 @@ typedef struct prologue_init_args {
#define PROLOGUE_INIT_ARGS_SIZE 1024
-#endif /* __ASM_PROLOGUE_H__ */
+#endif /* COMPEL_PLUGIN_STD_ASM_PROLOGUE_H__ */
diff --git a/compel/arch/x86/plugins/include/asm/syscall-types.h b/compel/arch/x86/plugins/include/asm/syscall-types.h
index b22b6d795c74..7eed0f80dc3a 100644
--- a/compel/arch/x86/plugins/include/asm/syscall-types.h
+++ b/compel/arch/x86/plugins/include/asm/syscall-types.h
@@ -1,5 +1,5 @@
-#ifndef COMPEL_ARCH_SYSCALL_TYPES_H__
-#define COMPEL_ARCH_SYSCALL_TYPES_H__
+#ifndef UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__
+#define UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__
/* Types for sigaction, sigprocmask syscalls */
typedef void rt_signalfn_t(int, siginfo_t *, void *);
@@ -57,4 +57,4 @@ typedef struct {
unsigned int lm:1;
} user_desc_t;
-#endif /* COMPEL_ARCH_SYSCALL_TYPES_H__ */
+#endif /* UAPI_COMPEL_PLUGIN_STD_ASM_SYSCALL_TYPES_H__ */
diff --git a/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls b/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls
index 040d1e3b6ff5..a82e08e94c59 100644
--- a/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls
+++ b/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls
@@ -20,8 +20,8 @@ define gen-rule-sys-codes
$(sys-codes): $(sys-def) $(sys-proto-types)
$(call msg-gen, $$@)
$(Q) echo "/* Autogenerated, don't edit */" > $$@
- $(Q) echo "#ifndef ASM_SYSCALL_CODES_H_$(1)__" >> $$@
- $(Q) echo "#define ASM_SYSCALL_CODES_H_$(1)__" >> $$@
+ $(Q) echo "#ifndef UAPI_COMPEL_PLUGIN_STD_SYSCALL_CODES_H_$(1)__" >> $$@
+ $(Q) echo "#define UAPI_COMPEL_PLUGIN_STD_SYSCALL_CODES_H_$(1)__" >> $$@
$(Q) cat $$< | awk '/^__NR/{SYSN=$(AV)1; \
sub("^__NR", "SYS", SYSN); \
print "\n#ifndef ", $(AV)1; \
@@ -30,15 +30,15 @@ $(sys-codes): $(sys-def) $(sys-proto-types)
print "\n#ifndef ", SYSN; \
print "#define ", SYSN, $(AV)1; \
print "#endif";}' >> $$@
- $(Q) echo "#endif /* ASM_SYSCALL_CODES_H_$(1)__ */" >> $$@
+ $(Q) echo "#endif /* UAPI_COMPEL_PLUGIN_STD_SYSCALL_CODES_H_$(1)__ */" >> $$@
endef
define gen-rule-sys-proto
$(sys-proto): $(sys-def) $(sys-proto-types)
$(call msg-gen, $$@)
$(Q) echo "/* Autogenerated, don't edit */" > $$@
- $(Q) echo "#ifndef ASM_SYSCALL_PROTO_H_$(1)__" >> $$@
- $(Q) echo "#define ASM_SYSCALL_PROTO_H_$(1)__" >> $$@
+ $(Q) echo "#ifndef UAPI_COMPEL_PLUGIN_STD_SYSCALL_PROTO_H_$(1)__" >> $$@
+ $(Q) echo "#define UAPI_COMPEL_PLUGIN_STD_SYSCALL_PROTO_H_$(1)__" >> $$@
$(Q) echo '#include "uapi/std/syscall-codes-$(1).h"' >> $$@
$(Q) echo '#include "uapi/std/syscall-types.h"' >> $$@
ifeq ($(1),32)
@@ -46,7 +46,7 @@ ifeq ($(1),32)
endif
$(Q) cat $$< | awk '/^__NR/{print "extern long", $(AV)3, \
substr($(AV)0, index($(AV)0,$(AV)4)), ";"}' >> $$@
- $(Q) echo "#endif /* ASM_SYSCALL_PROTO_H_$(1)__ */" >> $$@
+ $(Q) echo "#endif /* UAPI_COMPEL_PLUGIN_STD_SYSCALL_PROTO_H_$(1)__ */" >> $$@
endef
define gen-rule-sys-asm
@@ -69,22 +69,22 @@ endef
$(sys-codes-generic): $(PLUGIN_ARCH_DIR)/std/syscalls/syscall_32.tbl $(sys-proto-types)
$(call msg-gen, $@)
$(Q) echo "/* Autogenerated, don't edit */" > $@
- $(Q) echo "#ifndef __ASM_CR_SYSCALL_CODES_H__" >> $@
- $(Q) echo "#define __ASM_CR_SYSCALL_CODES_H__" >> $@
+ $(Q) echo "#ifndef UAPI_COMPEL_PLUGIN_STD_SYSCALL_CODES_H__" >> $@
+ $(Q) echo "#define UAPI_COMPEL_PLUGIN_STD_SYSCALL_CODES_H__" >> $@
$(Q) echo '#include "uapi/std/syscall-codes-64.h"' >> $@
$(Q) cat $< | awk '/^__NR/{NR32=$$1; \
sub("^__NR", "__NR32", NR32); \
print "\n#ifndef ", NR32; \
print "#define ", NR32, $$2; \
print "#endif";}' >> $@
- $(Q) echo "#endif /* __ASM_CR_SYSCALL_CODES_H__ */" >> $@
+ $(Q) echo "#endif /* UAPI_COMPEL_PLUGIN_STD_SYSCALL_CODES_H__ */" >> $@
mrproper-y += $(sys-codes-generic)
$(sys-proto-generic): $(strip $(call map,sys-proto,$(sys-bits))) $(sys-proto-types)
$(call msg-gen, $@)
$(Q) echo "/* Autogenerated, don't edit */" > $@
- $(Q) echo "#ifndef __ASM_CR_SYSCALL_PROTO_H__" >> $@
- $(Q) echo "#define __ASM_CR_SYSCALL_PROTO_H__" >> $@
+ $(Q) echo "#ifndef UAPI_COMPEL_PLUGIN_STD_SYSCALL_PROTO_H__" >> $@
+ $(Q) echo "#define UAPI_COMPEL_PLUGIN_STD_SYSCALL_PROTO_H__" >> $@
$(Q) echo "" >> $@
$(Q) echo "#ifdef CONFIG_X86_32" >> $@
$(Q) echo '#include "uapi/std/syscall-32.h"' >> $@
@@ -92,7 +92,7 @@ $(sys-proto-generic): $(strip $(call map,sys-proto,$(sys-bits))) $(sys-proto-typ
$(Q) echo '#include "uapi/std/syscall-64.h"' >> $@
$(Q) echo "#endif /* CONFIG_X86_32 */" >> $@
$(Q) echo "" >> $@
- $(Q) echo "#endif /* __ASM_CR_SYSCALL_PROTO_H__ */" >> $@
+ $(Q) echo "#endif /* UAPI_COMPEL_PLUGIN_STD_SYSCALL_PROTO_H__ */" >> $@
mrproper-y += $(sys-proto-generic)
define gen-rule-sys-exec-tbl
--
2.7.4
More information about the CRIU
mailing list