On Sat, 27 Feb 2021 10:41:56 +0000 Alexandru Elisei <alexandru.elisei@xxxxxxx> wrote: > Software can use the SPSel operand to write directly to PSTATE.SP. > According to ARM DDI 0487F.b, page D1-2332, writes to PSTATE are > self-synchronizing and no ISB is needed: > > "Writes to the PSTATE fields have side-effects on various aspects of the PE > operation. All of these side-effects are guaranteed: > - Not to be visible to earlier instructions in the execution stream. > - To be visible to later instructions in the execution stream." > > Signed-off-by: Alexandru Elisei <alexandru.elisei@xxxxxxx> I am always a bit wary about *removing* barriers, but I can confirm that the ARM ARM indeed makes this guarantee above, and SP access sounds like an easy enough case, so: Reviewed-by: Andre Przywara <andre.przywara@xxxxxxx> Cheers, Andre > --- > arm/cstart64.S | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arm/cstart64.S b/arm/cstart64.S > index 0428014aa58a..fc1930bcdb53 100644 > --- a/arm/cstart64.S > +++ b/arm/cstart64.S > @@ -54,7 +54,6 @@ start: > /* set up stack */ > mov x4, #1 > msr spsel, x4 > - isb > adrp x4, stackptr > add sp, x4, :lo12:stackptr >