[Bug 233693] [PowerPC64] Powerd unable to change cpu frequency

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Dec 1 17:02:40 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233693

Conrad Meyer <cem at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|bugs at FreeBSD.org            |powerpc at FreeBSD.org
                 CC|                            |cem at freebsd.org

--- Comment #2 from Conrad Meyer <cem at freebsd.org> ---
It doesn't fix this issue, but I suspect there is an off-by-one bug in
pmcr_set():

--- a/sys/powerpc/cpufreq/pmcr.c
+++ b/sys/powerpc/cpufreq/pmcr.c
@@ -189,7 +190,7 @@ pmcr_set(device_t dev, const struct cf_setting *set)
        if (set == NULL)
                return (EINVAL);

-       if (set->spec[0] < 0 || set->spec[0] > npstates)
+       if (set->spec[0] < 0 || set->spec[0] >= npstates)
                return (EINVAL);

        pmcr = ((long)pstate_ids[set->spec[0]] << PMCR_LOWERPS_SHIFT) &

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ppc mailing list