FreeBSD Bugzilla – Attachment 199713 Details for
Bug 233693
[PowerPC64] Powerd unable to change cpu frequency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Possible fix
ppc-pr-233693.patch (text/plain), 1.22 KB, created by
Conrad Meyer
on 2018-12-01 17:12:49 UTC
(
hide
)
Description:
Possible fix
Filename:
MIME Type:
Creator:
Conrad Meyer
Created:
2018-12-01 17:12:49 UTC
Size:
1.22 KB
patch
obsolete
>diff --git a/sys/powerpc/cpufreq/pmcr.c b/sys/powerpc/cpufreq/pmcr.c >index 03cb4cde371f..681e053444d5 100644 >--- a/sys/powerpc/cpufreq/pmcr.c >+++ b/sys/powerpc/cpufreq/pmcr.c >@@ -174,6 +174,7 @@ pmcr_settings(device_t dev, struct cf_setting *sets, int *count) > for (i = 0; i < npstates; i++) { > sets[i].freq = pstate_freqs[i]; > sets[i].spec[0] = pstate_ids[i]; >+ sets[i].spec[1] = i; > sets[i].dev = dev; > } > *count = npstates; >@@ -189,13 +190,11 @@ 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[1] < 0 || set->spec[1] >= npstates) > return (EINVAL); > >- 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; > pmcr |= PMCR_VERSION_1; > > mtspr(SPR_PMCR, pmcr); >@@ -228,6 +227,7 @@ pmcr_get(device_t dev, struct cf_setting *set) > return (EINVAL); > > set->spec[0] = pstate; >+ set->spec[1] = i; > set->freq = pstate_freqs[i]; > > set->dev = dev;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233693
:
199712
| 199713
Working