Page MenuHomeFreeBSD

acpi_battery: Convert driver to CTLFLAG_MPSAFE
Needs ReviewPublic

Authored by guest-seuros on Fri, Jan 9, 3:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 13, 4:31 PM
Unknown Object (File)
Mon, Jan 12, 11:03 AM
Unknown Object (File)
Mon, Jan 12, 7:08 AM
Unknown Object (File)
Sat, Jan 10, 6:49 AM
Unknown Object (File)
Sat, Jan 10, 5:19 AM
Unknown Object (File)
Sat, Jan 10, 5:09 AM
Unknown Object (File)
Sat, Jan 10, 4:01 AM
Unknown Object (File)
Sat, Jan 10, 3:00 AM
Subscribers
None

Details

Reviewers
jhb
imp
markj
Summary

Replaced CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all battery status sysctls.

The driver uses ACPI_SERIAL locks for correct synchronization and does not require Giant lock.

Test Plan

hw.acpi.battery.* were functional after the conversion.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

guest-seuros created this revision.

acpi_battery_get_battinfo() calls into the newbus layer and accesses some structures that are synchronized by the Giant lock. I think we need to at least acquire bus_topo_lock() in acpi_battery_get_battinfo().