Skip to content
Commit f660fe0b authored by Andre Przywara's avatar Andre Przywara Committed by Tom Rini
Browse files

armv8: Simplify switch_el macro



The switch_el macro is a neat contraption to handle cases where we need
different code depending on the current exception level, but its
implementation was longer than needed.

Simplify it by doing just one comparison, then using the different
condition codes to branch to the desired target. PState.CurrentEL just
holds two bits, and since we don't care about EL0, we can use >, =, < to
select EL3, EL2 and EL1, respectively.

Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
parent 7ab2e47d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment