summary refs log tree commit diff
path: root/arch/riscv/mm/init.c
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2021-05-14 17:49:08 +0800
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-05-25 22:50:51 -0700
commit50bae95e17c6dd0b7a2a3a92ad8808067234e9ef (patch)
tree765ff724c03b36cfedbdfee4882b8138c30c2ddb /arch/riscv/mm/init.c
parentf842f5ff6aafc2752580ed99ee757652c08684e7 (diff)
downloadlinux-50bae95e17c6dd0b7a2a3a92ad8808067234e9ef.tar.gz
riscv: mm: Drop redundant _sdata and _edata declaration
The _sdata/_edata is already in sections.h, drop redundant
declaration.

Also move _xiprom/_exiprom declarations at the beginning of
the file, cleanup one CONFIG_XIP_KERNEL.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/mm/init.c')
-rw-r--r--arch/riscv/mm/init.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index dab317126846..2d80088f33d5 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -33,6 +33,7 @@ unsigned long kernel_virt_addr = KERNEL_LINK_ADDR;
 EXPORT_SYMBOL(kernel_virt_addr);
 #ifdef CONFIG_XIP_KERNEL
 #define kernel_virt_addr       (*((unsigned long *)XIP_FIXUP(&kernel_virt_addr)))
+extern char _xiprom[], _exiprom[];
 #endif
 
 unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]
@@ -171,13 +172,6 @@ static void __init setup_bootmem(void)
 	memblock_allow_resize();
 }
 
-#ifdef CONFIG_XIP_KERNEL
-
-extern char _xiprom[], _exiprom[];
-extern char _sdata[], _edata[];
-
-#endif /* CONFIG_XIP_KERNEL */
-
 #ifdef CONFIG_MMU
 static struct pt_alloc_ops _pt_ops __ro_after_init;