Page MenuHomeFreeBSD

intrng: intr_isrc_dispatch() return stray count instead of condition
AcceptedPublic

Authored by ehem_freebsd_m5p.com on Jun 19 2022, 2:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 7:31 AM
Unknown Object (File)
Dec 20 2023, 5:54 PM
Unknown Object (File)
Dec 20 2023, 7:41 AM
Unknown Object (File)
Dec 11 2023, 4:24 AM
Unknown Object (File)
Dec 5 2023, 12:25 AM
Unknown Object (File)
Sep 5 2023, 11:56 PM
Unknown Object (File)
Aug 20 2023, 4:08 PM
Unknown Object (File)
Aug 17 2023, 1:49 PM

Details

Reviewers
markj
mmel
Summary

Other platforms limit the number of times a given stray interrupt is
reported. Since the only error returned by intr_isrc_dispatch() is for
stray interrupts, returning the count instead makes sense.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46044
Build 42933: arc lint + arc unit

Event Timeline

Instead switch to returning stray count. This allows limiting the stray count reports (x86 and PPC report a maximum of 5). Seems a more useful return value (all callers compare with 0).

ehem_freebsd_m5p.com retitled this revision from intrng: return EIO on stray interrupts, not EINVAL to intrng: intr_isrc_dispatch() return stray count instead of condition.Jun 20 2022, 1:49 AM
ehem_freebsd_m5p.com edited the summary of this revision. (Show Details)
sys/kern/subr_intr.c
236

Do you mean to return the post-increment value?

That would be an issue, so now adjusted. As I imagine you've noticed, I've got vague hopes of making intr_isrc_dispatch() and
intr_execute_handlers() match.

This revision is now accepted and ready to land.Jun 21 2022, 6:33 PM
emaste added inline comments.
sys/kern/subr_intr.c
363

maybe mention meaning of return value in comment?