aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/sections.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/sections.h')
-rw-r--r--arch/powerpc/include/asm/sections.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h
index 82bec63bbd4f..e335a8f846af 100644
--- a/arch/powerpc/include/asm/sections.h
+++ b/arch/powerpc/include/asm/sections.h
@@ -66,6 +66,9 @@ static inline int overlaps_kvm_tmp(unsigned long start, unsigned long end)
}
#ifdef PPC64_ELF_ABI_v1
+
+#define HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR 1
+
#undef dereference_function_descriptor
static inline void *dereference_function_descriptor(void *ptr)
{
@@ -76,6 +79,15 @@ static inline void *dereference_function_descriptor(void *ptr)
ptr = p;
return ptr;
}
+
+#undef dereference_kernel_function_descriptor
+static inline void *dereference_kernel_function_descriptor(void *ptr)
+{
+ if (ptr < (void *)__start_opd || ptr >= (void *)__end_opd)
+ return ptr;
+
+ return dereference_function_descriptor(ptr);
+}
#endif /* PPC64_ELF_ABI_v1 */
#endif