From: Kris Van Hees Date: Thu, 18 Oct 2012 15:53:56 +0000 (+0100) Subject: dtrace: miscellaneous 3.6 porting work X-Git-Tag: v4.1.12-92~313^2~104 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c8bb802e8c8ce35306ab5ad9c92265fd546f7f15;p=users%2Fjedix%2Flinux-maple.git dtrace: miscellaneous 3.6 porting work 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 --- diff --git a/arch/x86/kernel/syscall_32.c b/arch/x86/kernel/syscall_32.c index 3777189c4a19..c6ac0f80ec18 100644 --- a/arch/x86/kernel/syscall_32.c +++ b/arch/x86/kernel/syscall_32.c @@ -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. diff --git a/include/linux/dtrace_os.h b/include/linux/dtrace_os.h index 3b2dcb286604..070899f02004 100644 --- a/include/linux/dtrace_os.h +++ b/include/linux/dtrace_os.h @@ -3,8 +3,6 @@ #ifndef _DTRACE_OS_H_ #define _DTRACE_OS_H_ -#include - #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 + 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_ */ diff --git a/include/linux/module.h b/include/linux/module.h index 192471649d98..6b0a8f6af8d1 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -21,7 +21,6 @@ #include #include -#include #include /* In stripped ARM and x86-64 modules, ~ is surprisingly rare. */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 0240d52f1ed1..51e211a70201 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -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; diff --git a/init/main.c b/init/main.c index 5bf30895da18..626f09d1c49d 100644 --- a/init/main.c +++ b/init/main.c @@ -82,8 +82,6 @@ #include #include #include -#include -#include #include #include @@ -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 diff --git a/kernel/dtrace/dtrace_os.c b/kernel/dtrace/dtrace_os.c index 732a53870902..dee85d664bcc 100644 --- a/kernel/dtrace/dtrace_os.c +++ b/kernel/dtrace/dtrace_os.c @@ -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 +#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 } }; diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 0aee1562221c..0c0dc2b36058 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -74,7 +74,6 @@ #include #include #include -#include #include #include