[PATCH] arm64: emulate aarch32 CP15 barriers if needed

Catalin Marinas catalin.marinas at arm.com
Sun Nov 10 06:25:18 EST 2013


On 10 Nov 2013, at 09:23, Ming Lei <ming.lei at canonical.com> wrote:
> CP15BEN of SCTLR_EL1 may not be implemented, so we need
> to emulate these three CP15 barriers to avoid breaking
> aarch32 applications since they can be used in user mode.
> 
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will.deacon at arm.com>
> Signed-off-by: Ming Lei <ming.lei at canonical.com>

Can you describe which aarch32 applications is this breaking?  These
barriers have been deprecated in ARMv7 and removed in ARMv8 (same as the
SWP instruction).  User space is supposed to use the kuser helpers which
provide the right barriers for the architecture.  Compiler intrinsics
for ARMv7 already generate (inline) the new ARMv7 barriers.

So for compat support, I consider this similar to other instructions we
will not emulate like SWP and certain unaligned accesses.  IOW, arm64
compat only supports non-deprecated ARMv7 features.

Catalin



More information about the linux-arm-kernel mailing list