summaryrefslogtreecommitdiffstats
path: root/arch/ia64/include/asm/sections.h
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2008-09-09 17:56:47 -0500
committerTony Luck <tony.luck@intel.com>2008-09-10 10:46:32 -0700
commit4611a771fc8e5ad77d27f25268846abb425101a0 (patch)
tree0c897e70d6ae6a810dfa2f4be8a6aaba7d33e8f1 /arch/ia64/include/asm/sections.h
parentadee14b2e1557d0a8559f29681732d05a89dfc35 (diff)
[IA64] fix compile failure with non modular builds
Broke the non modular builds by moving an essential function into modules.c. Fix this by moving it out again and into asm/sections.h as an inline. To do this, the definitions of struct fdesc and struct got_val have been lifted out of modules.c and put in asm/elf.h where they belong. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/include/asm/sections.h')
-rw-r--r--arch/ia64/include/asm/sections.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/ia64/include/asm/sections.h b/arch/ia64/include/asm/sections.h
index a7acad2bc2f..f6679989103 100644
--- a/arch/ia64/include/asm/sections.h
+++ b/arch/ia64/include/asm/sections.h
@@ -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 */