Skip to content

Instantly share code, notes, and snippets.

@erthink erthink/patch.diff

Last active Apr 28, 2016
Embed
What would you like to do?
Intel's VTune driver (sepdk) fix for modern kernels
commit acaf1cd6b292c7b54f2d4861d12fedb2674bd8d3
Author: Leo Yuriev <leo@yuriev.ru>
Date: 2016-04-14 22:12:37 +0300
fix for modern kernels
diff --git a/src/vtsspp/module.c b/src/vtsspp/module.c
index 266becc..f662f89 100644
--- a/src/vtsspp/module.c
+++ b/src/vtsspp/module.c
@@ -767,12 +767,12 @@ static int vtss_kmodule_notifier(struct notifier_block *block, unsigned long val
{
struct module *mod = (struct module*)data;
const char *name = mod->name;
- unsigned long module_core = (unsigned long)mod->module_core;
- unsigned long core_size = mod->core_size;
+ unsigned long addr = (unsigned long)mod->module_core;
+ unsigned long size = mod->core_size;
if (val == MODULE_STATE_COMING) {
- TRACE("MODULE_STATE_COMING: name='%s', module_core=0x%lx, core_size=%lu", name, module_core, core_size);
- vtss_kmap(current, name, module_core, 0, core_size);
+ TRACE("MODULE_STATE_COMING: name='%s', module_core=0x%lx, core_size=%lu", name, addr, size);
+ vtss_kmap(current, name, addr, 0, size);
} else if (val == MODULE_STATE_GOING) {
TRACE("MODULE_STATE_GOING: name='%s'", name);
}
diff --git a/src/vtsspp/module.h b/src/vtsspp/module.h
index d87cce9..76e19c9 100644
--- a/src/vtsspp/module.h
+++ b/src/vtsspp/module.h
@@ -33,4 +33,7 @@
int vtss_probe_init(void);
void vtss_probe_fini(void);
+#define module_core core_layout.base
+#define core_size core_layout.size
+
#endif /* _VTSS_MODULE_H_ */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.