recent FreeBSD 13.0-CURRENT has fans screaming again on PowerMac quad

Mark Millard marklmi at yahoo.com
Fri Jun 19 22:58:18 UTC 2020



On 2020-Jun-19, at 07:34, Justin Hibbits <chmeeedalf at gmail.com> wrote:

>> . . .
> 
> If it's SMP timebase sync related, the problem actually looks
> relatively easy to solve, at least for G4 and PowerMac11,2 G5's
> (PowerMac7,3 looks trickier), from examining the Linux source and the
> OFW device tree.  The PowerMac11,2 (which the Quad is), and the G4s,
> use a GPIO to disable and enable the timebase, so a very similar thing
> can be done with the powermac platform driver as is done with the
> mpc85xx platform driver, which effectively is:
> 
>  All CPUs rendezvous in the smp_timebase_sync() function
>  BSP disables timebase, sets the timebase sync to non-zero
>  APs check for non-zero timebase, set their timebases to it
>  All CPUs rendezvous at the end
>  BSP re-enables timebase, and unleashes CPUs
> 
> A couple hours of work for someone with the hardware, I'd say.  I can
> probably provide a patch to be tested by someone in the next few days,
> if someone else doesn't get around to it first.
> 

I look forward to seeing how some of the 4 uses
of platform_smp_timebase_sync ends up being
adjusted/replaced/removed/... :

static void cpu_mp_unleash(void *dummy) does: platform_smp_timebase_sync(ap_timebase, 0)
       void machdep_ap_bootstrap(void)  does: platform_smp_timebase_sync(ap_timebase, 1)
       void cpu_sleep()                 does: platform_smp_timebase_sync(timebase, 0)
       void cpudep_ap_setup()           does: platform_smp_timebase_sync(0, 1)

(That last has a comment reporting: /* The following is needed for restoring from sleep. */)

Hopefully I'll learn some of what I did not figure out
in other respects as well.


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-ppc mailing list