- Certain pic_assign_cpu, e.g. msi_assign_cpu can have quite a long call chain. For msi_assign_cpu, mutex makes complex PCI bridge drivers more tricky, e.g. sleep can not be used, etc; it will be too tricky for upcoming Hyper-V PCI bridge driver for PCI pass-through.
- It is not used on any hot code path nor non-sleepable context, so sx should have the same effect as mutex.
Details
Details
Tested-by: Dexuan Cui <decui microsoft com> w/ WIP PCI bridge driver for Hyper-V PCI pass-through.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
My worry is that this has a negative impact on suspend/resume. (In general suspend/resume can't sleep).) One option perhaps would be to split the lock into a mutex protecting list of PICs (that is what suspend/resume needs) and the intr_table_lock would only protect interrupt_sources[].
Comment Actions
Split intr_table_lock into two. One for intr sources, which is now sx. One for PIC, which stays mutex. Suggested-by: jhb