mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-30 00:34:35 +00:00
[ACPI] correct earlier SMP deep C-states on HT patch
http://bugzilla.kernel.org/show_bug.cgi?id=5165 Change polarity of test for PLVL2_UP flag. Skip promotion/demotion code when not needed. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
4c0335526c
commit
1e48396993
1 changed files with 15 additions and 5 deletions
|
@ -278,8 +278,6 @@ static void acpi_processor_idle(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cx->usage++;
|
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG_CPU
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
/*
|
/*
|
||||||
* Check for P_LVL2_UP flag before entering C2 and above on
|
* Check for P_LVL2_UP flag before entering C2 and above on
|
||||||
|
@ -287,9 +285,12 @@ static void acpi_processor_idle(void)
|
||||||
* detection phase, to work cleanly with logical CPU hotplug.
|
* detection phase, to work cleanly with logical CPU hotplug.
|
||||||
*/
|
*/
|
||||||
if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
|
if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
|
||||||
!pr->flags.has_cst && acpi_fadt.plvl2_up)
|
!pr->flags.has_cst && !acpi_fadt.plvl2_up)
|
||||||
cx->type = ACPI_STATE_C1;
|
cx = &pr->power.states[ACPI_STATE_C1];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
cx->usage++;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sleep:
|
* Sleep:
|
||||||
* ------
|
* ------
|
||||||
|
@ -378,6 +379,15 @@ static void acpi_processor_idle(void)
|
||||||
|
|
||||||
next_state = pr->power.state;
|
next_state = pr->power.state;
|
||||||
|
|
||||||
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
|
/* Don't do promotion/demotion */
|
||||||
|
if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) &&
|
||||||
|
!pr->flags.has_cst && !acpi_fadt.plvl2_up) {
|
||||||
|
next_state = cx;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Promotion?
|
* Promotion?
|
||||||
* ----------
|
* ----------
|
||||||
|
@ -549,7 +559,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
|
||||||
* Check for P_LVL2_UP flag before entering C2 and above on
|
* Check for P_LVL2_UP flag before entering C2 and above on
|
||||||
* an SMP system.
|
* an SMP system.
|
||||||
*/
|
*/
|
||||||
if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up)
|
if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up)
|
||||||
return_VALUE(-ENODEV);
|
return_VALUE(-ENODEV);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue