Skip to content

Commit

Permalink
ARCv2: entry: early return from exception need not clear U & DE bits
Browse files Browse the repository at this point in the history
Exception handlers call FAKE_RET_FROM_EXCPN to
 - clear AE bit: drop down from exception active to pure kernel mode
   allowing further excptions
 - set IE bit: re-enable interrupts

It additionally also clears U bit (user mode) and DE bit (delay slot
execution) which is redundant as hardware does that already on any taken
exception. Morevoer the current software clearing is bogus anyways as
the KFLAG instruction being used for purpose can't possibly write those
bits anyways.

So don't pretend to clear them.

Signed-off-by: Alexey Brodkin <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
[vgupta: rewrote changelog]
  • Loading branch information
abrodkin authored and vineetgarc committed Aug 5, 2019
1 parent 5f9e832 commit 97abfd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arc/include/asm/entry-arcv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@

.macro FAKE_RET_FROM_EXCPN
lr r9, [status32]
bic r9, r9, (STATUS_U_MASK|STATUS_DE_MASK|STATUS_AE_MASK)
bic r9, r9, STATUS_AE_MASK
or r9, r9, STATUS_IE_MASK
kflag r9
.endm
Expand Down

0 comments on commit 97abfd5

Please sign in to comment.