From fae8662bd3cd04a7958971051214c96cbdd6ebbb Mon Sep 17 00:00:00 2001 From: nwhitehorn Date: Sun, 23 May 2010 02:16:29 +0000 Subject: [PATCH] MFC r208150: 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. git-svn-id: svn://svn.freebsd.org/base/stable/8@208426 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/powerpc/cpufreq/pcr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/powerpc/cpufreq/pcr.c b/sys/powerpc/cpufreq/pcr.c index 5dacaaae3..08e9a33aa 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 -- 2.45.0