mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-08 15:48:23 +00:00
ARM: 8168/1: extend __init_end to a page align address
This patch changes the __init_end address to a page align address, so that free_initmem() can free the whole .init section, because if the end address is not page aligned, it will round down to a page align address, then the tail unligned page will not be freed. Signed-off-by: wang <yalin.wang2010@gmail.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
e16343c47e
commit
562c85cadb
3 changed files with 4 additions and 2 deletions
|
@ -219,8 +219,8 @@ SECTIONS
|
||||||
__data_loc = ALIGN(4); /* location in binary */
|
__data_loc = ALIGN(4); /* location in binary */
|
||||||
. = PAGE_OFFSET + TEXT_OFFSET;
|
. = PAGE_OFFSET + TEXT_OFFSET;
|
||||||
#else
|
#else
|
||||||
__init_end = .;
|
|
||||||
. = ALIGN(THREAD_SIZE);
|
. = ALIGN(THREAD_SIZE);
|
||||||
|
__init_end = .;
|
||||||
__data_loc = .;
|
__data_loc = .;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -97,9 +97,9 @@ SECTIONS
|
||||||
|
|
||||||
PERCPU_SECTION(64)
|
PERCPU_SECTION(64)
|
||||||
|
|
||||||
|
. = ALIGN(PAGE_SIZE);
|
||||||
__init_end = .;
|
__init_end = .;
|
||||||
|
|
||||||
. = ALIGN(PAGE_SIZE);
|
|
||||||
_data = .;
|
_data = .;
|
||||||
_sdata = .;
|
_sdata = .;
|
||||||
RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE)
|
RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE)
|
||||||
|
|
|
@ -40,6 +40,8 @@
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* [__init_begin, __init_end] is the init section that may be freed after init
|
* [__init_begin, __init_end] is the init section that may be freed after init
|
||||||
|
* // __init_begin and __init_end should be page aligned, so that we can
|
||||||
|
* // free the whole .init memory
|
||||||
* [_stext, _etext] is the text section
|
* [_stext, _etext] is the text section
|
||||||
* [_sdata, _edata] is the data section
|
* [_sdata, _edata] is the data section
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue