http://defect.opensolaris.org/bz/show_bug.cgi?id=6601


Mark Haywood <mark.haywood at sun.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |CAUSEKNOWN




--- Comment #1 from Mark Haywood <mark.haywood at sun.com>  2009-02-12 10:57:23 
---
The V1280 does not support CPU PM. The call to get the speeds via the
CPUDRV_GET_SPEEDS macro will fail and set nspeeds to zero.

CPUDRV_GET_SPEEDS(cpudsp, speeds, nspeeds) { \
        if (ddi_prop_lookup_int_array(DDI_DEV_T_ANY, cpudsp->dip, \
            DDI_PROP_DONTPASS, "clock-divisors", &speeds, \
            &nspeeds) != DDI_PROP_SUCCESS) { \
                nspeeds = 0; \
                DPRINTF(D_PM_INIT, ("cpudrv_init: instance %d: " \
                    "clock-divisors property not defined\n", \
                    ddi_get_instance(cpudsp->dip))); \
        } \
}

Unfortunately, the CPUDRV_FREE_SPEEDS macro does not take into account this
failure case and just goes ahead and frees the speeds:

#define CPUDRV_FREE_SPEEDS(speeds, unused) ddi_prop_free(speeds);

The the fix is simple, only free speeds if nspeeds is greater than zero:

#define CPUDRV_FREE_SPEEDS(speeds, nspeeds) { \
        if (nspeeds > 0) \
                ddi_prop_free(speeds); \
}

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Reply via email to