Page MenuHomeFreeBSD

sound: Retire pcm_veto_load
ClosedPublic

Authored by christos on Oct 25 2024, 12:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 16, 6:20 AM
Unknown Object (File)
Mon, Oct 13, 3:43 AM
Unknown Object (File)
Sun, Oct 5, 12:47 AM
Unknown Object (File)
Sat, Sep 20, 1:20 PM
Unknown Object (File)
Sep 15 2025, 9:31 PM
Unknown Object (File)
Sep 13 2025, 11:29 AM
Unknown Object (File)
Sep 11 2025, 9:14 PM
Unknown Object (File)
Sep 11 2025, 8:29 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.