Page MenuHomeFreeBSD

[PowerPC] De-giant powermac_nvram, update documentation
ClosedPublic

Authored by bdragon on May 11 2020, 8:55 PM.

Details

Summary
  • Remove the giant lock requirement from powermac_nvram.
  • Update manual pages to reflect current state.

(Currently tested on G4 powerbook)

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sys/dev/powermac_nvram/powermac_nvram.c
277 ↗(On Diff #71657)

I'm not really a fan of the way this just ignores the requested position. If we were to honor uio_offset instead, we could avoid locking here.

I guess in practice this driver is exclusive access to start with in any case, as it stores a copy of the nvram in the sc while the device is open, so it doesn't *really* matter.

sys/dev/powermac_nvram/powermac_nvramvar.h
52 ↗(On Diff #71657)

I originally tried this with a mutex, but it turns out that uiomove() can go to sleep.

usr.sbin/nvram/nvram.8
101 ↗(On Diff #71657)

There are a couple of other manpages that reference the eeprom tool, which is gone ever since the sparc64 removal.

bcr added a subscriber: bcr.

OK from manpages.

This revision is now accepted and ready to land.Jun 15 2020, 2:22 AM