[Bug 233693] [PowerPC64] Powerd unable to change cpu frequency
| Newsgroups | gmane.os.freebsd.devel.ppc |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233693 --- Comment #4 from Conrad Meyer <[email protected]> --- 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. _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ppc To unsubscribe, send any mail to "[email protected]"