aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-06-26 07:57:50 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 13:48:18 -0400
commit83f4fcce7fdd213bd570b899862c3838871f8cf7 (patch)
treeba66890ee98386e33b5d642af76291fabf8d0d29
parentc33bd9aac0597eeedaaa01ea5aafe456894b2f2b (diff)
[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>
-rw-r--r--include/linux/unwind.h8
-rw-r--r--kernel/unwind.c4
2 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/unwind.h b/include/linux/unwind.h
index 13c7b2cd87ce..ce48e2cd37a2 100644
--- a/include/linux/unwind.h
+++ b/include/linux/unwind.h
@@ -29,12 +29,16 @@ struct module;
29 */ 29 */
30extern void unwind_init(void); 30extern void unwind_init(void);
31 31
32#ifdef CONFIG_MODULES
33
32extern void *unwind_add_table(struct module *, 34extern void *unwind_add_table(struct module *,
33 const void *table_start, 35 const void *table_start,
34 unsigned long table_size); 36 unsigned long table_size);
35 37
36extern void unwind_remove_table(void *handle, int init_only); 38extern void unwind_remove_table(void *handle, int init_only);
37 39
40#endif
41
38extern int unwind_init_frame_info(struct unwind_frame_info *, 42extern int unwind_init_frame_info(struct unwind_frame_info *,
39 struct task_struct *, 43 struct task_struct *,
40 /*const*/ struct pt_regs *); 44 /*const*/ struct pt_regs *);
@@ -72,6 +76,8 @@ struct unwind_frame_info {};
72 76
73static inline void unwind_init(void) {} 77static inline void unwind_init(void) {}
74 78
79#ifdef CONFIG_MODULES
80
75static inline void *unwind_add_table(struct module *mod, 81static inline void *unwind_add_table(struct module *mod,
76 const void *table_start, 82 const void *table_start,
77 unsigned long table_size) 83 unsigned long table_size)
@@ -79,6 +85,8 @@ static inline void *unwind_add_table(struct module *mod,
79 return NULL; 85 return NULL;
80} 86}
81 87
88#endif
89
82static inline void unwind_remove_table(void *handle, int init_only) 90static inline void unwind_remove_table(void *handle, int init_only)
83{ 91{
84} 92}
diff --git a/kernel/unwind.c b/kernel/unwind.c
index 0421035272d9..f69c804c8e62 100644
--- a/kernel/unwind.c
+++ b/kernel/unwind.c
@@ -172,6 +172,8 @@ void __init unwind_init(void)
172 __start_unwind, __end_unwind - __start_unwind); 172 __start_unwind, __end_unwind - __start_unwind);
173} 173}
174 174
175#ifdef CONFIG_MODULES
176
175/* Must be called with module_mutex held. */ 177/* Must be called with module_mutex held. */
176void *unwind_add_table(struct module *module, 178void *unwind_add_table(struct module *module,
177 const void *table_start, 179 const void *table_start,
@@ -253,6 +255,8 @@ void unwind_remove_table(void *handle, int init_only)
253 kfree(table); 255 kfree(table);
254} 256}
255 257
258#endif /* CONFIG_MODULES */
259
256static uleb128_t get_uleb128(const u8 **pcur, const u8 *end) 260static uleb128_t get_uleb128(const u8 **pcur, const u8 *end)
257{ 261{
258 const u8 *cur = *pcur; 262 const u8 *cur = *pcur;