Page MenuHomeFreeBSD

kern/intr: implement isrc_release_counters()
AbandonedPublic

Authored by ehem_freebsd_m5p.com on Jun 3 2021, 11:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 11, 6:12 AM
Unknown Object (File)
May 20 2025, 9:19 AM
Unknown Object (File)
May 15 2025, 9:38 AM
Unknown Object (File)
Mar 22 2025, 1:43 AM
Unknown Object (File)
Mar 16 2025, 6:23 AM
Unknown Object (File)
Mar 13 2025, 3:54 AM
Unknown Object (File)
Mar 12 2025, 6:29 PM
Unknown Object (File)
Feb 25 2025, 1:36 AM
Subscribers

Details

Summary

Finally get this unimplemented function implemented. Primary
observation is distinctions of IPI interrupts means their counters need
distinct handling. Use low portion of array for external interrupts
(which always have 2 counters) and high portion for IPI interrupts
(which have more).

Diff Detail

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

Event Timeline

Theory is to make intr_isrc_deregister() work in the general case. Without this (or a fixed version) isrc_release_counters() is of course a wrapper around panic(). What needs checking is I'm unsure of how the atomic_*() functions are supposed to work, I think I got their use right, but please check. Actual hardware removable interrupt sources aren't common, but software removable ones are quite common (VMs).

Careful review and looks like atomic_store_rel_int() is needed inside isrc_release_counters(). Otherwise stores could move after and that would break. The accesses in isrc_setup_counters() all depend upon "index" which is synchronized.

Obsoleted by several other bits.