diff options
author | Mark Rutland <[email protected]> | 2021-08-02 15:07:31 +0100 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2021-08-05 14:06:55 +0100 |
commit | bc29b71f53b13c9e90a53a42d2431228a869b459 (patch) | |
tree | 37cd6dbc32b7f2aef0086ece02eb6aaebc329e3a /scripts/gcc-plugins | |
parent | 46a2b02d232ece64af43e9ab0b4c64a7a756e58e (diff) |
arm64: entry: clarify entry/exit helpers
When entering an exception, we must perform irq/context state management
before we can use instrumentable C code. Similarly, when exiting an
exception we cannot use instrumentable C code after we perform
irq/context state management.
Originally, we'd intended that the enter_from_*() and exit_to_*()
helpers would enforce this by virtue of being the first and last
functions called, respectively, in an exception handler. However, as
they now call instrumentable code themselves, this is not as clearly
true.
To make this more robust, this patch splits the irq/context state
management into separate helpers, with all the helpers commented to make
their intended purpose more obvious.
In exit_to_kernel_mode() we'll now check TFSR_EL1 before we assert that
IRQs are disabled, but this ordering is not important, and other than
this there should be no functional change as a result of this patch.
Signed-off-by: Mark Rutland <[email protected]>
Cc: James Morse <[email protected]>
Cc: Joey Gouly <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: Will Deacon <[email protected]>
Reviewed-by: Joey Gouly <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[[email protected]: comment typos fix-up]
Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins')
0 files changed, 0 insertions, 0 deletions