Commit 61331168 authored by Pavel Machek's avatar Pavel Machek Committed by Len Brown

ACPI: TSC breaks atkbd suspend

TSC is used even on machines when CONFIG_X86_TSC is not set (X86_TSC
means _require_ TSC), but it is not properly disabled when it is
unusable, because ACPI code understood the config switch as "may use
TSC".

This actually fixes suspend problems on my x60.
Signed-off-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 00e962c5
...@@ -364,7 +364,7 @@ int acpi_processor_resume(struct acpi_device * device) ...@@ -364,7 +364,7 @@ int acpi_processor_resume(struct acpi_device * device)
return 0; return 0;
} }
#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86_TSC) #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
static int tsc_halts_in_c(int state) static int tsc_halts_in_c(int state)
{ {
switch (boot_cpu_data.x86_vendor) { switch (boot_cpu_data.x86_vendor) {
...@@ -544,7 +544,7 @@ static void acpi_processor_idle(void) ...@@ -544,7 +544,7 @@ static void acpi_processor_idle(void)
/* Get end time (ticks) */ /* Get end time (ticks) */
t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86_TSC) #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
/* TSC halts in C2, so notify users */ /* TSC halts in C2, so notify users */
if (tsc_halts_in_c(ACPI_STATE_C2)) if (tsc_halts_in_c(ACPI_STATE_C2))
mark_tsc_unstable("possible TSC halt in C2"); mark_tsc_unstable("possible TSC halt in C2");
...@@ -609,7 +609,7 @@ static void acpi_processor_idle(void) ...@@ -609,7 +609,7 @@ static void acpi_processor_idle(void)
acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
} }
#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86_TSC) #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
/* TSC halts in C3, so notify users */ /* TSC halts in C3, so notify users */
if (tsc_halts_in_c(ACPI_STATE_C3)) if (tsc_halts_in_c(ACPI_STATE_C3))
mark_tsc_unstable("TSC halts in C3"); mark_tsc_unstable("TSC halts in C3");
...@@ -1500,7 +1500,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, ...@@ -1500,7 +1500,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
acpi_idle_do_entry(cx); acpi_idle_do_entry(cx);
t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86_TSC) #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
/* TSC could halt in idle, so notify users */ /* TSC could halt in idle, so notify users */
if (tsc_halts_in_c(cx->type)) if (tsc_halts_in_c(cx->type))
mark_tsc_unstable("TSC halts in idle");; mark_tsc_unstable("TSC halts in idle");;
...@@ -1614,7 +1614,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, ...@@ -1614,7 +1614,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
spin_unlock(&c3_lock); spin_unlock(&c3_lock);
} }
#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86_TSC) #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
/* TSC could halt in idle, so notify users */ /* TSC could halt in idle, so notify users */
if (tsc_halts_in_c(ACPI_STATE_C3)) if (tsc_halts_in_c(ACPI_STATE_C3))
mark_tsc_unstable("TSC halts in idle"); mark_tsc_unstable("TSC halts in idle");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment