summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/sections.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-05 02:25:06 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-05 02:25:06 +0200
commit2acb802b0c5485aedb46e23b2b45e49573454c09 (patch)
tree82afbba3d073ce903cb737412b6eccdf8adab4b5 /arch/powerpc/include/asm/sections.h
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes (diff)
parentpowerpc: Remove use of CONFIG_PPC_MERGE (diff)
downloadlinux-2acb802b0c5485aedb46e23b2b45e49573454c09.tar.xz
linux-2acb802b0c5485aedb46e23b2b45e49573454c09.zip
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: powerpc: Remove use of CONFIG_PPC_MERGE powerpc: Force printing of 'total_memory' to unsigned long long powerpc: Fix compiler warning in arch/powerpc/mm/mem.c powerpc: Move include files to arch/powerpc/include/asm
Diffstat (limited to 'arch/powerpc/include/asm/sections.h')
-rw-r--r--arch/powerpc/include/asm/sections.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h
new file mode 100644
index 000000000000..916018e425c4
--- /dev/null
+++ b/arch/powerpc/include/asm/sections.h
@@ -0,0 +1,22 @@
+#ifndef _ASM_POWERPC_SECTIONS_H
+#define _ASM_POWERPC_SECTIONS_H
+#ifdef __KERNEL__
+
+#include <asm-generic/sections.h>
+
+#ifdef __powerpc64__
+
+extern char _end[];
+
+static inline int in_kernel_text(unsigned long addr)
+{
+ if (addr >= (unsigned long)_stext && addr < (unsigned long)__init_end)
+ return 1;
+
+ return 0;
+}
+
+#endif
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_POWERPC_SECTIONS_H */