freebsd-nq/sys/powerpc/cpufreq
Conrad Meyer d86e0b338f pmcr: Fix pstate setting on Power8
Fix p-state setting on Power8 by removing the accidental double-indirection of
the pstate_ids table.

The pstate_ids table comes from the OF property "ibm,pstate-ids."  On Power9,
the values happen to be identical to the indices, so the extra indirection was
harmless.  On Power8, the values were out of the range [0, npstates], so
pmcr_set() would fail the spec[0] range check with EINVAL.

While here, include both the value and index in the driver-specific register
array as spec[0] and spec[1] respectively.  They're redundant, but relatively
harmless, and it may aid debugging.

While here, fix the range check to exclude the index npstates, which is one
past the last valid index.

PR:		233693
Reported and tested by:	sbruno
Reviewed by:	jhibbits
2018-12-01 21:37:47 +00:00
..
dfs.c
mpc85xx_jog.c [ofw] fix errneous checks for OF_finddevice(9) return value 2018-03-20 00:03:49 +00:00
pcr.c
pmcr.c pmcr: Fix pstate setting on Power8 2018-12-01 21:37:47 +00:00
pmufreq.c