Page MenuHomeFreeBSD

sound: Retire pcm_veto_load
ClosedPublic

Authored by christos on Oct 25 2024, 12:06 PM.
Tags
None
Referenced Files
F122619348: D47280.id.diff
Sun, Jul 6, 7:37 PM
Unknown Object (File)
Sat, Jul 5, 1:36 PM
Unknown Object (File)
Sat, Jul 5, 7:43 AM
Unknown Object (File)
Sat, Jul 5, 5:31 AM
Unknown Object (File)
Sat, Jul 5, 1:45 AM
Unknown Object (File)
Fri, Jul 4, 12:41 PM
Unknown Object (File)
Fri, Jul 4, 9:35 AM
Unknown Object (File)
Thu, Jul 3, 5:25 PM
Subscribers

Details

Summary

pcm_veto_load is used to prevent pcm_register() from running if the root
feeder has not been registered yet. However, feeder_register_root() is a
SYSINIT.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days

Diff Detail

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

Event Timeline

Also note that pcm_register() does not really touch the root feeder in the first place.

sys/dev/sound/pcm/feeder.c
65

Could the M_WAITOK be a problem (i.e we sleep here and pcm_register() continues normally)?

pcm_veto_load is used to prevent pcm_register() from running if the root feeder has not been registered yet. However, feeder_register_root() is a SYSINIT.

So are the functions which call pcm_register(), albeit indirectly. The point is probably to make sure that feeder_register_root() runs first. See the use of SI_ORDER_FIRST in the SYSINIT definition.

Also note that pcm_register() does not really touch the root feeder in the first place.

It doesn't, but functions like pcm_addchan(), called after pcm_register(), do.

I'd at least add a comment above the SYSINIT definition explaining why this one comes first.

This revision is now accepted and ready to land.Oct 29 2024, 12:02 AM
This revision was automatically updated to reflect the committed changes.