linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: tsc breaks atkbd suspend
       [not found]     ` <alpine.LFD.1.00.0802181545090.7583@apollo.tec.linutronix.de>
@ 2008-02-19 10:00       ` Pavel Machek
  2008-02-19 14:05         ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2008-02-19 10:00 UTC (permalink / raw)
  To: Thomas Gleixner, Len Brown, Linux-pm mailing list, jbohac
  Cc: kernel list, jikos, Ingo Molnar, Rafael J. Wysocki, Andrew Morton


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: Pavel Machek <pavel@suse.cz>

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 980e1c3..6f3b217 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -364,7 +364,7 @@ int acpi_processor_resume(struct acpi_de
 	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)
 {
 	switch (boot_cpu_data.x86_vendor) {
@@ -544,7 +544,7 @@ #endif
 		/* Get end time (ticks) */
 		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 */
 		if (tsc_halts_in_c(ACPI_STATE_C2))
 			mark_tsc_unstable("possible TSC halt in C2");
@@ -609,7 +609,7 @@ #endif
 			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 */
 		if (tsc_halts_in_c(ACPI_STATE_C3))
 			mark_tsc_unstable("TSC halts in C3");
@@ -1500,7 +1500,7 @@ static int acpi_idle_enter_simple(struct
 	acpi_idle_do_entry(cx);
 	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 */
 	if (tsc_halts_in_c(cx->type))
 		mark_tsc_unstable("TSC halts in idle");;
@@ -1614,7 +1614,7 @@ static int acpi_idle_enter_bm(struct cpu
 		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 */
 	if (tsc_halts_in_c(ACPI_STATE_C3))
 		mark_tsc_unstable("TSC halts in idle");


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: tsc breaks atkbd suspend
  2008-02-19 10:00       ` tsc breaks atkbd suspend Pavel Machek
@ 2008-02-19 14:05         ` Ingo Molnar
  2008-02-19 16:51           ` Thomas Gleixner
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2008-02-19 14:05 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Thomas Gleixner, Len Brown, Linux-pm mailing list, jbohac,
	kernel list, jikos, Rafael J. Wysocki, Andrew Morton


* Pavel Machek <pavel@ucw.cz> wrote:

> 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.

ah! This makes tons of sense. I've applied your patch - but i guess it 
should go via the ACPI tree.

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: tsc breaks atkbd suspend
  2008-02-19 14:05         ` Ingo Molnar
@ 2008-02-19 16:51           ` Thomas Gleixner
  2008-02-20  0:17             ` Len Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2008-02-19 16:51 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Andrew Morton, Len Brown, jbohac, jikos, Linux-pm mailing list,
	kernel list

On Tue, 19 Feb 2008, Ingo Molnar wrote:
> * Pavel Machek <pavel@ucw.cz> wrote:
> 
> > 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.
> 
> ah! This makes tons of sense. I've applied your patch - but i guess it 
> should go via the ACPI tree.

Right. The breakage was introduced there when IA64 switched to
GENERIC_TIME and the X86_TSC dependency was added.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: tsc breaks atkbd suspend
  2008-02-19 16:51           ` Thomas Gleixner
@ 2008-02-20  0:17             ` Len Brown
  2008-02-20  6:51               ` Thomas Gleixner
  0 siblings, 1 reply; 5+ messages in thread
From: Len Brown @ 2008-02-20  0:17 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, Pavel Machek, Len Brown, Linux-pm mailing list,
	jbohac, kernel list, jikos, Rafael J. Wysocki, Andrew Morton

On Tuesday 19 February 2008 11:51, Thomas Gleixner wrote:
> On Tue, 19 Feb 2008, Ingo Molnar wrote:
> > * Pavel Machek <pavel@ucw.cz> wrote:
> > 
> > > 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.
> > 
> > ah! This makes tons of sense. I've applied your patch

please do not.

> > - but i guess it  should go via the ACPI tree.

yes.

> Right. The breakage was introduced there when IA64 switched to
> GENERIC_TIME and the X86_TSC dependency was added.

so do we need a patch for 2.6.23.stable and 2.6.24.stable?

thanks,
-Len

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: tsc breaks atkbd suspend
  2008-02-20  0:17             ` Len Brown
@ 2008-02-20  6:51               ` Thomas Gleixner
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2008-02-20  6:51 UTC (permalink / raw)
  To: Len Brown
  Cc: Ingo Molnar, Pavel Machek, Len Brown, Linux-pm mailing list,
	jbohac, kernel list, jikos, Rafael J. Wysocki, Andrew Morton

On Tue, 19 Feb 2008, Len Brown wrote:

> On Tuesday 19 February 2008 11:51, Thomas Gleixner wrote:
> > On Tue, 19 Feb 2008, Ingo Molnar wrote:
> > > * Pavel Machek <pavel@ucw.cz> wrote:
> > > 
> > > > 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.
> > > 
> > > ah! This makes tons of sense. I've applied your patch
> 
> please do not.

It's not in the -mm branch.
 
> > > - but i guess it  should go via the ACPI tree.
> 
> yes.
> 
> > Right. The breakage was introduced there when IA64 switched to
> > GENERIC_TIME and the X86_TSC dependency was added.
> 
> so do we need a patch for 2.6.23.stable and 2.6.24.stable?

Yes.

Thanks,
	tglx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-20  6:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20080218133852.GA1573@elf.ucw.cz>
     [not found] ` <alpine.LFD.1.00.0802181515070.7583@apollo.tec.linutronix.de>
     [not found]   ` <20080218143757.GB1960@elf.ucw.cz>
     [not found]     ` <alpine.LFD.1.00.0802181545090.7583@apollo.tec.linutronix.de>
2008-02-19 10:00       ` tsc breaks atkbd suspend Pavel Machek
2008-02-19 14:05         ` Ingo Molnar
2008-02-19 16:51           ` Thomas Gleixner
2008-02-20  0:17             ` Len Brown
2008-02-20  6:51               ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).