arm64: add local_daif_inherit()
authorMark Rutland <mark.rutland@arm.com>
Fri, 25 Oct 2019 16:42:12 +0000 (17:42 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 28 Oct 2019 11:22:43 +0000 (11:22 +0000)
commit51077e03b8cef2a24d6582b8c54b718fced6878c
tree7644c7010684bf47a1e93362e73ffcd6cc00827b
parente540e0a7fa1ff889e37ca9af44eb44ec3d2c8a01
arm64: add local_daif_inherit()

Some synchronous exceptions can be taken from a number of contexts,
e.g. where IRQs may or may not be masked. In the entry assembly for
these exceptions, we use the inherit_daif assembly macro to ensure
that we only mask those exceptions which were masked when the exception
was taken.

So that we can do the same from C code, this patch adds a new
local_daif_inherit() function, following the existing local_daif_*()
naming scheme.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
[moved away from local_daif_restore()]
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/daifflags.h