mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] x86_64: allow unwinder to build without module support
Add proper conditionals to be able to build with CONFIG_MODULES=n. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
c33bd9aac0
commit
83f4fcce7f
2 changed files with 12 additions and 0 deletions
|
@ -29,12 +29,16 @@ struct module;
|
||||||
*/
|
*/
|
||||||
extern void unwind_init(void);
|
extern void unwind_init(void);
|
||||||
|
|
||||||
|
#ifdef CONFIG_MODULES
|
||||||
|
|
||||||
extern void *unwind_add_table(struct module *,
|
extern void *unwind_add_table(struct module *,
|
||||||
const void *table_start,
|
const void *table_start,
|
||||||
unsigned long table_size);
|
unsigned long table_size);
|
||||||
|
|
||||||
extern void unwind_remove_table(void *handle, int init_only);
|
extern void unwind_remove_table(void *handle, int init_only);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int unwind_init_frame_info(struct unwind_frame_info *,
|
extern int unwind_init_frame_info(struct unwind_frame_info *,
|
||||||
struct task_struct *,
|
struct task_struct *,
|
||||||
/*const*/ struct pt_regs *);
|
/*const*/ struct pt_regs *);
|
||||||
|
@ -72,6 +76,8 @@ struct unwind_frame_info {};
|
||||||
|
|
||||||
static inline void unwind_init(void) {}
|
static inline void unwind_init(void) {}
|
||||||
|
|
||||||
|
#ifdef CONFIG_MODULES
|
||||||
|
|
||||||
static inline void *unwind_add_table(struct module *mod,
|
static inline void *unwind_add_table(struct module *mod,
|
||||||
const void *table_start,
|
const void *table_start,
|
||||||
unsigned long table_size)
|
unsigned long table_size)
|
||||||
|
@ -79,6 +85,8 @@ static inline void *unwind_add_table(struct module *mod,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void unwind_remove_table(void *handle, int init_only)
|
static inline void unwind_remove_table(void *handle, int init_only)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,6 +172,8 @@ void __init unwind_init(void)
|
||||||
__start_unwind, __end_unwind - __start_unwind);
|
__start_unwind, __end_unwind - __start_unwind);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_MODULES
|
||||||
|
|
||||||
/* Must be called with module_mutex held. */
|
/* Must be called with module_mutex held. */
|
||||||
void *unwind_add_table(struct module *module,
|
void *unwind_add_table(struct module *module,
|
||||||
const void *table_start,
|
const void *table_start,
|
||||||
|
@ -253,6 +255,8 @@ void unwind_remove_table(void *handle, int init_only)
|
||||||
kfree(table);
|
kfree(table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_MODULES */
|
||||||
|
|
||||||
static uleb128_t get_uleb128(const u8 **pcur, const u8 *end)
|
static uleb128_t get_uleb128(const u8 **pcur, const u8 *end)
|
||||||
{
|
{
|
||||||
const u8 *cur = *pcur;
|
const u8 *cur = *pcur;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue