WIP FPC-III support
[linux/fpc-iii.git] / arch / x86 / include / asm / sections.h
bloba6e8373a5170f8d226350c7eb0459b2f8581bf2f
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_SECTIONS_H
3 #define _ASM_X86_SECTIONS_H
5 #define arch_is_kernel_initmem_freed arch_is_kernel_initmem_freed
7 #include <asm-generic/sections.h>
8 #include <asm/extable.h>
10 extern char __brk_base[], __brk_limit[];
11 extern char __end_rodata_aligned[];
13 #if defined(CONFIG_X86_64)
14 extern char __end_rodata_hpage_align[];
15 #endif
17 extern char __end_of_kernel_reserve[];
19 extern unsigned long _brk_start, _brk_end;
21 static inline bool arch_is_kernel_initmem_freed(unsigned long addr)
24 * If _brk_start has not been cleared, brk allocation is incomplete,
25 * and we can not make assumptions about its use.
27 if (_brk_start)
28 return 0;
31 * After brk allocation is complete, space between _brk_end and _end
32 * is available for allocation.
34 return addr >= _brk_end && addr < (unsigned long)&_end;
37 #endif /* _ASM_X86_SECTIONS_H */