From: Soren Brinkmann <soren.brinkmann@xilinx.com>
To: Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Russell King <linux@arm.linux.org.uk>,
Michal Simek <michal.simek@xilinx.com>,
Thomas Gleixner <tglx@linutronix.de>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Stephen Boyd <sboyd@codeaurora.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] tick: broadcast: Deny per-cpu clockevents from being broadcast sources
Date: Thu, 12 Sep 2013 09:50:39 -0700 [thread overview]
Message-ID: <1379004640-15117-2-git-send-email-soren.brinkmann@xilinx.com> (raw)
In-Reply-To: <1379004640-15117-1-git-send-email-soren.brinkmann@xilinx.com>
From: Stephen Boyd <sboyd@codeaurora.org>
On most ARM systems the per-cpu clockevents are truly per-cpu in
the sense that they can't be controlled on any other CPU besides
the CPU that they interrupt. If one of these clockevents were to
become a broadcast source we will run into a lot of trouble
because the broadcast source is enabled on the first CPU to go
into deep idle (if that CPU suffers from FEAT_C3_STOP) and that
could be a different CPU than what the clockevent is interrupting
(or even worse the CPU that the clockevent interrupts could be
offline).
Theoretically it's possible to support per-cpu clockevents as the
broadcast source but so far we haven't needed this and supporting
it is rather complicated. Let's just deny the possibility for now
until this becomes a reality (let's hope it never does!).
Reported-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
kernel/time/tick-broadcast.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 218bcb5..d3539e5 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -77,6 +77,9 @@ static bool tick_check_broadcast_device(struct clock_event_device *curdev,
!(newdev->features & CLOCK_EVT_FEAT_ONESHOT))
return false;
+ if (cpumask_equal(newdev->cpumask, cpumask_of(smp_processor_id())))
+ return false;
+
return !curdev || newdev->rating > curdev->rating;
}
--
1.8.4
next prev parent reply other threads:[~2013-09-12 16:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 16:50 [PATCH 0/2] arm: zynq: Enable global timer Soren Brinkmann
2013-09-12 16:50 ` Soren Brinkmann [this message]
2013-09-12 20:30 ` [PATCH 1/2] tick: broadcast: Deny per-cpu clockevents from being broadcast sources Thomas Gleixner
2013-09-12 23:48 ` Sören Brinkmann
2013-09-13 14:45 ` Thomas Gleixner
2013-09-13 15:25 ` Sören Brinkmann
2013-09-13 8:25 ` Daniel Lezcano
[not found] ` <CAM4v1pPQwBfQ3V6M2VGsc-Fh+VhLkQE2JZeoVc=_3kniODNEhA@mail.gmail.com>
2013-09-13 10:39 ` Preeti U Murthy
2013-09-13 16:23 ` Sören Brinkmann
2013-09-14 0:23 ` Preeti U Murthy
2013-09-12 16:50 ` [PATCH 2/2] arm: zynq: Enable arm_global_timer Soren Brinkmann
2013-09-15 12:40 ` Grant Likely
2013-09-18 17:05 ` Sören Brinkmann
-- strict thread matches above, loose matches on Subject: below --
2013-08-20 15:13 Enable arm_global_timer for Zynq brakes boot Daniel Lezcano
2013-08-22 17:06 ` [PATCH 1/2] tick: broadcast: Deny per-cpu clockevents from being broadcast sources Stephen Boyd
2013-08-22 23:38 ` Sören Brinkmann
2013-09-05 16:53 ` Sören Brinkmann
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=1379004640-15117-2-git-send-email-soren.brinkmann@xilinx.com \
--to=soren.brinkmann@xilinx.com \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=michal.simek@xilinx.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=sboyd@codeaurora.org \
--cc=swarren@wwwdotorg.org \
--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
all inboxes | Powered by JetHome®