[CRIU] [PATCH 01/22] x86: moved x86-specific files into the directory arch/x86.
Pavel Emelyanov
xemul at parallels.com
Fri Dec 28 03:38:43 EST 2012
> pie/parasite-head-x86-64.S => arch/x86/parasite-head.S | 2 +-
> arch/x86/syscall-common-x86-64.S | 2 +-
> {include => arch/x86}/syscall-x86-64.def | 0
After applying this the compilation would get broken. Patch sets should
do their best to remain git-bisect safe.
> diff --git a/include/types.h b/arch/x86/include/asm/types.h
> similarity index 95%
> rename from include/types.h
> rename to arch/x86/include/asm/types.h
> index f299752..98c90d1 100644
> --- a/include/types.h
> +++ b/arch/x86/include/asm/types.h
> @@ -1,11 +1,11 @@
> -#ifndef __CR_TYPES_H__
> -#define __CR_TYPES_H__
> +#ifndef __CR_ASM_TYPES_H__
> +#define __CR_ASM_TYPES_H__
>
> #include <stdint.h>
> #include <stdbool.h>
> #include <signal.h>
>
> -#include "bitops.h"
> +#include "asm/bitops.h"
>
> /* prctl */
> #define ARCH_SET_GS 0x1001
> @@ -245,4 +245,12 @@ typedef struct {
> # define MADV_DONTDUMP 16
> #endif
>
> +#define UserRegsEntry UserX86RegsEntry
> +
> +typedef struct { } UserFPState;
> +
> +#define TASK_SIZE ((1UL << 47) - 1)
> +
> +typedef uint64_t auxv_t;
> +
This change is not "move files from one place to another".
> #endif /* __CR_TYPES_H__ */
> diff --git a/include/image.h b/include/image.h
> index 6d6a4a6..a810f05 100644
> --- a/include/image.h
> +++ b/include/image.h
> @@ -1,7 +1,7 @@
> #ifndef __CR_IMAGE_H__
> #define __CR_IMAGE_H__
>
> -#include "types.h"
> +#include "asm/types.h"
> #include "compiler.h"
>
> /*
> @@ -105,8 +105,6 @@ struct page_entry {
>
> #define CR_CAP_SIZE 2
>
> -#ifdef CONFIG_X86_64
> -
I'd remove this in another patch.
> #define GDT_ENTRY_TLS_ENTRIES 3
> #define TASK_COMM_LEN 16
>
> @@ -123,8 +121,6 @@ struct page_entry {
> #define TASK_STOPPED 0x3 /* FIXME - implement */
> #define TASK_HELPER 0x4
>
> -#endif /* CONFIG_X86_64 */
> -
> /*
> * There are always 4 magic bytes at the
> * beginning of the every file.
> diff --git a/include/syscall-types.h b/include/syscall-types.h
> index 4285015..5c80f9a 100644
> --- a/include/syscall-types.h
> +++ b/include/syscall-types.h
> @@ -12,11 +12,7 @@
> #include <arpa/inet.h>
> #include <sched.h>
>
> -#include "types.h"
> -
> -#ifndef CONFIG_X86_64
> -# error x86-32 bit mode not yet implemented
> -#endif
And this too.
> +#include "asm/types.h"
>
> struct cap_header {
> u32 version;
> diff --git a/include/unix_diag.h b/include/unix_diag.h
> index 7e7dd33..3f24683 100644
> --- a/include/unix_diag.h
> +++ b/include/unix_diag.h
> @@ -1,7 +1,7 @@
> #ifndef __CR_UNIX_DIAG_H__
> #define __CR_UNIX_DIAG_H__
>
> -#include "types.h"
> +#include "asm/types.h"
>
> struct unix_diag_req {
> u8 sdiag_family;
> diff --git a/include/util.h b/include/util.h
> index d3c85fc..0fa5003 100644
> --- a/include/util.h
> +++ b/include/util.h
> @@ -13,7 +13,7 @@
> #include <dirent.h>
>
> #include "compiler.h"
> -#include "types.h"
> +#include "asm/types.h"
> #include "log.h"
>
> #include "../protobuf/vma.pb-c.h"
> diff --git a/inotify.c b/inotify.c
> index 1e54288..c7f7365 100644
> --- a/inotify.c
> +++ b/inotify.c
> @@ -20,7 +20,7 @@
> #include <aio.h>
>
> #include "compiler.h"
> -#include "types.h"
> +#include "asm/types.h"
> #include "inotify.h"
> #include "proc_parse.h"
> #include "syscall.h"
> diff --git a/kcmp-ids.c b/kcmp-ids.c
> index 6823586..3f75cff 100644
> --- a/kcmp-ids.c
> +++ b/kcmp-ids.c
> @@ -1,6 +1,6 @@
> #include <unistd.h>
> #include <stdlib.h>
> -#include "types.h"
> +#include "asm/types.h"
> #include "rbtree.h"
> #include "util.h"
> #include "syscall.h"
> diff --git a/log.c b/log.c
> index 5fa1c6b..c02dff2 100644
> --- a/log.c
> +++ b/log.c
> @@ -13,7 +13,7 @@
> #include <fcntl.h>
>
> #include "compiler.h"
> -#include "types.h"
> +#include "asm/types.h"
> #include "util.h"
> #include "crtools.h"
>
> diff --git a/mount.c b/mount.c
> index a4c31b9..1069928 100644
> --- a/mount.c
> +++ b/mount.c
> @@ -13,7 +13,7 @@
> #include <sys/wait.h>
>
> #include "crtools.h"
> -#include "types.h"
> +#include "asm/types.h"
> #include "util.h"
> #include "log.h"
> #include "mount.h"
> diff --git a/netfilter.c b/netfilter.c
> index 44dc0f9..13ba3c8 100644
> --- a/netfilter.c
> +++ b/netfilter.c
> @@ -5,7 +5,7 @@
> #include <wait.h>
> #include <stdlib.h>
>
> -#include "types.h"
> +#include "asm/types.h"
> #include "util.h"
> #include "list.h"
> #include "files.h"
> diff --git a/parasite-syscall.c b/parasite-syscall.c
> index 5e01450..26de3ad 100644
> --- a/parasite-syscall.c
> +++ b/parasite-syscall.c
> @@ -11,7 +11,7 @@
>
> #include "syscall.h"
> #include "ptrace.h"
> -#include "processor-flags.h"
> +#include "asm/processor-flags.h"
> #include "parasite-syscall.h"
> #include "parasite-blob.h"
> #include "parasite.h"
> diff --git a/pie/restorer.c b/pie/restorer.c
> index 03536ae..337577a 100644
> --- a/pie/restorer.c
> +++ b/pie/restorer.c
> @@ -14,7 +14,7 @@
> #include <sys/resource.h>
>
> #include "compiler.h"
> -#include "types.h"
> +#include "asm/types.h"
> #include "syscall.h"
> #include "log.h"
> #include "util.h"
> diff --git a/proc_parse.c b/proc_parse.c
> index a7de1d1..81bf11c 100644
> --- a/proc_parse.c
> +++ b/proc_parse.c
> @@ -9,7 +9,7 @@
> #include <string.h>
> #include <linux/fs.h>
>
> -#include "types.h"
> +#include "asm/types.h"
> #include "list.h"
> #include "util.h"
> #include "crtools.h"
> diff --git a/protobuf.c b/protobuf.c
> index f5ec1ea..5213d48 100644
> --- a/protobuf.c
> +++ b/protobuf.c
> @@ -10,7 +10,7 @@
>
> #include "crtools.h"
> #include "compiler.h"
> -#include "types.h"
> +#include "asm/types.h"
> #include "log.h"
> #include "util.h"
> #include "string.h"
> diff --git a/ptrace.c b/ptrace.c
> index 66de9f4..0140918 100644
> --- a/ptrace.c
> +++ b/ptrace.c
> @@ -15,7 +15,7 @@
>
> #include "crtools.h"
> #include "compiler.h"
> -#include "types.h"
> +#include "asm/types.h"
> #include "util.h"
> #include "ptrace.h"
> #include "proc_parse.h"
> diff --git a/signalfd.c b/signalfd.c
> index 578fec0..91c14d6 100644
> --- a/signalfd.c
> +++ b/signalfd.c
> @@ -3,7 +3,7 @@
> #include <sys/signalfd.h>
>
> #include "compiler.h"
> -#include "types.h"
> +#include "asm/types.h"
> #include "signalfd.h"
> #include "proc_parse.h"
> #include "crtools.h"
> diff --git a/sk-inet.c b/sk-inet.c
> index 19a413b..25581ba 100644
> --- a/sk-inet.c
> +++ b/sk-inet.c
> @@ -9,7 +9,7 @@
> #include <string.h>
> #include <stdlib.h>
>
> -#include "types.h"
> +#include "asm/types.h"
> #include "libnetlink.h"
> #include "crtools.h"
> #include "inet_diag.h"
> diff --git a/sk-packet.c b/sk-packet.c
> index a82825a..0e85d36 100644
> --- a/sk-packet.c
> +++ b/sk-packet.c
> @@ -5,7 +5,7 @@
> #include <unistd.h>
> #include <string.h>
> #include "crtools.h"
> -#include "types.h"
> +#include "asm/types.h"
> #include "files.h"
> #include "sockets.h"
> #include "libnetlink.h"
> diff --git a/sk-queue.c b/sk-queue.c
> index b96daaa..4f9a743 100644
> --- a/sk-queue.c
> +++ b/sk-queue.c
> @@ -10,7 +10,7 @@
> #include <sys/socket.h>
> #include <sys/sendfile.h>
>
> -#include "types.h"
> +#include "asm/types.h"
> #include "list.h"
> #include "image.h"
> #include "crtools.h"
> diff --git a/sk-tcp.c b/sk-tcp.c
> index c7c2c15..ebf9815 100644
> --- a/sk-tcp.c
> +++ b/sk-tcp.c
> @@ -10,7 +10,7 @@
> #include "util.h"
> #include "list.h"
> #include "log.h"
> -#include "types.h"
> +#include "asm/types.h"
> #include "files.h"
> #include "sockets.h"
> #include "files.h"
> diff --git a/sk-unix.c b/sk-unix.c
> index b2081fb..c6ec844 100644
> --- a/sk-unix.c
> +++ b/sk-unix.c
> @@ -8,7 +8,7 @@
> #include <sys/un.h>
> #include <stdlib.h>
>
> -#include "types.h"
> +#include "asm/types.h"
> #include "libnetlink.h"
> #include "crtools.h"
> #include "unix_diag.h"
> diff --git a/sysctl.c b/sysctl.c
> index a7bb6e3..92fc153 100644
> --- a/sysctl.c
> +++ b/sysctl.c
> @@ -4,7 +4,7 @@
> #include <string.h>
> #include <stdlib.h>
>
> -#include "types.h"
> +#include "asm/types.h"
> #include "sysctl.h"
> #include "util.h"
>
> diff --git a/tty.c b/tty.c
> index f5f10f9..e084059 100644
> --- a/tty.c
> +++ b/tty.c
> @@ -13,7 +13,7 @@
> #include <linux/major.h>
>
> #include "compiler.h"
> -#include "types.h"
> +#include "asm/types.h"
>
> #include "syscall.h"
> #include "files.h"
> diff --git a/util-net.c b/util-net.c
> index 0feae03..3aace3d 100644
> --- a/util-net.c
> +++ b/util-net.c
> @@ -4,8 +4,8 @@
> #include <errno.h>
>
> #include "compiler.h"
> -#include "memcpy_64.h"
> -#include "types.h"
> +#include "asm/memcpy_64.h"
> +#include "asm/types.h"
> #include "syscall.h"
>
> #include "util-net.h"
> diff --git a/util.c b/util.c
> index 59ed831..90c82f7 100644
> --- a/util.c
> +++ b/util.c
> @@ -30,7 +30,7 @@
> #include <sys/wait.h>
>
> #include "compiler.h"
> -#include "types.h"
> +#include "asm/types.h"
> #include "list.h"
> #include "util.h"
>
>
More information about the CRIU
mailing list