diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-05-16 15:21:13 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-05-16 15:21:13 +0000 |
commit | 2f3db6c19db76e7ee197d4431d9d8b7c786c55cd (patch) | |
tree | 7eb6cb4238dbac69dc86990a9bd3402de4d3a445 /sys/powerpc/cpufreq | |
parent | 95e9f935c778d480ae3972c330bd79608917f78e (diff) | |
download | FreeBSD-src-2f3db6c19db76e7ee197d4431d9d8b7c786c55cd.zip FreeBSD-src-2f3db6c19db76e7ee197d4431d9d8b7c786c55cd.tar.gz |
On SMP G5 systems, sometimes the power-mode-data property is only found
on CPU 0, so look there if it is not otherwise available.
Diffstat (limited to 'sys/powerpc/cpufreq')
-rw-r--r-- | sys/powerpc/cpufreq/pcr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/powerpc/cpufreq/pcr.c b/sys/powerpc/cpufreq/pcr.c index 5dacaaa..08e9a33 100644 --- a/sys/powerpc/cpufreq/pcr.c +++ b/sys/powerpc/cpufreq/pcr.c @@ -202,6 +202,11 @@ pcr_attach(device_t dev) return (ENXIO); } + if (OF_getproplen(cpu, "power-mode-data") <= 0) { + /* Use the first CPU's node */ + cpu = OF_child(OF_parent(cpu)); + } + /* * Collect the PCR values for each mode from the device tree. * These include bus timing information, and so cannot be |