]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/include/asm/sections.h
[IA64] fix compile failure with non modular builds
[linux-2.6-omap-h63xx.git] / arch / ia64 / include / asm / sections.h
index a7acad2bc2f0b0f14f6b608bf43224b4411ce9d5..f6679989103689c24f01315b8f1e41c078b79ce2 100644 (file)
@@ -6,6 +6,8 @@
  *     David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
+#include <linux/elf.h>
+#include <linux/uaccess.h>
 #include <asm-generic/sections.h>
 
 extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[];
@@ -22,7 +24,16 @@ extern char __start_unwind[], __end_unwind[];
 extern char __start_ivt_text[], __end_ivt_text[];
 
 #undef dereference_function_descriptor
-void *dereference_function_descriptor(void *);
+static inline void *dereference_function_descriptor(void *ptr)
+{
+       struct fdesc *desc = ptr;
+       void *p;
+
+       if (!probe_kernel_address(&desc->ip, p))
+               ptr = p;
+       return ptr;
+}
+
 
 #endif /* _ASM_IA64_SECTIONS_H */