Linux Audio

Check our new training course

Loading...
v6.2
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef _ASM_X86_SECTIONS_H
 3#define _ASM_X86_SECTIONS_H
 4
 5#define arch_is_kernel_initmem_freed arch_is_kernel_initmem_freed
 6
 7#include <asm-generic/sections.h>
 8#include <asm/extable.h>
 9
10extern char __brk_base[], __brk_limit[];
11extern char __end_rodata_aligned[];
12
13#if defined(CONFIG_X86_64)
14extern char __end_rodata_hpage_align[];
15#endif
16
17extern char __end_of_kernel_reserve[];
18
19extern unsigned long _brk_start, _brk_end;
20
21static inline bool arch_is_kernel_initmem_freed(unsigned long addr)
22{
23	/*
24	 * If _brk_start has not been cleared, brk allocation is incomplete,
25	 * and we can not make assumptions about its use.
26	 */
27	if (_brk_start)
28		return 0;
29
30	/*
31	 * After brk allocation is complete, space between _brk_end and _end
32	 * is available for allocation.
33	 */
34	return addr >= _brk_end && addr < (unsigned long)&_end;
35}
36
37#endif	/* _ASM_X86_SECTIONS_H */
v4.6
 
 1#ifndef _ASM_X86_SECTIONS_H
 2#define _ASM_X86_SECTIONS_H
 3
 
 
 4#include <asm-generic/sections.h>
 5#include <asm/uaccess.h>
 6
 7extern char __brk_base[], __brk_limit[];
 8extern struct exception_table_entry __stop___ex_table[];
 9
10#if defined(CONFIG_X86_64)
11extern char __end_rodata_hpage_align[];
12#endif
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
14#endif	/* _ASM_X86_SECTIONS_H */