From: Nick Alcock Date: Fri, 20 Jul 2012 22:00:07 +0000 (+0100) Subject: ctf: force dtrace_ctf.ko to be loaded whenever dtrace.ko is X-Git-Tag: v4.1.12-92~313^2~143 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9a7b61c03fe1f9140a4a2e28adb697558ee404bc;p=users%2Fjedix%2Flinux-maple.git ctf: force dtrace_ctf.ko to be loaded whenever dtrace.ko is DTrace userspace makes the simplifying assumption that dtrace_ctf.ko (containing the CTF for the kernel, for built-in modules, and for shared types, but no code) is always loaded whenever DTrace is usable. (The CTF itself is in a non-loaded section, but having dtrace_ctf.ko in the list of loaded modules means that we can eliminate an annoying set of dtrace_ctf-related special case.) We do this by introducing a dummy function dtrace_ctf_forceload() into the dtrace_ctf module, which DTrace then calls: depmod will then arrange for dtrace_ctf to be loaded when we need it. Signed-off-by: Nick Alcock --- diff --git a/kernel/dtrace/dtrace_ctf.c b/kernel/dtrace/dtrace_ctf.c index a462fb062af07..77ab087ed83b9 100644 --- a/kernel/dtrace/dtrace_ctf.c +++ b/kernel/dtrace/dtrace_ctf.c @@ -11,3 +11,9 @@ MODULE_AUTHOR("Nick Alcock "); MODULE_DESCRIPTION("CTF container module, not for modprobing"); MODULE_VERSION("v0.1"); MODULE_LICENSE("GPL"); + +void dtrace_ctf_forceload(void) { + /* nothing doing */ +} + +EXPORT_SYMBOL(dtrace_ctf_forceload);