Commit f54af50d authored by Guo Ren's avatar Guo Ren

csky: Correct position of _stext

Correct position of _stext to prevent check_kernel_text_object
warning [1].

[1] https://lore.kernel.org/linux-csky/YfLpNkmlvoR8iPcq@ls3530/Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
Cc: Helge Deller <deller@gmx.de>
parent 49a1a3cf
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_SECTIONS_H
#define __ASM_SECTIONS_H
#include <asm-generic/sections.h>
extern char _start[];
#endif /* __ASM_SECTIONS_H */
...@@ -31,7 +31,7 @@ static void __init csky_memblock_init(void) ...@@ -31,7 +31,7 @@ static void __init csky_memblock_init(void)
unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 }; unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
signed long size; signed long size;
memblock_reserve(__pa(_stext), _end - _stext); memblock_reserve(__pa(_start), _end - _start);
early_init_fdt_reserve_self(); early_init_fdt_reserve_self();
early_init_fdt_scan_reserved_mem(); early_init_fdt_scan_reserved_mem();
...@@ -78,7 +78,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -78,7 +78,7 @@ void __init setup_arch(char **cmdline_p)
pr_info("Phys. mem: %ldMB\n", pr_info("Phys. mem: %ldMB\n",
(unsigned long) memblock_phys_mem_size()/1024/1024); (unsigned long) memblock_phys_mem_size()/1024/1024);
setup_initial_init_mm(_stext, _etext, _edata, _end); setup_initial_init_mm(_start, _etext, _edata, _end);
parse_early_param(); parse_early_param();
......
...@@ -22,7 +22,7 @@ SECTIONS ...@@ -22,7 +22,7 @@ SECTIONS
{ {
. = PAGE_OFFSET + PHYS_OFFSET_OFFSET; . = PAGE_OFFSET + PHYS_OFFSET_OFFSET;
_stext = .; _start = .;
__init_begin = .; __init_begin = .;
HEAD_TEXT_SECTION HEAD_TEXT_SECTION
INIT_TEXT_SECTION(PAGE_SIZE) INIT_TEXT_SECTION(PAGE_SIZE)
...@@ -33,6 +33,7 @@ SECTIONS ...@@ -33,6 +33,7 @@ SECTIONS
.text : AT(ADDR(.text) - LOAD_OFFSET) { .text : AT(ADDR(.text) - LOAD_OFFSET) {
_text = .; _text = .;
_stext = .;
VBR_BASE VBR_BASE
IRQENTRY_TEXT IRQENTRY_TEXT
SOFTIRQENTRY_TEXT SOFTIRQENTRY_TEXT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment