Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1c98297 authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Will Deacon
Browse files

arm64: use PC-relative reference for secondary_holding_pen_release



Replace the confusing virtual/physical address arithmetic with a simple
PC-relative reference.

Tested-by: default avatarMark Rutland <mark.rutland@arm.com>
Reviewed-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent a871d354
Loading
Loading
Loading
Loading
+1 −8
Original line number Original line Diff line number Diff line
@@ -564,10 +564,6 @@ ENTRY(__boot_cpu_mode)
	.popsection
	.popsection


#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
	.align	3
1:	.quad	.
	.quad	secondary_holding_pen_release

	/*
	/*
	 * This provides a "holding pen" for platforms to hold all secondary
	 * This provides a "holding pen" for platforms to hold all secondary
	 * cores are held until we're ready for them to initialise.
	 * cores are held until we're ready for them to initialise.
@@ -579,10 +575,7 @@ ENTRY(secondary_holding_pen)
	mrs	x0, mpidr_el1
	mrs	x0, mpidr_el1
	ldr     x1, =MPIDR_HWID_BITMASK
	ldr     x1, =MPIDR_HWID_BITMASK
	and	x0, x0, x1
	and	x0, x0, x1
	adr	x1, 1b
	adr_l	x3, secondary_holding_pen_release
	ldp	x2, x3, [x1]
	sub	x1, x1, x2
	add	x3, x3, x1
pen:	ldr	x4, [x3]
pen:	ldr	x4, [x3]
	cmp	x4, x0
	cmp	x4, x0
	b.eq	secondary_startup
	b.eq	secondary_startup