blob: 916018e425c4dc7112f6c0c1f49f884118d4bd0b [file] [log] [blame]
Jon Loeligerfbcd54b2005-09-17 10:39:46 -05001#ifndef _ASM_POWERPC_SECTIONS_H
2#define _ASM_POWERPC_SECTIONS_H
Arnd Bergmann88ced032005-12-16 22:43:46 +01003#ifdef __KERNEL__
Jon Loeligerfbcd54b2005-09-17 10:39:46 -05004
5#include <asm-generic/sections.h>
6
7#ifdef __powerpc64__
8
9extern char _end[];
10
11static 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 Bergmann88ced032005-12-16 22:43:46 +010021#endif /* __KERNEL__ */
Jon Loeligerfbcd54b2005-09-17 10:39:46 -050022#endif /* _ASM_POWERPC_SECTIONS_H */