Jon Loeliger | fbcd54b | 2005-09-17 10:39:46 -0500 | [diff] [blame] | 1 | #ifndef _ASM_POWERPC_SECTIONS_H |
| 2 | #define _ASM_POWERPC_SECTIONS_H |
Arnd Bergmann | 88ced03 | 2005-12-16 22:43:46 +0100 | [diff] [blame] | 3 | #ifdef __KERNEL__ |
Jon Loeliger | fbcd54b | 2005-09-17 10:39:46 -0500 | [diff] [blame] | 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 | |
Arnd Bergmann | 88ced03 | 2005-12-16 22:43:46 +0100 | [diff] [blame] | 21 | #endif /* __KERNEL__ */ |
Jon Loeliger | fbcd54b | 2005-09-17 10:39:46 -0500 | [diff] [blame] | 22 | #endif /* _ASM_POWERPC_SECTIONS_H */ |