* [patch] ACPI: Keep TSC stable, when lapic_timer_c2_ok is set
@ 2007-05-07 16:33 Thomas Gleixner
2007-05-10 8:09 ` Len Brown
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2007-05-07 16:33 UTC (permalink / raw)
To: Len Brown; +Cc: linux-acpi
Len,
can you please integrate the patch into your git tree to make Andrew
happier. I'd like to see this in 2.6.22 if possible.
Thanks,
tglx
------------------------>
Subject: ACPI: Keep TSC stable, when lapic_timer_c2_ok is set
The local apic timer stop in C2 resp. C3 states is coupled with the
stop of the TSC. When the local apic timer is marked stable in C2
on the kernel commandline, then keep the TSC marked stable in C2 as well.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/acpi/processor_idle.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
Index: linux-acpi-2.6/drivers/acpi/processor_idle.c
===================================================================
--- linux-acpi-2.6.orig/drivers/acpi/processor_idle.c
+++ linux-acpi-2.6/drivers/acpi/processor_idle.c
@@ -305,18 +305,23 @@ static void acpi_state_timer_broadcast(s
struct acpi_processor_cx *cx,
int broadcast)
{
-#ifdef CONFIG_GENERIC_CLOCKEVENTS
-
int state = cx - pr->power.states;
if (state >= pr->power.timer_broadcast_on_state) {
+
+#ifdef CONFIG_GENERIC_CLOCKEVENTS
unsigned long reason;
reason = broadcast ? CLOCK_EVT_NOTIFY_BROADCAST_ENTER :
CLOCK_EVT_NOTIFY_BROADCAST_EXIT;
clockevents_notify(reason, &pr->id);
- }
#endif
+
+#ifdef CONFIG_GENERIC_TIME
+ /* TSC halts in C2/3, so notify users */
+ mark_tsc_unstable();
+#endif
+ }
}
#else
@@ -481,10 +489,6 @@ static void acpi_processor_idle(void)
/* Get end time (ticks) */
t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
-#ifdef CONFIG_GENERIC_TIME
- /* TSC halts in C2, so notify users */
- mark_tsc_unstable();
-#endif
/* Re-enable interrupts */
local_irq_enable();
current_thread_info()->status |= TS_POLLING;
@@ -523,10 +527,6 @@ static void acpi_processor_idle(void)
acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
}
-#ifdef CONFIG_GENERIC_TIME
- /* TSC halts in C3, so notify users */
- mark_tsc_unstable();
-#endif
/* Re-enable interrupts */
local_irq_enable();
current_thread_info()->status |= TS_POLLING;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] ACPI: Keep TSC stable, when lapic_timer_c2_ok is set
2007-05-07 16:33 [patch] ACPI: Keep TSC stable, when lapic_timer_c2_ok is set Thomas Gleixner
@ 2007-05-10 8:09 ` Len Brown
2007-05-10 20:50 ` Thomas Gleixner
0 siblings, 1 reply; 3+ messages in thread
From: Len Brown @ 2007-05-10 8:09 UTC (permalink / raw)
To: tglx, Andi Kleen; +Cc: linux-acpi
On Monday 07 May 2007 12:33, Thomas Gleixner wrote:
> Len,
>
> can you please integrate the patch into your git tree to make Andrew
> happier. I'd like to see this in 2.6.22 if possible.
what tree does this apply to?
Note, however, that the assumption that the TSC and the LAPIC
timer breaking under the same conditions will not always
be true going forward.
In particular, there will be systems with a fully functional TSC
and a broken LAPIC timer. But I guess we'll cross that bridge
when we come to it...
-Len
> Thanks,
>
> tglx
>
> ------------------------>
>
> Subject: ACPI: Keep TSC stable, when lapic_timer_c2_ok is set
>
> The local apic timer stop in C2 resp. C3 states is coupled with the
> stop of the TSC. When the local apic timer is marked stable in C2
> on the kernel commandline, then keep the TSC marked stable in C2 as well.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> ---
> drivers/acpi/processor_idle.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> Index: linux-acpi-2.6/drivers/acpi/processor_idle.c
> ===================================================================
> --- linux-acpi-2.6.orig/drivers/acpi/processor_idle.c
> +++ linux-acpi-2.6/drivers/acpi/processor_idle.c
> @@ -305,18 +305,23 @@ static void acpi_state_timer_broadcast(s
> struct acpi_processor_cx *cx,
> int broadcast)
> {
> -#ifdef CONFIG_GENERIC_CLOCKEVENTS
> -
> int state = cx - pr->power.states;
>
> if (state >= pr->power.timer_broadcast_on_state) {
> +
> +#ifdef CONFIG_GENERIC_CLOCKEVENTS
> unsigned long reason;
>
> reason = broadcast ? CLOCK_EVT_NOTIFY_BROADCAST_ENTER :
> CLOCK_EVT_NOTIFY_BROADCAST_EXIT;
> clockevents_notify(reason, &pr->id);
> - }
> #endif
> +
> +#ifdef CONFIG_GENERIC_TIME
> + /* TSC halts in C2/3, so notify users */
> + mark_tsc_unstable();
> +#endif
> + }
> }
>
> #else
> @@ -481,10 +489,6 @@ static void acpi_processor_idle(void)
> /* Get end time (ticks) */
> t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
>
> -#ifdef CONFIG_GENERIC_TIME
> - /* TSC halts in C2, so notify users */
> - mark_tsc_unstable();
> -#endif
> /* Re-enable interrupts */
> local_irq_enable();
> current_thread_info()->status |= TS_POLLING;
> @@ -523,10 +527,6 @@ static void acpi_processor_idle(void)
> acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
> }
>
> -#ifdef CONFIG_GENERIC_TIME
> - /* TSC halts in C3, so notify users */
> - mark_tsc_unstable();
> -#endif
> /* Re-enable interrupts */
> local_irq_enable();
> current_thread_info()->status |= TS_POLLING;
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] ACPI: Keep TSC stable, when lapic_timer_c2_ok is set
2007-05-10 8:09 ` Len Brown
@ 2007-05-10 20:50 ` Thomas Gleixner
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2007-05-10 20:50 UTC (permalink / raw)
To: Len Brown; +Cc: Andi Kleen, linux-acpi
> Note, however, that the assumption that the TSC and the LAPIC
> timer breaking under the same conditions will not always
> be true going forward.
>
> In particular, there will be systems with a fully functional TSC
> and a broken LAPIC timer. But I guess we'll cross that bridge
> when we come to it...
Sigh, is there any kind of breakage which is not invented yet ?
I guess we need to have a seperate option for the TSC vs. C2 then.
tglx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-10 20:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-07 16:33 [patch] ACPI: Keep TSC stable, when lapic_timer_c2_ok is set Thomas Gleixner
2007-05-10 8:09 ` Len Brown
2007-05-10 20:50 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox