From: Stephen Boyd <sboyd@codeaurora.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Stehle Vincent-B46079 <B46079@freescale.com>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
John Stultz <john.stultz@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: next-20130627 breaks i.MX6 sabre sd UART console
Date: Mon, 01 Jul 2013 13:54:36 -0700 [thread overview]
Message-ID: <51D1EC8C.4050101@codeaurora.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1307012153060.4013@ionos.tec.linutronix.de>
On 07/01/13 13:14, Thomas Gleixner wrote:
> The issue is very subtle. What happens is:
>
> CPU0 CPU1
>
> Switch to oneshot mode
>
> Copy the bits from tick_broadcast_mask to
> tick_broadcast_oneshot_mask. We need to do
> that so the other cpus reach the timer irq
> and the softirq which switches them to
> oneshot.
>
> Kick the broadcast device into oneshot.
>
> Timer interrupt fires
>
> irq_enter sees the cpu in
> tick_broadcast_oneshot_mask and
> sets the device to oneshot mode
>
> handle_periodic:
> Sees oneshot mode and adds
> period to
> dev->next_event(KTIME_MAX)
>
Yep. It is also racing with the timer interrupt so having more than two
CPUs must help widen the window (which is why we see it on the higher
numbered CPUs).
>
> So we need two fixes:
>
> 1) The replacement of the dummy timer and the effect on the broadcast
> mask/device
>
> 2) tick_check_oneshot_broadcast needs a sanity check
>
> Patch below.
Looks good.
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
One minor typo in the comment below.
> + switch (tick_broadcast_device.mode) {
> + case TICKDEV_MODE_ONESHOT:
> + /*
> + * If the system is in oneshot mode we can
> + * unconditionally clear the oneshot mask,
> + * because the CPU is running and therefor not
s/therefor/therefore/
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2013-07-01 20:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 18:49 next-20130627 breaks i.MX6 sabre sd UART console Stehle Vincent-B46079
2013-06-28 12:09 ` Thomas Gleixner
2013-06-28 15:57 ` Stephen Boyd
2013-06-28 16:58 ` Stehle Vincent-B46079
2013-06-28 17:06 ` Stephen Boyd
2013-06-29 2:07 ` Stephen Boyd
2013-07-01 10:04 ` Mark Rutland
2013-07-01 10:29 ` Stehle Vincent-B46079
2013-07-01 13:04 ` Thomas Gleixner
2013-07-01 13:22 ` Stehle Vincent-B46079
2013-07-01 17:49 ` Thomas Gleixner
2013-07-01 19:45 ` Stehle Vincent-B46079
2013-07-01 19:50 ` Stephen Boyd
2013-07-01 20:14 ` Thomas Gleixner
2013-07-01 20:54 ` Stephen Boyd [this message]
2013-07-01 21:24 ` Thomas Gleixner
2013-07-01 22:14 ` Stephen Boyd
2013-07-01 22:22 ` Thomas Gleixner
2013-07-02 7:18 ` Stehle Vincent-B46079
2013-07-02 12:31 ` [tip:timers/core] tick: Prevent uncontrolled switch to oneshot mode tip-bot for Thomas Gleixner
2013-07-02 12:31 ` [tip:timers/core] tick: Sanitize broadcast control logic tip-bot for Thomas Gleixner
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=51D1EC8C.4050101@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=B46079@freescale.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).