Commit 83f4fcce7fdd213bd570b899862c3838871f8cf7

Authored by Jan Beulich
Committed by Linus Torvalds
1 parent c33bd9aac0

[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>

Showing 2 changed files with 12 additions and 0 deletions Side-by-side Diff

include/linux/unwind.h
... ... @@ -29,12 +29,16 @@
29 29 */
30 30 extern void unwind_init(void);
31 31  
  32 +#ifdef CONFIG_MODULES
  33 +
32 34 extern void *unwind_add_table(struct module *,
33 35 const void *table_start,
34 36 unsigned long table_size);
35 37  
36 38 extern void unwind_remove_table(void *handle, int init_only);
37 39  
  40 +#endif
  41 +
38 42 extern int unwind_init_frame_info(struct unwind_frame_info *,
39 43 struct task_struct *,
40 44 /*const*/ struct pt_regs *);
41 45  
... ... @@ -72,12 +76,16 @@
72 76  
73 77 static inline void unwind_init(void) {}
74 78  
  79 +#ifdef CONFIG_MODULES
  80 +
75 81 static inline void *unwind_add_table(struct module *mod,
76 82 const void *table_start,
77 83 unsigned long table_size)
78 84 {
79 85 return NULL;
80 86 }
  87 +
  88 +#endif
81 89  
82 90 static inline void unwind_remove_table(void *handle, int init_only)
83 91 {
... ... @@ -172,6 +172,8 @@
172 172 __start_unwind, __end_unwind - __start_unwind);
173 173 }
174 174  
  175 +#ifdef CONFIG_MODULES
  176 +
175 177 /* Must be called with module_mutex held. */
176 178 void *unwind_add_table(struct module *module,
177 179 const void *table_start,
... ... @@ -252,6 +254,8 @@
252 254 if (info.table)
253 255 kfree(table);
254 256 }
  257 +
  258 +#endif /* CONFIG_MODULES */
255 259  
256 260 static uleb128_t get_uleb128(const u8 **pcur, const u8 *end)
257 261 {