Page MenuHomeFreeBSD

Implement bhnd(4) platform device registration.
ClosedPublic

Authored by landonf on Sep 16 2017, 4:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 30, 12:05 AM
Unknown Object (File)
Tue, Apr 30, 12:03 AM
Unknown Object (File)
Mon, Apr 29, 12:06 PM
Unknown Object (File)
Tue, Apr 23, 5:57 AM
Unknown Object (File)
Tue, Apr 23, 5:31 AM
Unknown Object (File)
Tue, Apr 23, 5:29 AM
Unknown Object (File)
Tue, Apr 23, 5:29 AM
Unknown Object (File)
Tue, Apr 23, 5:23 AM
Subscribers
None

Details

Summary

Add bhnd(4) API for explicitly registering BHND platform devices with the bus, rather than walking the newbus hierarchy to discover platform devices (ChipCommon, PMU, NVRAM, etc). These devices are now also refcounted; attempting to deregister an actively used platform device will return EBUSY.

This resolves a lock ordering issue with bwn(4)'s firmware loading threads; previously it was necessary to acquire Giant to protect newbus access when locating and querying the NVRAM device.

Test Plan

Tested for regressions against both Broadcom MIPS SoCs and Wi-Fi chipsets.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 11769
Build 12113: arc lint + arc unit

Event Timeline

Adopt a non-sleepable lock for the bhnd_service_registry; this allows use of
bhnd_service_registry_retain() while holding either an unbounded or bounded
sleep lock.

This revision is now accepted and ready to land.Sep 27 2017, 1:50 AM
This revision was automatically updated to reflect the committed changes.