Page MenuHomeFreeBSD

acpi_spmc(4): INVARIANTS: Do not panic on getting constraints failure
ClosedPublic

Authored by olce on May 4 2026, 8:32 PM.
Tags
None
Referenced Files
F161862628: D56812.id177402.diff
Tue, Jul 7, 12:57 PM
Unknown Object (File)
Mon, Jul 6, 1:03 AM
Unknown Object (File)
Mon, Jul 6, 12:53 AM
Unknown Object (File)
Sun, Jul 5, 8:21 PM
Unknown Object (File)
Sun, Jul 5, 8:25 AM
Unknown Object (File)
Sat, Jul 4, 7:11 AM
Unknown Object (File)
Thu, Jul 2, 10:41 AM
Unknown Object (File)
Thu, Jul 2, 7:25 AM
Subscribers

Details

Summary

Just continue without constraints checking in this case.

To this end, remove the 'constraints_populated' field from 'struct
acpi_spmc_softc' and any reference to it.

However, we introduce another boolean, 'sc->get_constraints_succeeded',
in order to check (under INVARIANTS) that acpi_spmc_get_constraints() is
called only once on success. Calling that function another time after
a success would leak memory. It would be easy to change that function
to support multiple calls (e.g., by adding a call to
acpi_spmc_free_constraints() near its start), however trying to retrieve
the constraints again simply looks like wasted time as the same results
are expected to be returned on each call.

Diff Detail

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

Event Timeline

olce requested review of this revision.May 4 2026, 8:32 PM
This revision is now accepted and ready to land.May 7 2026, 2:37 AM
This revision now requires review to proceed.May 7 2026, 8:06 PM
This revision is now accepted and ready to land.May 11 2026, 8:53 AM

Impacts of changes in earlier revisions, no real change.

This revision now requires review to proceed.May 12 2026, 1:34 PM
This revision is now accepted and ready to land.May 12 2026, 2:09 PM