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
[];
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.
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 */