From: Nick Alcock Date: Mon, 3 Oct 2011 16:20:15 +0000 (+0100) Subject: dtrace: finish GPL/CDDL splitting work X-Git-Tag: v4.1.12-92~313^2~167 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a6f4bc0e2f24cd9247aa192483a3414a6d2523b0;p=users%2Fjedix%2Flinux-maple.git dtrace: finish GPL/CDDL splitting work kernel/dtrace and all that it #includes is now GPLv2, with the aid of a new systrace_os.h header containing the subset of systrace.h needed by the GPL shim. Conversely, dtrace/ is entirely CDDL. dtrace_ioctl.h is now an exported, header in include/linux/, to ease future sharing by the userspace side. It is probably not copyrightable (as is essential for interoperability and contains no creative elements), but if it has any license at all it is GPLv2 like the other headers in that directory (many of which are include them.) Signed-off-by: Nick Alcock --- diff --git a/kernel/dtrace/dtrace_ioctl.h b/include/linux/dtrace_ioctl.h similarity index 100% rename from kernel/dtrace/dtrace_ioctl.h rename to include/linux/dtrace_ioctl.h diff --git a/kernel/dtrace/dtrace_os.c b/kernel/dtrace/dtrace_os.c index 7c7b8610e9360..deac04dcc4a2b 100644 --- a/kernel/dtrace/dtrace_os.c +++ b/kernel/dtrace/dtrace_os.c @@ -11,7 +11,7 @@ #include #include "cyclic.h" -#include "systrace.h" +#include "systrace_os.h" /* * Return a high resolution timer value that is guaranteed to always increase. diff --git a/kernel/dtrace/systrace_os.h b/kernel/dtrace/systrace_os.h new file mode 100644 index 0000000000000..914e3f057bcb4 --- /dev/null +++ b/kernel/dtrace/systrace_os.h @@ -0,0 +1,34 @@ +/* Copyright (C) 2011 Oracle Corporation */ + +#ifndef _SYSTRACE_OS_H_ +#define _SYSTRACE_OS_H_ + +typedef uint32_t dtrace_id_t; +#define DTRACE_IDNONE 0 + +typedef void (*sys_call_ptr_t)(void); +typedef long (*dt_sys_call_t)(uintptr_t, uintptr_t, uintptr_t, uintptr_t, + uintptr_t, uintptr_t); + +typedef struct dtrace_syscalls { + const char *name; + dtrace_id_t stsy_entry; + dtrace_id_t stsy_return; + dt_sys_call_t stsy_underlying; + sys_call_ptr_t *stsy_tblent; +} dtrace_syscalls_t; + +typedef void (*dtrace_systrace_probe_t)(dtrace_id_t, uintptr_t, uintptr_t, + uintptr_t, uintptr_t, uintptr_t, + uintptr_t); + +typedef struct systrace_info { + dtrace_systrace_probe_t *probep; + dtrace_systrace_probe_t stub; + dt_sys_call_t syscall; + dtrace_syscalls_t sysent[NR_syscalls]; +} systrace_info_t; + +extern systrace_info_t *dtrace_syscalls_init(void); + +#endif /* _SYSTRACE_OS_H_ */