[PATCH v3 05/25] arm64: context switch POR_EL0 register
Mark Brown
broonie at kernel.org
Sat Nov 25 04:02:49 PST 2023
On Fri, Nov 24, 2023 at 04:34:50PM +0000, Joey Gouly wrote:
> +static void flush_poe(void)
> +{
> + if (system_supports_poe())
> + write_sysreg_s(POR_EL0_INIT, SYS_POR_EL0);
> +}
Here we have no isb()...
> +static void permission_overlay_switch(struct task_struct *next)
> +{
> + if (system_supports_poe()) {
> + current->thread.por_el0 = read_sysreg_s(SYS_POR_EL0);
> + if (current->thread.por_el0 != next->thread.por_el0) {
> + write_sysreg_s(next->thread.por_el0, SYS_POR_EL0);
> + isb();
> + }
> + }
> +}
...but here we do, I'd expect them to be consistent.
If the barrier is needed it'd probably be helpful to have a comment
explaining why we need it before the ERET.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20231125/4fc56d7e/attachment.sig>
More information about the linux-arm-kernel
mailing list