Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 2020 15:58:09 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Justin Hibbits <chmeeedalf@gmail.com>
Cc:        Michael Tuexen <tuexen@freebsd.org>, freebsd-ppc <freebsd-ppc@freebsd.org>
Subject:   Re: recent FreeBSD 13.0-CURRENT has fans screaming again on PowerMac quad
Message-ID:  <83F454AC-463D-4FC5-9CBE-C6166F5A9651@yahoo.com>
In-Reply-To: <20200619093447.469d669c@titan.knownspace>
References:  <250e4677-c442-3b41-5796-6b79b07ac12c@blastwave.org> <1692AB48-2438-4B4B-82BB-F8BAEF04B459@freebsd.org> <20200619093447.469d669c@titan.knownspace>

next in thread | previous in thread | raw e-mail | index | archive | help


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

>> . . .
>=20
> 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:
>=20
>  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
>=20
> 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.
>=20

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.


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?83F454AC-463D-4FC5-9CBE-C6166F5A9651>