Page MenuHomeFreeBSD

powerpc/powermac: Constrain 'cpu_sleep()' for AIM to mpc745x
AbandonedPublic

Authored by jhibbits on Feb 25 2020, 1:58 AM.
Tags
None
Referenced Files
F81633212: D23828.id68785.diff
Fri, Apr 19, 6:56 AM
Unknown Object (File)
Feb 8 2024, 11:11 PM
Unknown Object (File)
Jan 16 2024, 11:10 AM
Unknown Object (File)
Dec 20 2023, 5:21 AM
Unknown Object (File)
Dec 17 2023, 3:19 AM
Unknown Object (File)
Dec 12 2023, 11:21 PM
Unknown Object (File)
Sep 23 2023, 10:22 PM
Unknown Object (File)
Sep 6 2023, 8:25 AM

Details

Reviewers
None
Group Reviewers
PowerPC
Summary

Rename cpu_sleep() to mpc745x_sleep() to denote what it's actually
intended for. This function is very G4-specific, and will not work on any other
CPU. This will afterward eliminate a platform_smp_timebase_sync() call, by
directly updating the timebase instead.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29587
Build 27448: arc lint + arc unit

Event Timeline

bdragon added inline comments.
sys/powerpc/powermac/platform_powermac.c
420

Won't this cause console spam on G3?

424

Would be a great time to document this line... I was thinking this was debug code, but as you said in irc, what it's doing is setting the ofw wakeup entry point.

sys/powerpc/powermac/platform_powermac.c
420

Currently this is only called from pmu_set_speed(), which is, to the best of my knowledge, only supported on G4 TiBooks, so there will be no spamming here.

424

Great idea. I'll add a comment.

markmi_dsl-only.net added inline comments.
sys/powerpc/powermac/platform_powermac.c
420

DEVMETHOD(cpufreq_drv_set, pmufreq_set)

and:

static int
pmufreq_set(device_t dev, const struct cf_setting *set)
{
. . .

error = pmu_set_speed(speed_sel);

. . .
}

Is this sort of code reached by, say, powerd? powerpd is running on the G5 Quad I have access to.

sys/powerpc/powermac/platform_powermac.c
420

pmufreq only attaches to g4 machines that use the PMU for frequency control. Your g5 is unaffected.