* [PATCH] x86: apic: disarm apic timer in deadline mode when shut down clockevent
@ 2014-03-26 8:06 Wang, Biao
2014-04-16 7:40 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Wang, Biao @ 2014-03-26 8:06 UTC (permalink / raw)
To: hpa@zytor.com, mingo@redhat.com, tglx@linutronix.de,
linux-kernel@vger.kernel.org
Cc: Zhang, Di
For tsc deadline mode, when we shut down clockevent we should disarm
local-APIC timer like count-down mode.
Signed-off-by: wang, biao <biao.wang@intel.com>
Signed-off-by: Zhang Di <di.zhang@intel.com>
---
arch/x86/kernel/apic/apic.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 7f26c9a..85889ba 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -512,6 +512,10 @@ static void lapic_timer_setup(enum clock_event_mode mode,
v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
apic_write(APIC_LVTT, v);
apic_write(APIC_TMICT, 0);
+
+ /*disarm timer in deadline mode*/
+ if (boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
+ wrmsrl(MSR_IA32_TSC_DEADLINE, 0);
break;
case CLOCK_EVT_MODE_RESUME:
/* Nothing to do here */
--
1.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: apic: disarm apic timer in deadline mode when shut down clockevent
2014-03-26 8:06 [PATCH] x86: apic: disarm apic timer in deadline mode when shut down clockevent Wang, Biao
@ 2014-04-16 7:40 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2014-04-16 7:40 UTC (permalink / raw)
To: Wang, Biao
Cc: hpa@zytor.com, mingo@redhat.com, tglx@linutronix.de,
linux-kernel@vger.kernel.org, Zhang, Di
* Wang, Biao <biao.wang@intel.com> wrote:
> For tsc deadline mode, when we shut down clockevent we should disarm
> local-APIC timer like count-down mode.
>
> Signed-off-by: wang, biao <biao.wang@intel.com>
> Signed-off-by: Zhang Di <di.zhang@intel.com>
> ---
> arch/x86/kernel/apic/apic.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> index 7f26c9a..85889ba 100644
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -512,6 +512,10 @@ static void lapic_timer_setup(enum clock_event_mode mode,
> v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
> apic_write(APIC_LVTT, v);
> apic_write(APIC_TMICT, 0);
> +
> + /*disarm timer in deadline mode*/
> + if (boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
> + wrmsrl(MSR_IA32_TSC_DEADLINE, 0);
> break;
Please fix the changelog to conform to the standard changelog style:
- first describe the symptoms of the bug - how does a user notice?
- then describe how the code behaves today and how that is causing the bug
- and then only describe how it's fixed.
The first item is the most important one - while developers
(naturally) tend to concentrate on the least important point,
the last one.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-16 7:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-26 8:06 [PATCH] x86: apic: disarm apic timer in deadline mode when shut down clockevent Wang, Biao
2014-04-16 7:40 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox