Page MenuHomeFreeBSD

acpi_battery: Convert driver to CTLFLAG_MPSAFE
Needs ReviewPublic

Authored by guest-seuros on Jan 9 2026, 3:22 PM.
Tags
None
Referenced Files
F151392922: D54617.id169388.diff
Wed, Apr 8, 3:04 AM
Unknown Object (File)
Sun, Apr 5, 2:58 PM
Unknown Object (File)
Sat, Apr 4, 10:47 PM
Unknown Object (File)
Wed, Mar 18, 6:07 AM
Unknown Object (File)
Fri, Mar 13, 5:46 AM
Unknown Object (File)
Mar 1 2026, 4:28 PM
Unknown Object (File)
Feb 19 2026, 8:01 AM
Unknown Object (File)
Jan 30 2026, 8:47 PM
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().