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@citrix.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
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) )
{
})
/* 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); \