x86, realmode: flattened rm hierachy
authorJarkko Sakkinen <jarkko.sakkinen@intel.com>
Tue, 8 May 2012 18:22:42 +0000 (21:22 +0300)
committerH. Peter Anvin <hpa@linux.intel.com>
Tue, 8 May 2012 18:48:45 +0000 (11:48 -0700)
Simplified hierarchy under rm directory to a flat
directory because it is not anymore really justified
to have own directory for wakeup code. It only adds
more complexity.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Link: http://lkml.kernel.org/r/1336501366-28617-20-git-send-email-jarkko.sakkinen@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
21 files changed:
arch/x86/kernel/acpi/sleep.c
arch/x86/realmode/rm/Makefile
arch/x86/realmode/rm/bioscall.S [new file with mode: 0644]
arch/x86/realmode/rm/copy.S [new file with mode: 0644]
arch/x86/realmode/rm/regs.c [new file with mode: 0644]
arch/x86/realmode/rm/video-bios.c [new file with mode: 0644]
arch/x86/realmode/rm/video-mode.c [new file with mode: 0644]
arch/x86/realmode/rm/video-vesa.c [new file with mode: 0644]
arch/x86/realmode/rm/video-vga.c [new file with mode: 0644]
arch/x86/realmode/rm/wakemain.c [moved from arch/x86/realmode/rm/wakeup/wakemain.c with 100% similarity]
arch/x86/realmode/rm/wakeup.h [moved from arch/x86/realmode/rm/wakeup/wakeup.h with 100% similarity]
arch/x86/realmode/rm/wakeup/.gitignore [deleted file]
arch/x86/realmode/rm/wakeup/Makefile [deleted file]
arch/x86/realmode/rm/wakeup/bioscall.S [deleted file]
arch/x86/realmode/rm/wakeup/copy.S [deleted file]
arch/x86/realmode/rm/wakeup/regs.c [deleted file]
arch/x86/realmode/rm/wakeup/video-bios.c [deleted file]
arch/x86/realmode/rm/wakeup/video-mode.c [deleted file]
arch/x86/realmode/rm/wakeup/video-vesa.c [deleted file]
arch/x86/realmode/rm/wakeup/video-vga.c [deleted file]
arch/x86/realmode/rm/wakeup_asm.S [moved from arch/x86/realmode/rm/wakeup/wakeup_asm.S with 99% similarity]

index 6ca3f54..95bf99d 100644 (file)
@@ -16,7 +16,7 @@
 #include <asm/cacheflush.h>
 #include <asm/realmode.h>
 
-#include "../../realmode/rm/wakeup/wakeup.h"
+#include "../../realmode/rm/wakeup.h"
 #include "sleep.h"
 
 unsigned long acpi_realmode_flags;
index c2c27a4..fc8854b 100644 (file)
@@ -7,21 +7,26 @@
 #
 #
 
-subdir- := wakeup
-
 always := realmode.bin
 
 realmode-y                     += header.o
 realmode-y                     += trampoline_$(BITS).o
 realmode-y                     += stack.o
 realmode-$(CONFIG_X86_32)      += reboot_32.o
-realmode-$(CONFIG_ACPI_SLEEP)  += wakeup/wakeup.o
+realmode-$(CONFIG_ACPI_SLEEP)  += $(wakeup-objs)
+
+wakeup-objs    := wakeup_asm.o wakemain.o video-mode.o
+wakeup-objs    += copy.o bioscall.o regs.o
+# The link order of the video-*.o modules can matter.  In particular,
+# video-vga.o *must* be listed first, followed by video-vesa.o.
+# Hardware-specific drivers should follow in the order they should be
+# probed, and video-bios.o should typically be last.
+wakeup-objs    += video-vga.o
+wakeup-objs    += video-vesa.o
+wakeup-objs    += video-bios.o
 
 targets        += $(realmode-y)
 
-$(obj)/wakeup/wakeup.o: FORCE
-       $(Q)$(MAKE) $(build)=$(obj)/wakeup $@
-
 REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y))
 
 sed-pasyms := -n -r -e 's/^([0-9a-fA-F]+) [ABCDGRSTVW] (.+)$$/pa_\2 = \2;/p'
@@ -55,7 +60,8 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
 
 # How to compile the 16-bit code.  Note we always compile for -march=i386,
 # that way we can complain to the user if the CPU is insufficient.
