[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen: Drop the (almost) unused extern start[]
commit 9380f06fe82fe1886a8ae468d22b901bd6c4d3d5 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue Jul 25 16:32:35 2023 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Wed Jul 26 10:56:27 2023 +0100 xen: Drop the (almost) unused extern start[] This global variable is shadowed by plenty local variables, violating MISRA rule 5.3. Some architectures happen to have a symbol by the name of start in their head.S's, but it's not a useful symbol to reference from C. In fact, the single use of the global start[] in RISC-V means to use _start[] as the linker symbol at the beginning of the .text section, not the function which happens to be in the same location. Fix RISC-V to use the right symbol for it's calculation, and drop the extern. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> Reviewed-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> --- xen/arch/riscv/mm.c | 2 +- xen/include/xen/kernel.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/riscv/mm.c b/xen/arch/riscv/mm.c index fddb3cd0bd..99ed5e9623 100644 --- a/xen/arch/riscv/mm.c +++ b/xen/arch/riscv/mm.c @@ -148,7 +148,7 @@ static bool __init check_pgtbl_mode_support(struct mmu_desc *mmu_desc, unsigned long aligned_load_start = load_start & level_map_mask; unsigned long aligned_page_size = XEN_PT_LEVEL_SIZE(page_table_level); - unsigned long xen_size = (unsigned long)(_end - start); + unsigned long xen_size = (unsigned long)(_end - _start); if ( (load_start + xen_size) > (aligned_load_start + aligned_page_size) ) { diff --git a/xen/include/xen/kernel.h b/xen/include/xen/kernel.h index 9ac2694dc7..46b3c9c026 100644 --- a/xen/include/xen/kernel.h +++ b/xen/include/xen/kernel.h @@ -66,7 +66,7 @@ }) /* SAF-0-safe */ -extern char _start[], _end[], start[]; +extern char _start[], _end[]; #define is_kernel(p) ({ \ char *__p = (char *)(unsigned long)(p); \ (__p >= _start) && (__p < _end); \ -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |