Page MenuHomeFreeBSD

Re-check for ast after ast handler
ClosedPublic

Authored by kib on Sep 14 2015, 10:23 PM.
Tags
Referenced Files
Unknown Object (File)
Jan 23 2024, 8:43 PM
Unknown Object (File)
Jan 19 2024, 1:25 PM
Unknown Object (File)
Dec 20 2023, 12:52 AM
Unknown Object (File)
Sep 10 2023, 1:15 PM
Unknown Object (File)
Aug 27 2023, 2:46 PM
Unknown Object (File)
Aug 13 2023, 6:44 AM
Unknown Object (File)
Jun 19 2023, 7:35 AM
Unknown Object (File)
May 26 2023, 4:44 AM
Subscribers

Details

Summary

MD code must recheck for new ast scheduled after the existing ast was handled. It seems that the branch was missed as result of typo, the code is correctly structured to reenter the loop.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib retitled this revision from to Re-check for ast after ast handler.
kib updated this object.
kib edited the test plan for this revision. (Show Details)
kib added a reviewer: andrew.
kib set the repository for this revision to rS FreeBSD src repository - subversion.
kib added a project: arm64.
  • Seems like it ought to have a comment
  • Lines 123-125 are the same as 101-103, no?

Indeed, it seems that placing the 1: label earlier would allow to remove the daif read duplication.

Remove duplication; add comment.

sys/arm64/arm64/exception.S
101 ↗(On Diff #8809)

I think you could move this to the daifset instruction below. Unless there is a case where interrupts are left dis/enabled after calling ast this shouldn't change.

Along with this the restore interrupts code below can also be removed, the next instruction after do_ast disables interrupts as we will be modifying x18, which may be in an inconsistent state.

sys/arm64/arm64/exception.S
101 ↗(On Diff #8809)

I moved the '1' label to msr instruction. x19 is callee-saved.

Do you propose to not restore the the interrupts state around the call to ast ? If yes, I do not think this is correct. Ast handling should be done with interrupts enabled. This way, I even think that we should not restore the interrupts, but explicitely enable them. But the patch is probably fine for now.

Updates after last comment.

andrew edited edge metadata.
This revision is now accepted and ready to land.Sep 22 2015, 2:41 PM
This revision was automatically updated to reflect the committed changes.