Page MenuHomeFreeBSD

Fix minor locking issues in the PowerMac Uninorth PCI driver
ClosedPublic

Authored by landonf on Jan 10 2018, 9:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 4, 11:41 AM
Unknown Object (File)
Oct 1 2024, 1:44 PM
Unknown Object (File)
Sep 28 2024, 12:39 AM
Unknown Object (File)
Sep 17 2024, 8:09 PM
Unknown Object (File)
Sep 16 2024, 2:22 AM
Unknown Object (File)
Sep 14 2024, 10:14 PM
Unknown Object (File)
Sep 4 2024, 8:55 AM
Unknown Object (File)
Aug 30 2024, 11:17 AM
Subscribers

Details

Summary
  • Call resource_int_value() once during attach, rather than within the pci_(read|write)_config() code path; this avoids taking a blocking mutex to read kenv variables.
  • Use a spin lock to protect non-atomic config space accesses (this matches the behavior of the Darwin AppleMacRiscPCI driver).
Test Plan

Tested for regressions on a PowerBook5,8.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14272
Build 14432: arc lint + arc unit

Event Timeline

  • Add mtx_assert(MA_OWNED) to uninorth_enable_config() for good measure.
jhibbits added inline comments.
sys/powerpc/powermac/uninorthvar.h
43

Match whitespace? Might be phabricator messing with it, but just double check.

This revision is now accepted and ready to land.Jan 10 2018, 9:41 PM
landonf added inline comments.
sys/powerpc/powermac/uninorthvar.h
43

Yeah, looks like phabricator behaving badly.

This revision was automatically updated to reflect the committed changes.
landonf marked an inline comment as done.