Date: Fri, 19 Jun 2020 18:03:21 -0500 From: Justin Hibbits <chmeeedalf@gmail.com> To: Mark Millard <marklmi@yahoo.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: <CAHSQbTDnvaBr74%2BePc5HTwvOyjbJ_pqx44Z3eNitbA9qeE%2BcrA@mail.gmail.com> In-Reply-To: <83F454AC-463D-4FC5-9CBE-C6166F5A9651@yahoo.com> References: <250e4677-c442-3b41-5796-6b79b07ac12c@blastwave.org> <1692AB48-2438-4B4B-82BB-F8BAEF04B459@freebsd.org> <20200619093447.469d669c@titan.knownspace> <83F454AC-463D-4FC5-9CBE-C6166F5A9651@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 19, 2020, 17:58 Mark Millard <marklmi@yahoo.com> wrote: > > > 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. */) > The cpu_sleep() one is covered by D23828, since that is mpc745x specific, and the cpudep_ap_setup() will likely follow that. > 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) > - Justin >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHSQbTDnvaBr74%2BePc5HTwvOyjbJ_pqx44Z3eNitbA9qeE%2BcrA>