diff options
Diffstat (limited to 'arch/powerpc/include/asm/sections.h')
-rw-r--r-- | arch/powerpc/include/asm/sections.h | 22 |
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 @@ | |||
1 | #ifndef _ASM_POWERPC_SECTIONS_H | ||
2 | #define _ASM_POWERPC_SECTIONS_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | #include <asm-generic/sections.h> | ||
6 | |||
7 | #ifdef __powerpc64__ | ||
8 | |||
9 | extern char _end[]; | ||
10 | |||
11 | static inline int in_kernel_text(unsigned long addr) | ||
12 | { | ||
13 | if (addr >= (unsigned long)_stext && addr < (unsigned long)__init_end) | ||
14 | return 1; | ||
15 | |||
16 | return 0; | ||
17 | } | ||
18 | |||
19 | #endif | ||
20 | |||
21 | #endif /* __KERNEL__ */ | ||
22 | #endif /* _ASM_POWERPC_SECTIONS_H */ | ||