]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: miscellaneous 3.6 porting work
authorKris Van Hees <kris.van.hees@oracle.com>
Thu, 18 Oct 2012 15:53:56 +0000 (16:53 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:41:37 +0000 (22:41 +0100)
Missing headers, catering for header movement, the occasional missing
prototype, and changes in the way the syscall table is built.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
arch/x86/kernel/syscall_32.c
include/linux/dtrace_os.h
include/linux/module.h
include/linux/sched.h
init/main.c
kernel/dtrace/dtrace_os.c
kernel/sched/core.c

index 3777189c4a19f04d1b7118ce2fae228e86356592..c6ac0f80ec188142b5e8bc1dda31424a95df1476 100644 (file)
@@ -23,7 +23,7 @@ typedef asmlinkage void (*sys_call_ptr_t)(void);
 
 extern asmlinkage void sys_ni_syscall(void);
 
-__visible const sys_call_ptr_t ia32_sys_call_table[__NR_ia32_syscall_max+1] = {
+__visible sys_call_ptr_t ia32_sys_call_table[__NR_ia32_syscall_max+1] = {
        /*
         * Smells like a compiler bug -- it doesn't work
         * when the & below is removed.
index 3b2dcb28660484946bfa8c00063606f98f739cca..070899f02004becf26269cf33ebefbcbbb148d49 100644 (file)
@@ -3,8 +3,6 @@
 #ifndef _DTRACE_OS_H_
 #define _DTRACE_OS_H_
 
-#include <asm/unistd.h>
-
 #define PR_PSARGS_SZ           80
 
 typedef struct dtrace_psinfo {
@@ -17,10 +15,13 @@ typedef struct dtrace_psinfo {
        char psargs[PR_PSARGS_SZ];
 } dtrace_psinfo_t;
 
+#ifndef COMPILE_OFFSETS
+
+#include <asm/asm-offsets.h>
+
 extern dtrace_psinfo_t *dtrace_psinfo_alloc(struct task_struct *);
 extern void dtrace_psinfo_free(dtrace_psinfo_t *);
 
-#ifdef NR_syscalls
 typedef uint32_t dtrace_id_t;
 
 #define DTRACE_IDNONE 0
@@ -97,6 +98,6 @@ typedef void          *(fbt_provide_fn)(struct module *, char *, uint8_t,
 
 extern void dtrace_fbt_init(fbt_provide_fn);
 
-#endif
+#endif /* COMPILE_OFFSETS */
 
 #endif /* _DTRACE_OS_H_ */
index 192471649d981dd4f7d084b8819ade439f67db44..6b0a8f6af8d16f142b97fe32b79a82f15830653f 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/percpu.h>
 #include <asm/module.h>
 
-#include <trace/events/module.h>
 #include <linux/sdt.h>
 
 /* In stripped ARM and x86-64 modules, ~ is surprisingly rare. */
index 0240d52f1ed11d94417ef23660d2e477393aa54b..51e211a70201de268aa350adafed0c566e2372d6 100644 (file)
@@ -1714,6 +1714,7 @@ struct task_struct {
                int order;
                unsigned int may_oom:1;
        } memcg_oom;
+#endif
 #ifdef CONFIG_DTRACE
        uint32_t predcache;
        ktime_t dtrace_vtime;
index 5bf30895da18e6b76c4b010c739a30f242f35438..626f09d1c49dfa1e531515b230850cf8839d8783 100644 (file)
@@ -82,8 +82,6 @@
 #include <linux/proc_ns.h>
 #include <linux/io.h>
 #include <linux/sdt.h>
-#include <linux/dtrace_os.h>
-#include <linux/dtrace_cpu.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
@@ -100,6 +98,11 @@ extern void radix_tree_init(void);
 static inline void mark_rodata_ro(void) { }
 #endif
 
+#ifdef CONFIG_DTRACE
+extern void dtrace_os_init(void);
+extern void dtrace_cpu_init(void);
+#endif
+
 /*
  * Debug helper: via this flag we know that we are in 'early bootup code'
  * where only the boot processor is running with IRQ disabled.  This means
index 732a538709022335ca306a83dff34e7cb64d23cd..dee85d664bcc51ccfc12f5e4eb3d32fcf1229f97 100644 (file)
@@ -650,14 +650,10 @@ static systrace_info_t    systrace_info =
                            [SCE_RT_SIGRETURN] dtrace_stub_rt_sigreturn,
                        },
                        {
-/*
- * Need to remove the define for _ASM_X86_UNISTD_64_H in order for unistd_64
- * to be included here because it was already included indirectly.
- */
-#undef __SYSCALL
-#define __SYSCALL(nr, sym)     [nr] { __stringify(sym), },
-# undef _ASM_X86_UNISTD_64_H
-#include <asm/unistd.h>
+#define __SYSCALL_64(nr, sym, compat)          [nr] { __stringify(sym), },
+#define __SYSCALL_COMMON(nr, sym, compat)      __SYSCALL_64(nr, sym, compat)
+#define __SYSCALL_X32(nt, sym, compat)
+#include <asm/syscalls_64.h>
                        }
                };
 
index 0aee1562221cd589bf5e3f8a5d028bfd6d64640e..0c0dc2b36058dfd6ba7e36b5573318e17cef7dea 100644 (file)
@@ -74,7 +74,6 @@
 #include <linux/binfmts.h>
 #include <linux/context_tracking.h>
 #include <linux/compiler.h>
-#include <linux/dtrace_cpu.h>
 
 #include <asm/switch_to.h>
 #include <asm/tlb.h>