X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fpowerpc%2Finclude%2Fasm%2Fsections.h;h=07956f3e78444f5f63390d8d328c000af957061f;hb=2d291e902791e1c8d72bc223b6f063bbb27a1280;hp=916018e425c4dc7112f6c0c1f49f884118d4bd0b;hpb=2acb802b0c5485aedb46e23b2b45e49573454c09;p=linux-2.6-omap-h63xx.git diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h index 916018e425c..07956f3e784 100644 --- a/arch/powerpc/include/asm/sections.h +++ b/arch/powerpc/include/asm/sections.h @@ -2,6 +2,8 @@ #define _ASM_POWERPC_SECTIONS_H #ifdef __KERNEL__ +#include +#include #include #ifdef __powerpc64__ @@ -16,6 +18,17 @@ static inline int in_kernel_text(unsigned long addr) return 0; } +#undef dereference_function_descriptor +static inline void *dereference_function_descriptor(void *ptr) +{ + struct ppc64_opd_entry *desc = ptr; + void *p; + + if (!probe_kernel_address(&desc->funcaddr, p)) + ptr = p; + return ptr; +} + #endif #endif /* __KERNEL__ */