[Bug 233693] [PowerPC64] Powerd unable to change cpu frequency
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Dec 1 17:09:41 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233693
--- Comment #4 from Conrad Meyer <cem at freebsd.org> ---
Wait, aren't we indicing pstate_ids twice? Is the right fix something like
this:
--- a/sys/powerpc/cpufreq/pmcr.c
+++ b/sys/powerpc/cpufreq/pmcr.c
@@ -189,13 +189,13 @@ 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 0
+ if (set->spec[0] < 0 || set->spec[0] >= npstates)
return (EINVAL);
+#endif
- pmcr = ((long)pstate_ids[set->spec[0]] << PMCR_LOWERPS_SHIFT) &
- PMCR_LOWERPS_MASK;
- pmcr |= ((long)pstate_ids[set->spec[0]] << PMCR_UPPERPS_SHIFT) &
- PMCR_UPPERPS_MASK;
+ pmcr = ((long)set->spec[0] << PMCR_LOWERPS_SHIFT) & PMCR_LOWERPS_MASK;
+ pmcr |= ((long)set->spec[0] << PMCR_UPPERPS_SHIFT) & PMCR_UPPERPS_MASK;
Given that spec[0] was assigned:
176 sets[i].spec[0] = pstate_ids[i];
in pmcr_settings?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ppc
mailing list