HomeFreeBSD

Fix PowerMac G5 thermal management, plus likely other bugs, introduced in

Description

Fix PowerMac G5 thermal management, plus likely other bugs, introduced in
r328113 and affecting SMP systems.

The way the time is set on PowerMacs is racy and relies on all the
CPUs in the system setting a register simultaneously in a rendezvous. A
few-cycle delay can result in out-of-sync times, which can break the
scheduler and result in calls like mtx_sleep() and pause() never timing out
if the thread is migrated while sleeping. r328113 added a call to a no-op
function between the beginning of the rendezvous and setting the time that
was only called on APs and added enough cycles to cause a problematic offset.
For some reason, the fan-management code was the first place this appeared.

Clue from: andreast
Reported by: many

Details

Provenance
nwhitehornAuthored on
Parents
rS329079: tftp(1): Clean up leading and trailing whitespace
Branches
Unknown
Tags
Unknown