[PATCH] riscv: mm: Drop redundant _sdata and _edata declaration
Kefeng Wang
wangkefeng.wang at huawei.com
Mon May 10 04:58:08 PDT 2021
The _sdata/_edata is already in sections.h, drop redundant
declaration, also move _xiprom/_exiprom close to the caller.
Signed-off-by: Kefeng Wang <wangkefeng.wang at huawei.com>
---
arch/riscv/mm/init.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 136d0342b147..4d08e1f7a362 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -176,13 +176,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;
@@ -461,6 +454,7 @@ uintptr_t load_pa, load_sz;
#endif
#ifdef CONFIG_XIP_KERNEL
+extern char _xiprom[], _exiprom[];
uintptr_t xiprom, xiprom_sz;
#define xiprom_sz (*((uintptr_t *)XIP_FIXUP(&xiprom_sz)))
#define xiprom (*((uintptr_t *)XIP_FIXUP(&xiprom)))
--
2.26.2
More information about the linux-riscv
mailing list