[PATCH v2 5/5] arm64: irqflags: use alternative branches for pseudo-NMI logic

Marc Zyngier maz at kernel.org
Thu Jan 26 00:49:38 PST 2023


On Wed, 25 Jan 2023 16:38:26 +0000,
Mark Rutland <mark.rutland at arm.com> wrote:

[...]

> +static __always_inline void __daif_local_irq_restore(unsigned long flags)
> +{
> +	barrier();
> +	write_sysreg(flags, daif);
> +	barrier();
> +}
> +
> +static __always_inline void __pmr_local_irq_restore(unsigned long flags)
> +{
> +	barrier();
> +	write_sysreg_s(flags, SYS_ICC_PMR_EL1);
> +	pmr_sync();
> +	barrier();
> +}

It would be good to at least mention why we need these compile-time
barriers which are not that explicit in the existing code. I guess
they are equivalent to the "memory" clobber in the asm sequences that
this replaces, but they don't seem to be used consistently throughout
this patch.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list