From 43ecf06e838f40a609a819eae8df8e3ff30535fb Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Tue, 10 Oct 2017 23:24:07 +0900 Subject: [PATCH] arch: x86 -> x86_64 and build system changes --- Makefile.in | 30 +++++------------ arch/x86/kernel/Makefile.arch | 7 ---- arch/{x86 => x86_64}/elfboot/Makefile | 0 arch/{x86 => x86_64}/elfboot/elfboot.c | 0 arch/{x86 => x86_64}/elfboot/head.S | 0 arch/{x86 => x86_64}/elfboot/raw.lds | 0 arch/{x86 => x86_64}/elfboot/test.h | 0 arch/{x86 => x86_64}/elfboot/test_main.c | 0 arch/{x86 => x86_64}/kboot/Makefile | 0 arch/{x86 => x86_64}/kboot/data.S | 0 arch/{x86 => x86_64}/kboot/kernel.lds.S | 0 arch/{x86 => x86_64}/kboot/main.c | 0 arch/x86_64/kernel/Makefile.arch.in | 2 ++ arch/{x86 => x86_64}/kernel/context.S | 0 arch/{x86 => x86_64}/kernel/coredump.c | 0 arch/{x86 => x86_64}/kernel/cpu.c | 0 arch/{x86 => x86_64}/kernel/gencore.c | 0 .../kernel/include/arch-bitops.h | 0 .../kernel/include/arch-futex.h | 0 .../kernel/include/arch-lock.h | 0 .../kernel/include/arch-memory.h | 0 .../kernel/include/arch-string.h | 0 .../kernel/include/arch/auxvec.h | 0 .../{x86 => x86_64}/kernel/include/arch/cpu.h | 0 arch/{x86 => x86_64}/kernel/include/arch/mm.h | 0 .../kernel/include/arch/mman.h | 0 .../{x86 => x86_64}/kernel/include/arch/shm.h | 0 .../kernel/include/arch_rusage.h | 0 arch/{x86 => x86_64}/kernel/include/cas.h | 0 .../{x86 => x86_64}/kernel/include/cpulocal.h | 0 arch/{x86 => x86_64}/kernel/include/elf.h | 0 arch/{x86 => x86_64}/kernel/include/elfcore.h | 0 .../kernel/include/elfcoregpl.h | 0 arch/{x86 => x86_64}/kernel/include/errno.h | 0 arch/{x86 => x86_64}/kernel/include/hwcap.h | 0 .../kernel/include/ihk/atomic.h | 0 .../kernel/include/ihk/context.h | 0 arch/{x86 => x86_64}/kernel/include/ihk/ikc.h | 0 .../kernel/include/ihk/types.h | 0 arch/{x86 => x86_64}/kernel/include/prctl.h | 0 .../kernel/include/registers.h | 0 arch/{x86 => x86_64}/kernel/include/rlimit.h | 0 arch/{x86 => x86_64}/kernel/include/signal.h | 0 .../kernel/include/syscall_list.h | 0 arch/{x86 => x86_64}/kernel/interrupt.S | 0 arch/{x86 => x86_64}/kernel/local.c | 0 arch/{x86 => x86_64}/kernel/lock.c | 0 arch/{x86 => x86_64}/kernel/memory.c | 0 arch/{x86 => x86_64}/kernel/mikc.c | 0 arch/{x86 => x86_64}/kernel/perfctr.c | 0 arch/{x86 => x86_64}/kernel/syscall.c | 0 arch/{x86 => x86_64}/kernel/trampoline.S | 0 arch/{x86 => x86_64}/kernel/vsyscall.c | 0 .../tools/eclair-dump-backtrace.exp.in | 0 .../tools/irqbalance_mck.in.in | 0 .../tools/irqbalance_mck.service.in | 0 .../tools/mcoverlay-create-smp-x86.sh.in | 0 .../tools/mcoverlay-destroy-smp-x86.sh.in | 0 .../tools/mcreboot-attached-mic.sh.in | 0 .../tools/mcreboot-builtin-x86.sh.in | 0 .../tools/mcreboot-smp-x86.sh.in | 0 arch/{x86 => x86_64}/tools/mcreboot.1in | 0 .../tools/mcshutdown-attached-mic.sh.in | 0 .../tools/mcshutdown-builtin-x86.sh.in | 0 .../tools/mcstop+release-smp-x86.sh.in | 0 configure | 32 +++++++++++-------- configure.ac | 30 ++++++++++------- kernel/Makefile.build.in | 1 + kernel/Makefile.in | 2 +- kernel/include/elfcore.h | 2 +- 70 files changed, 50 insertions(+), 56 deletions(-) delete mode 100644 arch/x86/kernel/Makefile.arch rename arch/{x86 => x86_64}/elfboot/Makefile (100%) rename arch/{x86 => x86_64}/elfboot/elfboot.c (100%) rename arch/{x86 => x86_64}/elfboot/head.S (100%) rename arch/{x86 => x86_64}/elfboot/raw.lds (100%) rename arch/{x86 => x86_64}/elfboot/test.h (100%) rename arch/{x86 => x86_64}/elfboot/test_main.c (100%) rename arch/{x86 => x86_64}/kboot/Makefile (100%) rename arch/{x86 => x86_64}/kboot/data.S (100%) rename arch/{x86 => x86_64}/kboot/kernel.lds.S (100%) rename arch/{x86 => x86_64}/kboot/main.c (100%) create mode 100644 arch/x86_64/kernel/Makefile.arch.in rename arch/{x86 => x86_64}/kernel/context.S (100%) rename arch/{x86 => x86_64}/kernel/coredump.c (100%) rename arch/{x86 => x86_64}/kernel/cpu.c (100%) rename arch/{x86 => x86_64}/kernel/gencore.c (100%) rename arch/{x86 => x86_64}/kernel/include/arch-bitops.h (100%) rename arch/{x86 => x86_64}/kernel/include/arch-futex.h (100%) rename arch/{x86 => x86_64}/kernel/include/arch-lock.h (100%) rename arch/{x86 => x86_64}/kernel/include/arch-memory.h (100%) rename arch/{x86 => x86_64}/kernel/include/arch-string.h (100%) rename arch/{x86 => x86_64}/kernel/include/arch/auxvec.h (100%) rename arch/{x86 => x86_64}/kernel/include/arch/cpu.h (100%) rename arch/{x86 => x86_64}/kernel/include/arch/mm.h (100%) rename arch/{x86 => x86_64}/kernel/include/arch/mman.h (100%) rename arch/{x86 => x86_64}/kernel/include/arch/shm.h (100%) rename arch/{x86 => x86_64}/kernel/include/arch_rusage.h (100%) rename arch/{x86 => x86_64}/kernel/include/cas.h (100%) rename arch/{x86 => x86_64}/kernel/include/cpulocal.h (100%) rename arch/{x86 => x86_64}/kernel/include/elf.h (100%) rename arch/{x86 => x86_64}/kernel/include/elfcore.h (100%) rename arch/{x86 => x86_64}/kernel/include/elfcoregpl.h (100%) rename arch/{x86 => x86_64}/kernel/include/errno.h (100%) rename arch/{x86 => x86_64}/kernel/include/hwcap.h (100%) rename arch/{x86 => x86_64}/kernel/include/ihk/atomic.h (100%) rename arch/{x86 => x86_64}/kernel/include/ihk/context.h (100%) rename arch/{x86 => x86_64}/kernel/include/ihk/ikc.h (100%) rename arch/{x86 => x86_64}/kernel/include/ihk/types.h (100%) rename arch/{x86 => x86_64}/kernel/include/prctl.h (100%) rename arch/{x86 => x86_64}/kernel/include/registers.h (100%) rename arch/{x86 => x86_64}/kernel/include/rlimit.h (100%) rename arch/{x86 => x86_64}/kernel/include/signal.h (100%) rename arch/{x86 => x86_64}/kernel/include/syscall_list.h (100%) rename arch/{x86 => x86_64}/kernel/interrupt.S (100%) rename arch/{x86 => x86_64}/kernel/local.c (100%) rename arch/{x86 => x86_64}/kernel/lock.c (100%) rename arch/{x86 => x86_64}/kernel/memory.c (100%) rename arch/{x86 => x86_64}/kernel/mikc.c (100%) rename arch/{x86 => x86_64}/kernel/perfctr.c (100%) rename arch/{x86 => x86_64}/kernel/syscall.c (100%) rename arch/{x86 => x86_64}/kernel/trampoline.S (100%) rename arch/{x86 => x86_64}/kernel/vsyscall.c (100%) rename arch/{x86 => x86_64}/tools/eclair-dump-backtrace.exp.in (100%) rename arch/{x86 => x86_64}/tools/irqbalance_mck.in.in (100%) rename arch/{x86 => x86_64}/tools/irqbalance_mck.service.in (100%) rename arch/{x86 => x86_64}/tools/mcoverlay-create-smp-x86.sh.in (100%) rename arch/{x86 => x86_64}/tools/mcoverlay-destroy-smp-x86.sh.in (100%) rename arch/{x86 => x86_64}/tools/mcreboot-attached-mic.sh.in (100%) rename arch/{x86 => x86_64}/tools/mcreboot-builtin-x86.sh.in (100%) rename arch/{x86 => x86_64}/tools/mcreboot-smp-x86.sh.in (100%) rename arch/{x86 => x86_64}/tools/mcreboot.1in (100%) rename arch/{x86 => x86_64}/tools/mcshutdown-attached-mic.sh.in (100%) rename arch/{x86 => x86_64}/tools/mcshutdown-builtin-x86.sh.in (100%) rename arch/{x86 => x86_64}/tools/mcstop+release-smp-x86.sh.in (100%) diff --git a/Makefile.in b/Makefile.in index 0645f343..79a4d09b 100755 --- a/Makefile.in +++ b/Makefile.in @@ -40,34 +40,20 @@ install: ;; \ esac @case "$(TARGET)" in \ - attached-mic) \ - mkdir -p -m 755 $(SBINDIR); \ - install -m 755 arch/x86/tools/mcreboot-attached-mic.sh $(SBINDIR)/mcreboot; \ - install -m 755 arch/x86/tools/mcshutdown-attached-mic.sh $(SBINDIR)/mcshutdown; \ - mkdir -p -m 755 $(MANDIR)/man1; \ - install -m 644 arch/x86/tools/mcreboot.1 $(MANDIR)/man1/mcreboot.1; \ - ;; \ - builtin-x86) \ - mkdir -p -m 755 $(SBINDIR); \ - install -m 755 arch/x86/tools/mcreboot-builtin-x86.sh $(SBINDIR)/mcreboot; \ - install -m 755 arch/x86/tools/mcshutdown-builtin-x86.sh $(SBINDIR)/mcshutdown; \ - mkdir -p -m 755 $(MANDIR)/man1; \ - install -m 644 arch/x86/tools/mcreboot.1 $(MANDIR)/man1/mcreboot.1; \ - ;; \ smp-x86 | smp-arm64) \ mkdir -p -m 755 $(SBINDIR); \ - install -m 755 arch/x86/tools/mcreboot-smp-x86.sh $(SBINDIR)/mcreboot.sh; \ - install -m 755 arch/x86/tools/mcstop+release-smp-x86.sh $(SBINDIR)/mcstop+release.sh; \ - install -m 755 arch/x86/tools/mcoverlay-destroy-smp-x86.sh $(SBINDIR)/mcoverlay-destroy.sh; \ - install -m 755 arch/x86/tools/mcoverlay-create-smp-x86.sh $(SBINDIR)/mcoverlay-create.sh; \ - install -m 755 arch/x86/tools/eclair-dump-backtrace.exp $(SBINDIR)/eclair-dump-backtrace.exp;\ + install -m 755 arch/x86_64/tools/mcreboot-smp-x86.sh $(SBINDIR)/mcreboot.sh; \ + install -m 755 arch/x86_64/tools/mcstop+release-smp-x86.sh $(SBINDIR)/mcstop+release.sh; \ + install -m 755 arch/x86_64/tools/mcoverlay-destroy-smp-x86.sh $(SBINDIR)/mcoverlay-destroy.sh; \ + install -m 755 arch/x86_64/tools/mcoverlay-create-smp-x86.sh $(SBINDIR)/mcoverlay-create.sh; \ + install -m 755 arch/x86_64/tools/eclair-dump-backtrace.exp $(SBINDIR)/eclair-dump-backtrace.exp;\ mkdir -p -m 755 $(ETCDIR); \ - install -m 644 arch/x86/tools/irqbalance_mck.service $(ETCDIR)/irqbalance_mck.service; \ - install -m 644 arch/x86/tools/irqbalance_mck.in $(ETCDIR)/irqbalance_mck.in; \ + install -m 644 arch/x86_64/tools/irqbalance_mck.service $(ETCDIR)/irqbalance_mck.service; \ + install -m 644 arch/x86_64/tools/irqbalance_mck.in $(ETCDIR)/irqbalance_mck.in; \ mkdir -p -m 755 $(INCDIR); \ install -m 644 kernel/include/swapfmt.h $(INCDIR); \ mkdir -p -m 755 $(MANDIR)/man1; \ - install -m 644 arch/x86/tools/mcreboot.1 $(MANDIR)/man1/mcreboot.1; \ + install -m 644 arch/x86_64/tools/mcreboot.1 $(MANDIR)/man1/mcreboot.1; \ ;; \ *) \ echo "unknown target $(TARGET)" >&2 \ diff --git a/arch/x86/kernel/Makefile.arch b/arch/x86/kernel/Makefile.arch deleted file mode 100644 index 993bdd29..00000000 --- a/arch/x86/kernel/Makefile.arch +++ /dev/null @@ -1,7 +0,0 @@ -IHK_OBJS += cpu.o interrupt.o memory.o trampoline.o local.o context.o -IHK_OBJS += perfctr.o syscall.o vsyscall.o -# POSTK_DEBUG_ARCH_DEP_18 coredump arch separation. -# IHK_OBJS added coredump.o -ifeq ($(ARCH), arm64) -IHK_OBJS += coredump.o -endif diff --git a/arch/x86/elfboot/Makefile b/arch/x86_64/elfboot/Makefile similarity index 100% rename from arch/x86/elfboot/Makefile rename to arch/x86_64/elfboot/Makefile diff --git a/arch/x86/elfboot/elfboot.c b/arch/x86_64/elfboot/elfboot.c similarity index 100% rename from arch/x86/elfboot/elfboot.c rename to arch/x86_64/elfboot/elfboot.c diff --git a/arch/x86/elfboot/head.S b/arch/x86_64/elfboot/head.S similarity index 100% rename from arch/x86/elfboot/head.S rename to arch/x86_64/elfboot/head.S diff --git a/arch/x86/elfboot/raw.lds b/arch/x86_64/elfboot/raw.lds similarity index 100% rename from arch/x86/elfboot/raw.lds rename to arch/x86_64/elfboot/raw.lds diff --git a/arch/x86/elfboot/test.h b/arch/x86_64/elfboot/test.h similarity index 100% rename from arch/x86/elfboot/test.h rename to arch/x86_64/elfboot/test.h diff --git a/arch/x86/elfboot/test_main.c b/arch/x86_64/elfboot/test_main.c similarity index 100% rename from arch/x86/elfboot/test_main.c rename to arch/x86_64/elfboot/test_main.c diff --git a/arch/x86/kboot/Makefile b/arch/x86_64/kboot/Makefile similarity index 100% rename from arch/x86/kboot/Makefile rename to arch/x86_64/kboot/Makefile diff --git a/arch/x86/kboot/data.S b/arch/x86_64/kboot/data.S similarity index 100% rename from arch/x86/kboot/data.S rename to arch/x86_64/kboot/data.S diff --git a/arch/x86/kboot/kernel.lds.S b/arch/x86_64/kboot/kernel.lds.S similarity index 100% rename from arch/x86/kboot/kernel.lds.S rename to arch/x86_64/kboot/kernel.lds.S diff --git a/arch/x86/kboot/main.c b/arch/x86_64/kboot/main.c similarity index 100% rename from arch/x86/kboot/main.c rename to arch/x86_64/kboot/main.c diff --git a/arch/x86_64/kernel/Makefile.arch.in b/arch/x86_64/kernel/Makefile.arch.in new file mode 100644 index 00000000..cb366fbb --- /dev/null +++ b/arch/x86_64/kernel/Makefile.arch.in @@ -0,0 +1,2 @@ +IHK_OBJS += cpu.o interrupt.o memory.o trampoline.o local.o context.o +IHK_OBJS += perfctr.o syscall.o vsyscall.o diff --git a/arch/x86/kernel/context.S b/arch/x86_64/kernel/context.S similarity index 100% rename from arch/x86/kernel/context.S rename to arch/x86_64/kernel/context.S diff --git a/arch/x86/kernel/coredump.c b/arch/x86_64/kernel/coredump.c similarity index 100% rename from arch/x86/kernel/coredump.c rename to arch/x86_64/kernel/coredump.c diff --git a/arch/x86/kernel/cpu.c b/arch/x86_64/kernel/cpu.c similarity index 100% rename from arch/x86/kernel/cpu.c rename to arch/x86_64/kernel/cpu.c diff --git a/arch/x86/kernel/gencore.c b/arch/x86_64/kernel/gencore.c similarity index 100% rename from arch/x86/kernel/gencore.c rename to arch/x86_64/kernel/gencore.c diff --git a/arch/x86/kernel/include/arch-bitops.h b/arch/x86_64/kernel/include/arch-bitops.h similarity index 100% rename from arch/x86/kernel/include/arch-bitops.h rename to arch/x86_64/kernel/include/arch-bitops.h diff --git a/arch/x86/kernel/include/arch-futex.h b/arch/x86_64/kernel/include/arch-futex.h similarity index 100% rename from arch/x86/kernel/include/arch-futex.h rename to arch/x86_64/kernel/include/arch-futex.h diff --git a/arch/x86/kernel/include/arch-lock.h b/arch/x86_64/kernel/include/arch-lock.h similarity index 100% rename from arch/x86/kernel/include/arch-lock.h rename to arch/x86_64/kernel/include/arch-lock.h diff --git a/arch/x86/kernel/include/arch-memory.h b/arch/x86_64/kernel/include/arch-memory.h similarity index 100% rename from arch/x86/kernel/include/arch-memory.h rename to arch/x86_64/kernel/include/arch-memory.h diff --git a/arch/x86/kernel/include/arch-string.h b/arch/x86_64/kernel/include/arch-string.h similarity index 100% rename from arch/x86/kernel/include/arch-string.h rename to arch/x86_64/kernel/include/arch-string.h diff --git a/arch/x86/kernel/include/arch/auxvec.h b/arch/x86_64/kernel/include/arch/auxvec.h similarity index 100% rename from arch/x86/kernel/include/arch/auxvec.h rename to arch/x86_64/kernel/include/arch/auxvec.h diff --git a/arch/x86/kernel/include/arch/cpu.h b/arch/x86_64/kernel/include/arch/cpu.h similarity index 100% rename from arch/x86/kernel/include/arch/cpu.h rename to arch/x86_64/kernel/include/arch/cpu.h diff --git a/arch/x86/kernel/include/arch/mm.h b/arch/x86_64/kernel/include/arch/mm.h similarity index 100% rename from arch/x86/kernel/include/arch/mm.h rename to arch/x86_64/kernel/include/arch/mm.h diff --git a/arch/x86/kernel/include/arch/mman.h b/arch/x86_64/kernel/include/arch/mman.h similarity index 100% rename from arch/x86/kernel/include/arch/mman.h rename to arch/x86_64/kernel/include/arch/mman.h diff --git a/arch/x86/kernel/include/arch/shm.h b/arch/x86_64/kernel/include/arch/shm.h similarity index 100% rename from arch/x86/kernel/include/arch/shm.h rename to arch/x86_64/kernel/include/arch/shm.h diff --git a/arch/x86/kernel/include/arch_rusage.h b/arch/x86_64/kernel/include/arch_rusage.h similarity index 100% rename from arch/x86/kernel/include/arch_rusage.h rename to arch/x86_64/kernel/include/arch_rusage.h diff --git a/arch/x86/kernel/include/cas.h b/arch/x86_64/kernel/include/cas.h similarity index 100% rename from arch/x86/kernel/include/cas.h rename to arch/x86_64/kernel/include/cas.h diff --git a/arch/x86/kernel/include/cpulocal.h b/arch/x86_64/kernel/include/cpulocal.h similarity index 100% rename from arch/x86/kernel/include/cpulocal.h rename to arch/x86_64/kernel/include/cpulocal.h diff --git a/arch/x86/kernel/include/elf.h b/arch/x86_64/kernel/include/elf.h similarity index 100% rename from arch/x86/kernel/include/elf.h rename to arch/x86_64/kernel/include/elf.h diff --git a/arch/x86/kernel/include/elfcore.h b/arch/x86_64/kernel/include/elfcore.h similarity index 100% rename from arch/x86/kernel/include/elfcore.h rename to arch/x86_64/kernel/include/elfcore.h diff --git a/arch/x86/kernel/include/elfcoregpl.h b/arch/x86_64/kernel/include/elfcoregpl.h similarity index 100% rename from arch/x86/kernel/include/elfcoregpl.h rename to arch/x86_64/kernel/include/elfcoregpl.h diff --git a/arch/x86/kernel/include/errno.h b/arch/x86_64/kernel/include/errno.h similarity index 100% rename from arch/x86/kernel/include/errno.h rename to arch/x86_64/kernel/include/errno.h diff --git a/arch/x86/kernel/include/hwcap.h b/arch/x86_64/kernel/include/hwcap.h similarity index 100% rename from arch/x86/kernel/include/hwcap.h rename to arch/x86_64/kernel/include/hwcap.h diff --git a/arch/x86/kernel/include/ihk/atomic.h b/arch/x86_64/kernel/include/ihk/atomic.h similarity index 100% rename from arch/x86/kernel/include/ihk/atomic.h rename to arch/x86_64/kernel/include/ihk/atomic.h diff --git a/arch/x86/kernel/include/ihk/context.h b/arch/x86_64/kernel/include/ihk/context.h similarity index 100% rename from arch/x86/kernel/include/ihk/context.h rename to arch/x86_64/kernel/include/ihk/context.h diff --git a/arch/x86/kernel/include/ihk/ikc.h b/arch/x86_64/kernel/include/ihk/ikc.h similarity index 100% rename from arch/x86/kernel/include/ihk/ikc.h rename to arch/x86_64/kernel/include/ihk/ikc.h diff --git a/arch/x86/kernel/include/ihk/types.h b/arch/x86_64/kernel/include/ihk/types.h similarity index 100% rename from arch/x86/kernel/include/ihk/types.h rename to arch/x86_64/kernel/include/ihk/types.h diff --git a/arch/x86/kernel/include/prctl.h b/arch/x86_64/kernel/include/prctl.h similarity index 100% rename from arch/x86/kernel/include/prctl.h rename to arch/x86_64/kernel/include/prctl.h diff --git a/arch/x86/kernel/include/registers.h b/arch/x86_64/kernel/include/registers.h similarity index 100% rename from arch/x86/kernel/include/registers.h rename to arch/x86_64/kernel/include/registers.h diff --git a/arch/x86/kernel/include/rlimit.h b/arch/x86_64/kernel/include/rlimit.h similarity index 100% rename from arch/x86/kernel/include/rlimit.h rename to arch/x86_64/kernel/include/rlimit.h diff --git a/arch/x86/kernel/include/signal.h b/arch/x86_64/kernel/include/signal.h similarity index 100% rename from arch/x86/kernel/include/signal.h rename to arch/x86_64/kernel/include/signal.h diff --git a/arch/x86/kernel/include/syscall_list.h b/arch/x86_64/kernel/include/syscall_list.h similarity index 100% rename from arch/x86/kernel/include/syscall_list.h rename to arch/x86_64/kernel/include/syscall_list.h diff --git a/arch/x86/kernel/interrupt.S b/arch/x86_64/kernel/interrupt.S similarity index 100% rename from arch/x86/kernel/interrupt.S rename to arch/x86_64/kernel/interrupt.S diff --git a/arch/x86/kernel/local.c b/arch/x86_64/kernel/local.c similarity index 100% rename from arch/x86/kernel/local.c rename to arch/x86_64/kernel/local.c diff --git a/arch/x86/kernel/lock.c b/arch/x86_64/kernel/lock.c similarity index 100% rename from arch/x86/kernel/lock.c rename to arch/x86_64/kernel/lock.c diff --git a/arch/x86/kernel/memory.c b/arch/x86_64/kernel/memory.c similarity index 100% rename from arch/x86/kernel/memory.c rename to arch/x86_64/kernel/memory.c diff --git a/arch/x86/kernel/mikc.c b/arch/x86_64/kernel/mikc.c similarity index 100% rename from arch/x86/kernel/mikc.c rename to arch/x86_64/kernel/mikc.c diff --git a/arch/x86/kernel/perfctr.c b/arch/x86_64/kernel/perfctr.c similarity index 100% rename from arch/x86/kernel/perfctr.c rename to arch/x86_64/kernel/perfctr.c diff --git a/arch/x86/kernel/syscall.c b/arch/x86_64/kernel/syscall.c similarity index 100% rename from arch/x86/kernel/syscall.c rename to arch/x86_64/kernel/syscall.c diff --git a/arch/x86/kernel/trampoline.S b/arch/x86_64/kernel/trampoline.S similarity index 100% rename from arch/x86/kernel/trampoline.S rename to arch/x86_64/kernel/trampoline.S diff --git a/arch/x86/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c similarity index 100% rename from arch/x86/kernel/vsyscall.c rename to arch/x86_64/kernel/vsyscall.c diff --git a/arch/x86/tools/eclair-dump-backtrace.exp.in b/arch/x86_64/tools/eclair-dump-backtrace.exp.in similarity index 100% rename from arch/x86/tools/eclair-dump-backtrace.exp.in rename to arch/x86_64/tools/eclair-dump-backtrace.exp.in diff --git a/arch/x86/tools/irqbalance_mck.in.in b/arch/x86_64/tools/irqbalance_mck.in.in similarity index 100% rename from arch/x86/tools/irqbalance_mck.in.in rename to arch/x86_64/tools/irqbalance_mck.in.in diff --git a/arch/x86/tools/irqbalance_mck.service.in b/arch/x86_64/tools/irqbalance_mck.service.in similarity index 100% rename from arch/x86/tools/irqbalance_mck.service.in rename to arch/x86_64/tools/irqbalance_mck.service.in diff --git a/arch/x86/tools/mcoverlay-create-smp-x86.sh.in b/arch/x86_64/tools/mcoverlay-create-smp-x86.sh.in similarity index 100% rename from arch/x86/tools/mcoverlay-create-smp-x86.sh.in rename to arch/x86_64/tools/mcoverlay-create-smp-x86.sh.in diff --git a/arch/x86/tools/mcoverlay-destroy-smp-x86.sh.in b/arch/x86_64/tools/mcoverlay-destroy-smp-x86.sh.in similarity index 100% rename from arch/x86/tools/mcoverlay-destroy-smp-x86.sh.in rename to arch/x86_64/tools/mcoverlay-destroy-smp-x86.sh.in diff --git a/arch/x86/tools/mcreboot-attached-mic.sh.in b/arch/x86_64/tools/mcreboot-attached-mic.sh.in similarity index 100% rename from arch/x86/tools/mcreboot-attached-mic.sh.in rename to arch/x86_64/tools/mcreboot-attached-mic.sh.in diff --git a/arch/x86/tools/mcreboot-builtin-x86.sh.in b/arch/x86_64/tools/mcreboot-builtin-x86.sh.in similarity index 100% rename from arch/x86/tools/mcreboot-builtin-x86.sh.in rename to arch/x86_64/tools/mcreboot-builtin-x86.sh.in diff --git a/arch/x86/tools/mcreboot-smp-x86.sh.in b/arch/x86_64/tools/mcreboot-smp-x86.sh.in similarity index 100% rename from arch/x86/tools/mcreboot-smp-x86.sh.in rename to arch/x86_64/tools/mcreboot-smp-x86.sh.in diff --git a/arch/x86/tools/mcreboot.1in b/arch/x86_64/tools/mcreboot.1in similarity index 100% rename from arch/x86/tools/mcreboot.1in rename to arch/x86_64/tools/mcreboot.1in diff --git a/arch/x86/tools/mcshutdown-attached-mic.sh.in b/arch/x86_64/tools/mcshutdown-attached-mic.sh.in similarity index 100% rename from arch/x86/tools/mcshutdown-attached-mic.sh.in rename to arch/x86_64/tools/mcshutdown-attached-mic.sh.in diff --git a/arch/x86/tools/mcshutdown-builtin-x86.sh.in b/arch/x86_64/tools/mcshutdown-builtin-x86.sh.in similarity index 100% rename from arch/x86/tools/mcshutdown-builtin-x86.sh.in rename to arch/x86_64/tools/mcshutdown-builtin-x86.sh.in diff --git a/arch/x86/tools/mcstop+release-smp-x86.sh.in b/arch/x86_64/tools/mcstop+release-smp-x86.sh.in similarity index 100% rename from arch/x86/tools/mcstop+release-smp-x86.sh.in rename to arch/x86_64/tools/mcstop+release-smp-x86.sh.in diff --git a/configure b/configure index 78208f8c..7ca6f2e7 100755 --- a/configure +++ b/configure @@ -5021,9 +5021,14 @@ ac_config_headers="$ac_config_headers config.h" # POSTK_DEBUG_ARCH_DEP_37 # AC_CONFIG_FILES arch dependfiles separate -ac_config_files="$ac_config_files Makefile executer/user/Makefile executer/user/mcexec.1:executer/user/mcexec.1in executer/user/vmcore2mckdump executer/user/arch/$ARCH/Makefile executer/user/arch/x86_64/Makefile executer/kernel/mcctrl/Makefile executer/kernel/mcctrl/arch/$ARCH/Makefile executer/kernel/mcoverlayfs/Makefile executer/kernel/mcoverlayfs/linux-3.10.0-327.36.1.el7/Makefile executer/kernel/mcoverlayfs/linux-4.0.9/Makefile executer/kernel/mcoverlayfs/linux-4.6.7/Makefile executer/include/qlmpilib.h kernel/Makefile kernel/Makefile.build kernel/include/swapfmt.h arch/x86/tools/mcreboot-attached-mic.sh arch/x86/tools/mcshutdown-attached-mic.sh arch/x86/tools/mcreboot-builtin-x86.sh arch/x86/tools/mcreboot-smp-x86.sh arch/x86/tools/mcstop+release-smp-x86.sh arch/x86/tools/mcoverlay-destroy-smp-x86.sh arch/x86/tools/mcoverlay-create-smp-x86.sh arch/x86/tools/eclair-dump-backtrace.exp arch/x86/tools/mcshutdown-builtin-x86.sh arch/x86/tools/mcreboot.1:arch/x86/tools/mcreboot.1in arch/x86/tools/irqbalance_mck.service arch/x86/tools/irqbalance_mck.in" +ac_config_files="$ac_config_files Makefile executer/user/Makefile executer/user/mcexec.1:executer/user/mcexec.1in executer/user/vmcore2mckdump executer/user/arch/$ARCH/Makefile executer/user/arch/x86_64/Makefile executer/kernel/mcctrl/Makefile executer/kernel/mcctrl/arch/$ARCH/Makefile executer/kernel/mcoverlayfs/Makefile executer/kernel/mcoverlayfs/linux-3.10.0-327.36.1.el7/Makefile executer/kernel/mcoverlayfs/linux-4.0.9/Makefile executer/kernel/mcoverlayfs/linux-4.6.7/Makefile executer/include/qlmpilib.h kernel/Makefile kernel/Makefile.build kernel/include/swapfmt.h arch/x86_64/tools/mcreboot-attached-mic.sh arch/x86_64/tools/mcshutdown-attached-mic.sh arch/x86_64/tools/mcreboot-builtin-x86.sh arch/x86_64/tools/mcreboot-smp-x86.sh arch/x86_64/tools/mcstop+release-smp-x86.sh arch/x86_64/tools/mcoverlay-destroy-smp-x86.sh arch/x86_64/tools/mcoverlay-create-smp-x86.sh arch/x86_64/tools/eclair-dump-backtrace.exp arch/x86_64/tools/mcshutdown-builtin-x86.sh arch/x86_64/tools/mcreboot.1:arch/x86_64/tools/mcreboot.1in arch/x86_64/tools/irqbalance_mck.service arch/x86_64/tools/irqbalance_mck.in" +if test "$TARGET" = "smp-x86"; then +ac_config_files="$ac_config_files arch/x86_64/kernel/Makefile.arch" + +fi + if test "$TARGET" = "smp-arm64"; then ac_config_files="$ac_config_files kernel/config/config.smp-arm64 arch/arm64/kernel/vdso/Makefile arch/arm64/kernel/Makefile.arch" @@ -5741,18 +5746,19 @@ do "kernel/Makefile") CONFIG_FILES="$CONFIG_FILES kernel/Makefile" ;; "kernel/Makefile.build") CONFIG_FILES="$CONFIG_FILES kernel/Makefile.build" ;; "kernel/include/swapfmt.h") CONFIG_FILES="$CONFIG_FILES kernel/include/swapfmt.h" ;; - "arch/x86/tools/mcreboot-attached-mic.sh") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/mcreboot-attached-mic.sh" ;; - "arch/x86/tools/mcshutdown-attached-mic.sh") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/mcshutdown-attached-mic.sh" ;; - "arch/x86/tools/mcreboot-builtin-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/mcreboot-builtin-x86.sh" ;; - "arch/x86/tools/mcreboot-smp-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/mcreboot-smp-x86.sh" ;; - "arch/x86/tools/mcstop+release-smp-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/mcstop+release-smp-x86.sh" ;; - "arch/x86/tools/mcoverlay-destroy-smp-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/mcoverlay-destroy-smp-x86.sh" ;; - "arch/x86/tools/mcoverlay-create-smp-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/mcoverlay-create-smp-x86.sh" ;; - "arch/x86/tools/eclair-dump-backtrace.exp") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/eclair-dump-backtrace.exp" ;; - "arch/x86/tools/mcshutdown-builtin-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/mcshutdown-builtin-x86.sh" ;; - "arch/x86/tools/mcreboot.1") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/mcreboot.1:arch/x86/tools/mcreboot.1in" ;; - "arch/x86/tools/irqbalance_mck.service") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/irqbalance_mck.service" ;; - "arch/x86/tools/irqbalance_mck.in") CONFIG_FILES="$CONFIG_FILES arch/x86/tools/irqbalance_mck.in" ;; + "arch/x86_64/tools/mcreboot-attached-mic.sh") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/mcreboot-attached-mic.sh" ;; + "arch/x86_64/tools/mcshutdown-attached-mic.sh") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/mcshutdown-attached-mic.sh" ;; + "arch/x86_64/tools/mcreboot-builtin-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/mcreboot-builtin-x86.sh" ;; + "arch/x86_64/tools/mcreboot-smp-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/mcreboot-smp-x86.sh" ;; + "arch/x86_64/tools/mcstop+release-smp-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/mcstop+release-smp-x86.sh" ;; + "arch/x86_64/tools/mcoverlay-destroy-smp-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/mcoverlay-destroy-smp-x86.sh" ;; + "arch/x86_64/tools/mcoverlay-create-smp-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/mcoverlay-create-smp-x86.sh" ;; + "arch/x86_64/tools/eclair-dump-backtrace.exp") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/eclair-dump-backtrace.exp" ;; + "arch/x86_64/tools/mcshutdown-builtin-x86.sh") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/mcshutdown-builtin-x86.sh" ;; + "arch/x86_64/tools/mcreboot.1") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/mcreboot.1:arch/x86_64/tools/mcreboot.1in" ;; + "arch/x86_64/tools/irqbalance_mck.service") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/irqbalance_mck.service" ;; + "arch/x86_64/tools/irqbalance_mck.in") CONFIG_FILES="$CONFIG_FILES arch/x86_64/tools/irqbalance_mck.in" ;; + "arch/x86_64/kernel/Makefile.arch") CONFIG_FILES="$CONFIG_FILES arch/x86_64/kernel/Makefile.arch" ;; "kernel/config/config.smp-arm64") CONFIG_FILES="$CONFIG_FILES kernel/config/config.smp-arm64" ;; "arch/arm64/kernel/vdso/Makefile") CONFIG_FILES="$CONFIG_FILES arch/arm64/kernel/vdso/Makefile" ;; "arch/arm64/kernel/Makefile.arch") CONFIG_FILES="$CONFIG_FILES arch/arm64/kernel/Makefile.arch" ;; diff --git a/configure.ac b/configure.ac index 96d08214..332f0743 100644 --- a/configure.ac +++ b/configure.ac @@ -535,20 +535,26 @@ AC_CONFIG_FILES([ kernel/Makefile kernel/Makefile.build kernel/include/swapfmt.h - arch/x86/tools/mcreboot-attached-mic.sh - arch/x86/tools/mcshutdown-attached-mic.sh - arch/x86/tools/mcreboot-builtin-x86.sh - arch/x86/tools/mcreboot-smp-x86.sh - arch/x86/tools/mcstop+release-smp-x86.sh - arch/x86/tools/mcoverlay-destroy-smp-x86.sh - arch/x86/tools/mcoverlay-create-smp-x86.sh - arch/x86/tools/eclair-dump-backtrace.exp - arch/x86/tools/mcshutdown-builtin-x86.sh - arch/x86/tools/mcreboot.1:arch/x86/tools/mcreboot.1in - arch/x86/tools/irqbalance_mck.service - arch/x86/tools/irqbalance_mck.in + arch/x86_64/tools/mcreboot-attached-mic.sh + arch/x86_64/tools/mcshutdown-attached-mic.sh + arch/x86_64/tools/mcreboot-builtin-x86.sh + arch/x86_64/tools/mcreboot-smp-x86.sh + arch/x86_64/tools/mcstop+release-smp-x86.sh + arch/x86_64/tools/mcoverlay-destroy-smp-x86.sh + arch/x86_64/tools/mcoverlay-create-smp-x86.sh + arch/x86_64/tools/eclair-dump-backtrace.exp + arch/x86_64/tools/mcshutdown-builtin-x86.sh + arch/x86_64/tools/mcreboot.1:arch/x86_64/tools/mcreboot.1in + arch/x86_64/tools/irqbalance_mck.service + arch/x86_64/tools/irqbalance_mck.in ]) +if test "$TARGET" = "smp-x86"; then +AC_CONFIG_FILES([ + arch/x86_64/kernel/Makefile.arch +]) +fi + if test "$TARGET" = "smp-arm64"; then AC_CONFIG_FILES([ kernel/config/config.smp-arm64 diff --git a/kernel/Makefile.build.in b/kernel/Makefile.build.in index 199dcfb5..374cb0e1 100644 --- a/kernel/Makefile.build.in +++ b/kernel/Makefile.build.in @@ -16,6 +16,7 @@ endif DEPSRCS=$(wildcard $(SRC)/*.c) CFLAGS += -I$(SRC)/include -I@abs_builddir@/../ -I@abs_builddir@/include -D__KERNEL__ -g -fno-omit-frame-pointer -fno-inline -fno-inline-small-functions +CFLAGS += -mcmodel=large -mno-red-zone LDFLAGS += -e arch_start IHKOBJ = ihk/ihk.o diff --git a/kernel/Makefile.in b/kernel/Makefile.in index 05b933f6..f895ff03 100644 --- a/kernel/Makefile.in +++ b/kernel/Makefile.in @@ -36,7 +36,7 @@ $(O): @echo 'SRC = $(SRC)' > $@ @echo 'IHKBASE = $(IHKBASE)' >> $@ @echo 'TARGET = $(notdir $(patsubst %/,%,$(dir $@)))' >> $@ - @echo 'TARGETDIR = $$(shell echo $$(TARGET) | sed "s/-/\//")' >> $@ + @echo 'TARGETDIR = smp/$(ARCH)' >> $@ @cat Makefile.build >> $@ @rm -f $(dir $@)/Makefile.dep diff --git a/kernel/include/elfcore.h b/kernel/include/elfcore.h index 9d7a1395..622666af 100644 --- a/kernel/include/elfcore.h +++ b/kernel/include/elfcore.h @@ -118,7 +118,7 @@ extern void arch_fill_prstatus(struct elf_prstatus64 *prstatus, struct thread *t #endif /* __HEADER_ELFCORE_H */ #else /* POSTK_DEBUG_ARCH_DEP_18 */ #ifdef __x86_64 -#include "../../arch/x86/kernel/include/elfcore.h" +#include "../../arch/x86_64/kernel/include/elfcore.h" #elif __aarch64__ #include "../../arch/arm64/kernel/include/elfcore.h" #endif