staging: remove intel_sst driver
[zen-stable.git] / drivers / staging / lttng / wrapper / kallsyms.h
bloba7b8ab136ed1fe5413561405d13c4491d8f60a29
1 #ifndef _LTT_WRAPPER_KALLSYMS_H
2 #define _LTT_WRAPPER_KALLSYMS_H
4 #include <linux/kallsyms.h>
6 /*
7 * Copyright (C) 2011 Avik Sil (avik.sil@linaro.org)
9 * wrapper around kallsyms_lookup_name. Implements arch-dependent code for
10 * arches where the address of the start of the function body is different
11 * from the pointer which can be used to call the function, e.g. ARM THUMB2.
13 * Dual LGPL v2.1/GPL v2 license.
16 static inline
17 unsigned long kallsyms_lookup_funcptr(const char *name)
19 unsigned long addr;
21 addr = kallsyms_lookup_name(name);
22 #ifdef CONFIG_ARM
23 #ifdef CONFIG_THUMB2_KERNEL
24 if (addr)
25 addr |= 1; /* set bit 0 in address for thumb mode */
26 #endif
27 #endif
28 return addr;
30 #endif /* _LTT_WRAPPER_KALLSYMS_H */