Page MenuHomeFreeBSD

arm64: Have a common call to userret
ClosedPublic

Authored by andrew on Feb 11 2026, 6:13 PM.
Tags
None
Referenced Files
F167662820: D55250.id173814.diff
Sun, Aug 23, 3:30 PM
F167653412: D55250.id173806.diff
Sun, Aug 23, 1:24 PM
F167582046: D55250.id173200.diff
Sat, Aug 22, 9:03 PM
F167571556: D55250.id171772.diff
Sat, Aug 22, 6:45 PM
Unknown Object (File)
Thu, Aug 20, 6:56 PM
Unknown Object (File)
Thu, Aug 20, 6:21 PM
Unknown Object (File)
Thu, Aug 20, 1:11 PM
Unknown Object (File)
Thu, Aug 20, 1:04 PM
Subscribers

Details

Summary

Rather than each exception calling userret use a common copy. As
syscallret already calls userret we need to skip it in that case.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71453
Build 68336: arc lint + arc unit

Event Timeline

IMHO the control flow could be made less confusing. Right now it is 'break' -> userret, and in one place it is goto no_userret. I suggest to add a control variable like 'use_userret', set to true, assigned from svc_handler() return value. Then instead of goto no userret. check the value of use_userret around userret() call. Hope it is understandable.

This revision is now accepted and ready to land.Feb 12 2026, 6:37 AM

Set a variable to check if we need to skip userret

This revision now requires review to proceed.Mar 5 2026, 3:42 PM
sys/arm64/arm64/trap.c
700

Should this be false?

Fix the initial value of skip_userret

Remove userret from EXCP_MOE. Was missed in a rebase.

This revision is now accepted and ready to land.Mar 17 2026, 2:30 PM
This revision was automatically updated to reflect the committed changes.