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)
Wed, Apr 10, 3:18 AM
Unknown Object (File)
Sun, Apr 7, 12:10 AM
Unknown Object (File)
Feb 27 2024, 2:15 AM
Unknown Object (File)
Dec 28 2023, 8:20 PM
Unknown Object (File)
Dec 20 2023, 7:59 AM
Unknown Object (File)
Dec 12 2023, 9:47 AM
Unknown Object (File)
Nov 27 2023, 7:36 AM
Unknown Object (File)
Nov 5 2023, 10:18 PM
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 14269
Build 14429: 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.