s0i3 will hang the system right now - let's disable it by default, but allow enabling it at runtime via debugfs so we can keep debugging it.
Signed-off-by: Kristen Carlson Accardi <[email protected]> --- arch/x86/platform/mrst/pmu.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/platform/mrst/pmu.c b/arch/x86/platform/mrst/pmu.c index ab26663..285ecd3 100644 --- a/arch/x86/platform/mrst/pmu.c +++ b/arch/x86/platform/mrst/pmu.c @@ -81,6 +81,7 @@ static bool s0i3_pmu_command_pending; static int graphics_is_off; static int lss_s0i3_enabled; static u32 sdhc2_sss; +static bool mrst_pmu_s0i3_enable = false; /* keep disabled till it works */ static struct mrst_device *pci_id_2_mrst_dev(u16 pci_dev_num) { @@ -140,11 +141,12 @@ int mrst_pmu_validate_cstates(struct cpuidle_device *dev) * invalidated S0i3 if: PMU is not initialized, or * CPU1 is active, or there is a still-unprocessed PMU command, or * device LSS is insufficient, or the GPU is active, + * or if it has been explicitly disabled */ if (!pmu_reg || !cpumask_equal(cpu_online_mask, cpumask_of(cpu)) || s0i3_pmu_command_pending || !lss_s0i3_enabled || - (!graphics_is_off && !graphics_is_in_d3())) - + (!graphics_is_off && !graphics_is_in_d3()) || + !mrst_pmu_s0i3_enable) dev->states[IDLE_STATE5_IS_S0I3].flags |= CPUIDLE_FLAG_IGNORE; else dev->states[IDLE_STATE5_IS_S0I3].flags &= ~CPUIDLE_FLAG_IGNORE; @@ -658,6 +660,9 @@ static int __devinit pmu_probe(struct pci_dev *pdev, /* /sys/kernel/debug/mrst_pmu */ (void) debugfs_create_file("mrst_pmu", S_IFREG | S_IRUGO, NULL, NULL, &devices_state_operations); + (void) debugfs_create_bool("mrst_pmu_s0i3_enable", + S_IFREG | S_IWUSR | S_IRUGO, NULL, + (u32 *) &mrst_pmu_s0i3_enable); #endif pmu_reg = pmu; /* success */ -- 1.7.3.1 _______________________________________________ MeeGo-kernel mailing list [email protected] http://lists.meego.com/listinfo/meego-kernel
