http://defect.opensolaris.org/bz/show_bug.cgi?id=4270
Summary: system panics when idle_cpu_no_deep_c and cpu_deep_idle
are both set
Classification: Development
Product: power-mgmt
Version: unspecified
Platform: Other
OS/Version: Solaris
Status: NEW
Severity: minor
Priority: P2
Component: c-state
AssignedTo: bill.holler at sun.com
ReportedBy: bill.holler at sun.com
CC: tesla-dev at opensolaris.org
Estimated Hours: 0.0
The system panics late in boot when kernel variable idle_cpu_no_deep_c
is set to disable deep C-States and cpu_deep_idle is set in /etc/power.conf.
The system will also panic when pmconfig is run if cpu_deep_idle is later
added into /etc/power.conf after booting with idle_cpu_no_deep_c set.
cpu_deep_idle_callb() is called for each cpu_deep_idle setting in
power.conf when pmconfig runs. cpu_deep_idle_callb() is confused because
state was not fully set up due to C-State support not being initialized in
cpudrv_mach_pm_init(). cpu_deep_idle_callb() returns failure.
The PM framework eventually panics due to the callback returning failure.
A fix is to not install the callb handlers when the system does not
support C-States.
-bash-3.2$ hg pdiff
Enter passphrase for key '/home/bholler/.ssh/id_dsa':
diff -r abeb69a6eb20 usr/src/uts/i86pc/io/cpudrv/cpu_idle.c
--- a/usr/src/uts/i86pc/io/cpudrv/cpu_idle.c Fri Oct 24 17:35:01 2008 -0700
+++ b/usr/src/uts/i86pc/io/cpudrv/cpu_idle.c Mon Oct 27 13:14:33 2008 -0700
@@ -716,14 +716,16 @@
cpudrv_alloc_cstate_domain(cpudsp);
- mutex_enter(&cpu_idle_callb_mutex);
- if (cpu_deep_idle_callb_id == (callb_id_t)0)
- cpu_deep_idle_callb_id = callb_add(&cpu_deep_idle_callb,
- (void *)NULL, CB_CL_CPU_DEEP_IDLE, "cpu_deep_idle");
- if (cpu_idle_cpr_callb_id == (callb_id_t)0)
- cpu_idle_cpr_callb_id = callb_add(&cpu_idle_cpr_callb,
- (void *)NULL, CB_CL_CPR_PM, "cpu_idle_cpr");
- mutex_exit(&cpu_idle_callb_mutex);
+ if (cpu_deep_cstates_supported()) {
+ mutex_enter(&cpu_idle_callb_mutex);
+ if (cpu_deep_idle_callb_id == (callb_id_t)0)
+ cpu_deep_idle_callb_id =
callb_add(&cpu_deep_idle_callb,
+ (void *)NULL, CB_CL_CPU_DEEP_IDLE,
"cpu_deep_idle");
+ if (cpu_idle_cpr_callb_id == (callb_id_t)0)
+ cpu_idle_cpr_callb_id = callb_add(&cpu_idle_cpr_callb,
+ (void *)NULL, CB_CL_CPR_PM, "cpu_idle_cpr");
+ mutex_exit(&cpu_idle_callb_mutex);
+ }
return (0);
}
@@ -761,10 +763,14 @@
cpu_acpi_free_cstate_data(handle);
mutex_enter(&cpu_idle_callb_mutex);
- if (cpu_deep_idle_callb_id != (callb_id_t)0)
+ if (cpu_deep_idle_callb_id != (callb_id_t)0) {
(void)callb_delete(cpu_deep_idle_callb_id);
- if (cpu_idle_cpr_callb_id != (callb_id_t)0)
+ cpu_deep_idle_callb_id = (callb_id_t)0;
+ }
+ if (cpu_idle_cpr_callb_id != (callb_id_t)0) {
(void)callb_delete(cpu_idle_cpr_callb_id);
+ cpu_idle_cpr_callb_id = (callb_id_t)0;
+ }
mutex_exit(&cpu_idle_callb_mutex);
}
--
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.