From: Viresh Kumar <viresh.kumar@linaro.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
Borislav Petkov <bp@alien8.de>,
Wanpeng Li <wanpeng.li@hotmail.com>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] x86/apic: Implement set_state_oneshot_stopped() callback
Date: Mon, 2 Jan 2017 13:01:54 +0530 [thread overview]
Message-ID: <20170102073154.GB13679@vireshk-i7> (raw)
In-Reply-To: <1483029949-6925-1-git-send-email-fweisbec@gmail.com>
On 29-12-16, 17:45, Frederic Weisbecker wrote:
> When clock_event_device::set_state_oneshot_stopped() is not implemented,
> hrtimer_cancel() can't stop the clock when there is no more timer in
> the queue. So the ghost of the freshly cancelled hrtimer haunts us back
> later with an extra interrupt:
>
> <idle>-0 [002] d..2 2248.557659: hrtimer_cancel: hrtimer=ffff88021fa92d80
> <idle>-0 [002] d.h1 2249.303659: local_timer_entry: vector=239
>
> So let's implement this missing callback for the lapic clock. This
> consist in calling its set_state_shutdown() callback. There don't seem
> to be a lighter way to stop the clock. Simply writing 0 to APIC_TMICT
> won't be enough to stop the clock and avoid the extra interrupt, as
> opposed to what is specified in the specs. We must also mask the
> timer interrupt in the device.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Wanpeng Li <wanpeng.li@hotmail.com>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> ---
> arch/x86/kernel/apic/apic.c | 25 +++++++++++++------------
> 1 file changed, 13 insertions(+), 12 deletions(-)
I didn't try updating anything other than the ARM subsystem as I was afraid of
getting crushed by Thomas :)
Though, I do remember from one of the email (from Thomas), where he mentioned
that disabling the timer on some platforms may have bigger penalties. Perhaps
its fast enough for apic..
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
next prev parent reply other threads:[~2017-01-02 7:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-29 16:45 Frederic Weisbecker
2016-12-30 1:28 ` Wanpeng Li
2017-01-02 7:31 ` Viresh Kumar [this message]
2017-01-09 10:55 ` [tip:x86/apic] " tip-bot for Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170102073154.GB13679@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=bp@alien8.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=wanpeng.li@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®