From: Jan Beulich Date: Mon, 26 Jun 2006 11:57:50 +0000 (+0200) Subject: [PATCH] x86_64: allow unwinder to build without module support X-Git-Tag: v2.6.18-rc1~612^2~46 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83f4fcce7fdd213bd570b899862c3838871f8cf7;p=linux-2.6 [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 Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/include/linux/unwind.h b/include/linux/unwind.h index 13c7b2cd87..ce48e2cd37 100644 --- a/include/linux/unwind.h +++ b/include/linux/unwind.h @@ -29,12 +29,16 @@ struct module; */ extern void unwind_init(void); +#ifdef CONFIG_MODULES + extern void *unwind_add_table(struct module *, const void *table_start, unsigned long table_size); extern void unwind_remove_table(void *handle, int init_only); +#endif + extern int unwind_init_frame_info(struct unwind_frame_info *, struct task_struct *, /*const*/ struct pt_regs *); @@ -72,6 +76,8 @@ struct unwind_frame_info {}; static inline void unwind_init(void) {} +#ifdef CONFIG_MODULES + static inline void *unwind_add_table(struct module *mod, const void *table_start, unsigned long table_size) @@ -79,6 +85,8 @@ static inline void *unwind_add_table(struct module *mod, return NULL; } +#endif + static inline void unwind_remove_table(void *handle, int init_only) { } diff --git a/kernel/unwind.c b/kernel/unwind.c index 0421035272..f69c804c8e 100644 --- a/kernel/unwind.c +++ b/kernel/unwind.c @@ -172,6 +172,8 @@ void __init unwind_init(void) __start_unwind, __end_unwind - __start_unwind); } +#ifdef CONFIG_MODULES + /* Must be called with module_mutex held. */ void *unwind_add_table(struct module *module, const void *table_start, @@ -253,6 +255,8 @@ void unwind_remove_table(void *handle, int init_only) kfree(table); } +#endif /* CONFIG_MODULES */ + static uleb128_t get_uleb128(const u8 **pcur, const u8 *end) { const u8 *cur = *pcur;