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
F159736639: D13839.id37762.diff
Wed, Jun 17, 4:47 PM
F159694238: D13839.id37757.diff
Wed, Jun 17, 3:23 AM
F159689939: D13839.id37757.diff
Wed, Jun 17, 2:49 AM
F159686957: D13839.id37762.diff
Wed, Jun 17, 2:23 AM
Unknown Object (File)
Tue, Jun 16, 10:56 AM
Unknown Object (File)
Sun, Jun 14, 7:57 PM
Unknown Object (File)
Thu, Jun 4, 8:35 PM
Unknown Object (File)
Mon, Jun 1, 4:04 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

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 ↗(On Diff #37760)

Yeah, looks like phabricator behaving badly.

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