diff options
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r-- | runtime/runtime.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h index fba6f153..f226358f 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -71,6 +71,10 @@ static const char * (*_stp_kallsyms_lookup)(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, char **modname, char *namebuf); +#if defined (__powerpc64__) +static int (*_stp_validate_sp)(unsigned long sp, struct task_struct *p, + unsigned long nbytes); +#endif /* TEST_MODE is always defined by systemtap */ #ifdef TEST_MODE @@ -132,8 +136,21 @@ static const char * _stp_kallsyms_lookup_tabled (unsigned long addr, #endif int init_module (void) { +/* + * In order for the kallsyms_lookup_name hack to work under ppc64, we need + * CONFIG_KALLSYMS_ALL=y. + * On ppc64 the kallsyms_lookup_name(.funcname) returns the function entry, + * but kallsyms_lookup_name(funcname) returns the function descriptor + * (func_descr_t). The latter is what we want, and those symbols are only + * available with CONFIG_KALLSYMS_ALL=y. + */ _stp_kta = (int (*)(unsigned long))kallsyms_lookup_name("__kernel_text_address"); +#if defined (__powerpc64__) +_stp_validate_sp = (int (*)(unsigned long, struct task_struct *, + unsigned long)) kallsyms_lookup_name("validate_sp"); +#endif + #ifdef SYSTEMTAP if (stap_num_symbols > 0) _stp_kallsyms_lookup = & _stp_kallsyms_lookup_tabled; |