-KBUILD_CFLAGS  := $(LINUXINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ \
+KBUILD_CFLAGS  := $(LINUXINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ -D_WAKEUP \
+                  -I$(srctree)/arch/x86/boot \
                   -DDISABLE_BRANCH_PROFILING \
                   -Wall -Wstrict-prototypes \
                   -march=i386 -mregparm=3 \
diff --git a/arch/x86/realmode/rm/bioscall.S b/arch/x86/realmode/rm/bioscall.S
new file mode 100644 (file)
index 0000000..16162d1
--- /dev/null
@@ -0,0 +1 @@
+#include "../../boot/bioscall.S"
diff --git a/arch/x86/realmode/rm/copy.S b/arch/x86/realmode/rm/copy.S
new file mode 100644 (file)
index 0000000..b785e6f
--- /dev/null
@@ -0,0 +1 @@
+#include "../../boot/copy.S"
diff --git a/arch/x86/realmode/rm/regs.c b/arch/x86/realmode/rm/regs.c
new file mode 100644 (file)
index 0000000..fbb15b9
--- /dev/null
@@ -0,0 +1 @@
+#include "../../boot/regs.c"
diff --git a/arch/x86/realmode/rm/video-bios.c b/arch/x86/realmode/rm/video-bios.c
new file mode 100644 (file)
index 0000000..848b25a
--- /dev/null
@@ -0,0 +1 @@
+#include "../../boot/video-bios.c"
diff --git a/arch/x86/realmode/rm/video-mode.c b/arch/x86/realmode/rm/video-mode.c
new file mode 100644 (file)
index 0000000..2a98b7e
--- /dev/null
@@ -0,0 +1 @@
+#include "../../boot/video-mode.c"
diff --git a/arch/x86/realmode/rm/video-vesa.c b/arch/x86/realmode/rm/video-vesa.c
new file mode 100644 (file)
index 0000000..413eddd
--- /dev/null
@@ -0,0 +1 @@
+#include "../../boot/video-vesa.c"
diff --git a/arch/x86/realmode/rm/video-vga.c b/arch/x86/realmode/rm/video-vga.c
new file mode 100644 (file)
index 0000000..3085f5c
--- /dev/null
@@ -0,0 +1 @@
+#include "../../boot/video-vga.c"
diff --git a/arch/x86/realmode/rm/wakeup/.gitignore b/arch/x86/realmode/rm/wakeup/.gitignore
deleted file mode 100644 (file)
index 58f1f48..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-wakeup.bin
-wakeup.elf
-wakeup.lds
diff --git a/arch/x86/realmode/rm/wakeup/Makefile b/arch/x86/realmode/rm/wakeup/Makefile
deleted file mode 100644 (file)
index 4c85332..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# arch/x86/kernel/acpi/realmode/Makefile
-#
-# This file is subject to the terms and conditions of the GNU General Public
-# License.  See the file "COPYING" in the main directory of this archive
-# for more details.
-#
-
-always         := wakeup.o
-
-wakeup-y       += wakeup_asm.o wakemain.o video-mode.o
-wakeup-y       += copy.o bioscall.o regs.o
-
-# The link order of the video-*.o modules can matter.  In particular,
-# video-vga.o *must* be listed first, followed by video-vesa.o.
-# Hardware-specific drivers should follow in the order they should be
-# probed, and video-bios.o should typically be last.
-wakeup-y       += video-vga.o
-wakeup-y       += video-vesa.o
-wakeup-y       += video-bios.o
-
-targets                += $(wakeup-y)
-
-WAKEUP_OBJS = $(addprefix $(obj)/,$(wakeup-y))
-
-LDFLAGS_wakeup.o := -m elf_i386 -r
-$(obj)/wakeup.o: $(WAKEUP_OBJS) FORCE
-       $(call if_changed,ld)
-
-bootsrc := $(src)/../../../boot
-
-ccflags-y += -D_WAKEUP -I$(srctree)/$(bootsrc)
-asflags-y += -D_WAKEUP -I$(srctree)/$(bootsrc)
diff --git a/arch/x86/realmode/rm/wakeup/bioscall.S b/arch/x86/realmode/rm/wakeup/bioscall.S
deleted file mode 100644 (file)
index f51eb0b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../../boot/bioscall.S"
diff --git a/arch/x86/realmode/rm/wakeup/copy.S b/arch/x86/realmode/rm/wakeup/copy.S
deleted file mode 100644 (file)
index dc59ebe..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../../boot/copy.S"
diff --git a/arch/x86/realmode/rm/wakeup/regs.c b/arch/x86/realmode/rm/wakeup/regs.c
deleted file mode 100644 (file)
index 6206033..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../../boot/regs.c"
diff --git a/arch/x86/realmode/rm/wakeup/video-bios.c b/arch/x86/realmode/rm/wakeup/video-bios.c
deleted file mode 100644 (file)
index 7deabc1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../../boot/video-bios.c"
diff --git a/arch/x86/realmode/rm/wakeup/video-mode.c b/arch/x86/realmode/rm/wakeup/video-mode.c
deleted file mode 100644 (file)
index 328ad20..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../../boot/video-mode.c"
diff --git a/arch/x86/realmode/rm/wakeup/video-vesa.c b/arch/x86/realmode/rm/wakeup/video-vesa.c
deleted file mode 100644 (file)
index 9dbb967..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../../boot/video-vesa.c"
diff --git a/arch/x86/realmode/rm/wakeup/video-vga.c b/arch/x86/realmode/rm/wakeup/video-vga.c
deleted file mode 100644 (file)
index bcc8125..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../../boot/video-vga.c"
similarity index 99%
rename from arch/x86/realmode/rm/wakeup/wakeup_asm.S
rename to arch/x86/realmode/rm/wakeup_asm.S
index f81c1cd..8a57c5a 100644 (file)
@@ -7,7 +7,7 @@
 #include <asm/page_types.h>
 #include <asm/pgtable_types.h>
 #include <asm/processor-flags.h>
-#include "../realmode.h"
+#include "realmode.h"
 #include "wakeup.h"
 
        .code16