[IMPROVE] remove links to build modules
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 22 Oct 2014 10:49:26 +0000 (14:49 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 22 Oct 2014 10:49:26 +0000 (14:49 +0400)
Change-Id: Ibf0bdd848e3e03c9b5c1b4c9b5ec8390c8886bfd
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
23 files changed:
build.sh
kprobe/Kbuild
kprobe/arch/arm/swap-asm/memory_rwx.c [moved from kprobe/arch/asm-arm/memory_rwx.c with 100% similarity]
kprobe/arch/arm/swap-asm/memory_rwx.h [moved from kprobe/arch/asm-arm/memory_rwx.h with 100% similarity]
kprobe/arch/arm/swap-asm/swap_kprobes.c [moved from kprobe/arch/asm-arm/swap_kprobes.c with 100% similarity]
kprobe/arch/arm/swap-asm/swap_kprobes.h [moved from kprobe/arch/asm-arm/swap_kprobes.h with 100% similarity]
kprobe/arch/arm/swap-asm/trampoline_arm.S [moved from kprobe/arch/asm-arm/trampoline_arm.S with 100% similarity]
kprobe/arch/arm/swap-asm/trampoline_arm.h [moved from kprobe/arch/asm-arm/trampoline_arm.h with 100% similarity]
kprobe/arch/x86/swap-asm/swap_kprobes.c [moved from kprobe/arch/asm-x86/swap_kprobes.c with 100% similarity]
kprobe/arch/x86/swap-asm/swap_kprobes.h [moved from kprobe/arch/asm-x86/swap_kprobes.h with 100% similarity]
kprobe/swap_kprobes.c
kprobe/swap_kprobes.h
uprobe/Kbuild
uprobe/arch/arm/swap-asm/swap_uprobes.c [moved from uprobe/arch/asm-arm/swap_uprobes.c with 99% similarity]
uprobe/arch/arm/swap-asm/swap_uprobes.h [moved from uprobe/arch/asm-arm/swap_uprobes.h with 97% similarity]
uprobe/arch/arm/swap-asm/trampoline_thumb.S [moved from uprobe/arch/asm-arm/trampoline_thumb.S with 100% similarity]
uprobe/arch/arm/swap-asm/trampoline_thumb.h [moved from uprobe/arch/asm-arm/trampoline_thumb.h with 100% similarity]
uprobe/arch/x86/swap-asm/swap_uprobes.c [moved from uprobe/arch/asm-x86/swap_uprobes.c with 99% similarity]
uprobe/arch/x86/swap-asm/swap_uprobes.h [moved from uprobe/arch/asm-x86/swap_uprobes.h with 97% similarity]
uprobe/swap_uprobes.c
uprobe/swap_uprobes.h
us_manager/us_slot_manager.c
writer/swap_writer_module.c

index 8915d08..b13e5dd 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -50,13 +50,12 @@ ksyms_module_name=swap_ksyms.ko
 
 install_dir="/opt/swap/sdk"
 
-rm -f ${kprobe_arch_dir}/asm
-ln -s asm-${link_name} ${kprobe_arch_dir}/asm
-rm -f ${uprobe_arch_dir}/asm
-ln -s asm-${link_name} ${uprobe_arch_dir}/asm
+asm_kprobe_dir=${modules_dir}/kprobe/arch/${link_name}/
+asm_uprobe_dir=${modules_dir}/uprobe/arch/${link_name}/
 
 make CROSS_COMPILE=${cross_compile} ARCH=${arch} -C ${kernel_dir} \
-       M=${modules_dir} extra_cflags="-Werror -I${modules_dir}" modules || exit 1
+       M=${modules_dir} extra_cflags="-Werror -I${modules_dir} -I${asm_kprobe_dir} \
+       -I${asm_uprobe_dir}" modules || exit 1
 
 modules=\
 "${buffer_dir}/${buffer_module_name} \
index 4a71126..640899f 100644 (file)
@@ -3,14 +3,15 @@ EXTRA_CFLAGS := $(extra_cflags)
 obj-m := swap_kprobe.o
 swap_kprobe-y := swap_kprobes.o \
                  swap_kprobes_deps.o \
-                 arch/asm/swap_kprobes.o \
                  swap_slots.o
 
-ifeq ($(CONFIG_ARM), y)
-swap_kprobe-y += arch/asm/trampoline_arm.o
-
+### ARM
+swap_kprobe-$(CONFIG_ARM) += arch/arm/swap-asm/swap_kprobes.o \
+                             arch/arm/swap-asm/trampoline_arm.o
 ifeq ($(CONFIG_STRICT_MEMORY_RWX), y)
-swap_kprobe-y += arch/asm/memory_rwx.o
-endif # CONFIG_STRICT_MEMORY_RWX
+swap_kprobe-$(CONFIG_ARM) += arch/arm/swap-asm/memory_rwx.o
+endif #ifeq ($(CONFIG_STRICT_MEMORY_RWX), y)
+
 
-endif # CONFIG_ARM
\ No newline at end of file
+### X86
+swap_kprobe-$(CONFIG_X86) += arch/x86/swap-asm/swap_kprobes.o
index b5983e4..697b789 100644 (file)
@@ -42,7 +42,7 @@
 #include <linux/pagemap.h>
 
 #include <ksyms/ksyms.h>
-#include <kprobe/arch/asm/swap_kprobes.h>
+#include <swap-asm/swap_kprobes.h>
 
 #include "swap_slots.h"
 #include "swap_kdebug.h"
index 944bb44..5f1ed62 100644 (file)
@@ -43,7 +43,7 @@
 #include <linux/sched.h>
 #include <linux/pagemap.h>
 
-#include <kprobe/arch/asm/swap_kprobes.h>
+#include <swap-asm/swap_kprobes.h>
 
 
 #ifdef CONFIG_ARM
index 518445c..beb9b6a 100644 (file)
@@ -2,5 +2,12 @@ EXTRA_CFLAGS := $(extra_cflags)
 KBUILD_EXTRA_SYMBOLS = $(src)/../kprobe/Module.symvers
 
 obj-m := swap_uprobe.o
-swap_uprobe-y := swap_uprobes.o arch/asm/swap_uprobes.o
-swap_uprobe-$(CONFIG_ARM) += arch/asm/trampoline_thumb.o
+swap_uprobe-y := swap_uprobes.o
+
+### ARM
+swap_uprobe-$(CONFIG_ARM) += arch/arm/swap-asm/swap_uprobes.o \
+                             arch/arm/swap-asm/trampoline_thumb.o
+
+
+### X86
+swap_uprobe-$(CONFIG_X86) += arch/x86/swap-asm/swap_uprobes.o
similarity index 99%
rename from uprobe/arch/asm-arm/swap_uprobes.c
rename to uprobe/arch/arm/swap-asm/swap_uprobes.c
index 5413272..0a3786a 100644 (file)
  * Arch-dependent uprobe interface implementation for ARM.
  */
 
-#include <kprobe/swap_kprobes.h>
-#include <kprobe/arch/asm/swap_kprobes.h>
-#include <kprobe/arch/asm/trampoline_arm.h>
+
+#include <linux/init.h>                        /* need for asm/traps.h */
+#include <linux/sched.h>               /* need for asm/traps.h */
+
+#include <asm/ptrace.h>                        /* need for asm/traps.h */
 #include <asm/traps.h>
-#include <uprobe/swap_uprobes.h>
-#include <uprobe/arch/asm/swap_uprobes.h>
+
 #include <kprobe/swap_slots.h>
+#include <kprobe/swap_kprobes.h>
 #include <kprobe/swap_kprobes_deps.h>
+#include <uprobe/swap_uprobes.h>
+
+#include <swap-asm/swap_kprobes.h>
+#include <swap-asm/trampoline_arm.h>
+
+#include "swap_uprobes.h"
 #include "trampoline_thumb.h"
 
-// FIXME:
-#include <kprobe/swap_kdebug.h>
 
 /**
  * @def flush_insns
similarity index 97%
rename from uprobe/arch/asm-arm/swap_uprobes.h
rename to uprobe/arch/arm/swap-asm/swap_uprobes.h
index 4f87e84..826e308 100644 (file)
@@ -35,6 +35,9 @@
 #define _ARM_SWAP_UPROBES_H
 
 
+#include <swap-asm/swap_kprobes.h>     /* FIXME: for UPROBES_TRAMP_LEN */
+
+
 struct kprobe;
 struct task_struct;
 struct uprobe;
similarity index 99%
rename from uprobe/arch/asm-x86/swap_uprobes.c
rename to uprobe/arch/x86/swap-asm/swap_uprobes.c
index 7e40594..f4faca5 100644 (file)
  * Arch-dependent uprobe interface implementation for x86.
  */
 
+
 #include <linux/kdebug.h>
-#include <uprobe/swap_uprobes.h>
-#include <uprobe/arch/asm/swap_uprobes.h>
+
 #include <kprobe/swap_slots.h>
+#include <uprobe/swap_uprobes.h>
+
+#include "swap_uprobes.h"
+
 
 /**
  * @struct uprobe_ctlblk
similarity index 97%
rename from uprobe/arch/asm-x86/swap_uprobes.h
rename to uprobe/arch/x86/swap-asm/swap_uprobes.h
index 9e1a586..3ca6334 100644 (file)
@@ -34,6 +34,9 @@
 #define _X86_SWAP_UPROBES_H
 
 
+#include <swap-asm/swap_kprobes.h>      /* FIXME: for UPROBES_TRAMP_LEN */
+
+
 struct uprobe;
 struct uretprobe;
 struct uretprobe_instance;
index aa6904c..c8ffd51 100644 (file)
  */
 
 
-#include "swap_uprobes.h"
-#include <kprobe/swap_kdebug.h>
-
-#include <uprobe/arch/asm/swap_uprobes.h>
-
 #include <linux/hash.h>
 #include <linux/mempolicy.h>
 #include <linux/module.h>
+
 #include <kprobe/swap_slots.h>
+#include <kprobe/swap_kdebug.h>
 #include <kprobe/swap_kprobes_deps.h>
 
+#include <swap-asm/swap_uprobes.h>
+
+#include "swap_uprobes.h"
+
+
 enum {
        UPROBE_HASH_BITS  = 10,
        UPROBE_TABLE_SIZE = (1 << UPROBE_HASH_BITS)
index 8d91b14..da06aff 100644 (file)
@@ -35,7 +35,9 @@
 
 
 #include <kprobe/swap_kprobes.h>
-#include <uprobe/arch/asm/swap_uprobes.h>
+
+#include <swap-asm/swap_uprobes.h>
+
 
 /**
  * @struct uprobe
index 02aecfe..126b5df 100644 (file)
@@ -29,8 +29,9 @@
 #include <linux/mm.h>
 #include <linux/mman.h>
 #include <linux/list.h>
+
 #include <kprobe/swap_slots.h>
-#include <kprobe/arch/asm/swap_kprobes.h>
+#include <swap-asm/swap_kprobes.h>
 #include "us_manager_common.h"
 
 
index af9646f..00e35c7 100644 (file)
 #include <linux/err.h>
 #include <linux/module.h>
 #include <linux/slab.h>
+
 #include <asm/uaccess.h>
-#include <kprobe/arch/asm/swap_kprobes.h>
-#include <uprobe/arch/asm/swap_uprobes.h>
 
 #include <buffer/swap_buffer_module.h>
 #include <buffer/swap_buffer_errors.h>
 
+#include <swap-asm/swap_kprobes.h>
+#include <swap-asm/swap_uprobes.h>
+
 #include "swap_writer_module.h"
 #include "swap_writer_errors.h"
 #include "kernel_operations.h"