diff options
| author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-09-14 22:26:05 +0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-09-14 22:26:05 +0400 |
| commit | ac8d513a6801c8636922ccf4f30211810c9a56ce (patch) | |
| tree | 83ba584487a6a612c8fcf2563c28c0263df35ba2 /include/linux/module.h | |
| parent | bf992fa2bc1ad1bb2aeb0bdfadb43f236b9297fd (diff) | |
| parent | 99bc47067910f7070e65ee318a6dd79a2371f1e5 (diff) | |
| download | linux-ac8d513a6801c8636922ccf4f30211810c9a56ce.tar.xz | |
Merge branch 'master' into for-linus
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 098bdb7bfacf..f8f92d015efe 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -17,10 +17,12 @@ #include <linux/moduleparam.h> #include <linux/marker.h> #include <linux/tracepoint.h> -#include <asm/local.h> +#include <asm/local.h> #include <asm/module.h> +#include <trace/events/module.h> + /* Not Yet Implemented */ #define MODULE_SUPPORTED_DEVICE(name) @@ -462,7 +464,10 @@ static inline local_t *__module_ref_addr(struct module *mod, int cpu) static inline void __module_get(struct module *module) { if (module) { - local_inc(__module_ref_addr(module, get_cpu())); + unsigned int cpu = get_cpu(); + local_inc(__module_ref_addr(module, cpu)); + trace_module_get(module, _THIS_IP_, + local_read(__module_ref_addr(module, cpu))); put_cpu(); } } @@ -473,8 +478,11 @@ static inline int try_module_get(struct module *module) if (module) { unsigned int cpu = get_cpu(); - if (likely(module_is_live(module))) + if (likely(module_is_live(module))) { local_inc(__module_ref_addr(module, cpu)); + trace_module_get(module, _THIS_IP_, + local_read(__module_ref_addr(module, cpu))); + } else ret = 0; put_cpu(); |
