Page MenuHomeFreeBSD

kern/intr: implement isrc_release_counters()
Needs ReviewPublic

Authored by ehem_freebsd_m5p.com on Thu, Jun 3, 11:29 PM.

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 OK
Unit
No Unit 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.