summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/sections.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt2008-10-15 02:31:54 +0200
committerBenjamin Herrenschmidt2008-10-15 02:31:54 +0200
commit6dc6472581f693b5fc95aebedf67b4960fb85cf0 (patch)
tree06a5a9a08519950575505273eabced331ed51405 /arch/powerpc/include/asm/sections.h
parentpowerpc: Fix CHRP PCI config access for indirect_pci (diff)
parentMerge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux (diff)
downloadkernel-qcow2-linux-6dc6472581f693b5fc95aebedf67b4960fb85cf0.tar.gz
kernel-qcow2-linux-6dc6472581f693b5fc95aebedf67b4960fb85cf0.tar.xz
kernel-qcow2-linux-6dc6472581f693b5fc95aebedf67b4960fb85cf0.zip
Merge commit 'origin'
Manual fixup of conflicts on: arch/powerpc/include/asm/dcr-regs.h drivers/net/ibm_newemac/core.h
Diffstat (limited to 'arch/powerpc/include/asm/sections.h')
-rw-r--r--arch/powerpc/include/asm/sections.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h
index baf318aec533..6fbce725c710 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 <linux/elf.h>
+#include <linux/uaccess.h>
#include <asm-generic/sections.h>
#ifdef __powerpc64__
@@ -23,7 +25,15 @@ static inline int overlaps_kernel_text(unsigned long start, unsigned long end)
}
#undef dereference_function_descriptor
-void *dereference_function_descriptor(void *);
+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