Commit ebdf44a1 authored by Mark Brown's avatar Mark Brown Committed by Catalin Marinas
Browse files

arm64: head: Annotate stext and preserve_boot_args as code



In an effort to clarify and simplify the annotation of assembly
functions new macros have been introduced. These replace ENTRY and
ENDPROC with two different annotations for normal functions and those
with unusual calling conventions.  Neither stext nor preserve_boot_args
is called with the usual AAPCS calling conventions and they should
therefore be annotated as code.

Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent c63d9f82
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -105,7 +105,7 @@ pe_header:
	 *  x24        __primary_switch() .. relocate_kernel()
	 *  x24        __primary_switch() .. relocate_kernel()
	 *                                        current RELR displacement
	 *                                        current RELR displacement
	 */
	 */
ENTRY(stext)
SYM_CODE_START(stext)
	bl	preserve_boot_args
	bl	preserve_boot_args
	bl	el2_setup			// Drop to EL1, w0=cpu_boot_mode
	bl	el2_setup			// Drop to EL1, w0=cpu_boot_mode
	adrp	x23, __PHYS_OFFSET
	adrp	x23, __PHYS_OFFSET
@@ -120,12 +120,12 @@ ENTRY(stext)
	 */
	 */
	bl	__cpu_setup			// initialise processor
	bl	__cpu_setup			// initialise processor
	b	__primary_switch
	b	__primary_switch
ENDPROC(stext)
SYM_CODE_END(stext)


/*
/*
 * Preserve the arguments passed by the bootloader in x0 .. x3
 * Preserve the arguments passed by the bootloader in x0 .. x3
 */
 */
preserve_boot_args:
SYM_CODE_START_LOCAL(preserve_boot_args)
	mov	x21, x0				// x21=FDT
	mov	x21, x0				// x21=FDT


	adr_l	x0, boot_args			// record the contents of
	adr_l	x0, boot_args			// record the contents of
@@ -137,7 +137,7 @@ preserve_boot_args:


	mov	x1, #0x20			// 4 x 8 bytes
	mov	x1, #0x20			// 4 x 8 bytes
	b	__inval_dcache_area		// tail call
	b	__inval_dcache_area		// tail call
ENDPROC(preserve_boot_args)
SYM_CODE_END(preserve_boot_args)


/*
/*
 * Macro to create a table entry to the next page.
 * Macro to create a table entry to the next page.