devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	Grant Likely <grant.likely@secretlab.ca>,
	Preeti Murthy <preeti.lkml@gmail.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Soren Brinkmann <soren.brinkmann@xilinx.com>
Subject: [PATCH v2 3/4] tick: broadcast: Deny per-cpu clockevents from being broadcast sources
Date: Wed, 18 Sep 2013 11:48:37 -0700	[thread overview]
Message-ID: <1379530118-22813-4-git-send-email-soren.brinkmann@xilinx.com> (raw)
In-Reply-To: <1379530118-22813-1-git-send-email-soren.brinkmann@xilinx.com>

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!).

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
---
 kernel/time/tick-broadcast.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 218bcb5..9532690 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -70,6 +70,7 @@ static bool tick_check_broadcast_device(struct clock_event_device *curdev,
 					struct clock_event_device *newdev)
 {
 	if ((newdev->features & CLOCK_EVT_FEAT_DUMMY) ||
+	    (newdev->features & CLOCK_EVT_FEAT_PERCPU) ||
 	    (newdev->features & CLOCK_EVT_FEAT_C3STOP))
 		return false;
 
-- 
1.8.4

  parent reply	other threads:[~2013-09-18 18:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18 18:48 [PATCH v2 0/4] arm: zynq: Enable global timer Soren Brinkmann
2013-09-18 18:48 ` [PATCH v2 1/4] clockchips: Add FEAT_PERCPU clockevent flag Soren Brinkmann
     [not found]   ` <1379530118-22813-2-git-send-email-soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2013-09-25 15:10     ` Daniel Lezcano
2013-09-18 18:48 ` [PATCH v2 2/4] clocksource/arm_global_timer: Set FEAT_PERCPU flag Soren Brinkmann
     [not found]   ` <1379530118-22813-3-git-send-email-soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2013-09-25 15:10     ` Daniel Lezcano
2013-09-26 10:38     ` Srinivas KANDAGATLA
2013-09-18 18:48 ` Soren Brinkmann [this message]
2013-09-25 15:11   ` [PATCH v2 3/4] tick: broadcast: Deny per-cpu clockevents from being broadcast sources Daniel Lezcano
2013-09-18 18:48 ` [PATCH v2 4/4] arm: zynq: Enable arm_global_timer Soren Brinkmann
     [not found] ` <1379530118-22813-1-git-send-email-soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2013-09-25 15:20   ` [PATCH v2 0/4] arm: zynq: Enable global timer Daniel Lezcano
     [not found]     ` <5242FF4B.6050901-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-09-25 15:37       ` Sören Brinkmann
2013-09-26  8:16       ` Michal Simek
     [not found]         ` <62570dec-da98-42a2-93b9-6ab1f8adb30d-p/+QeVIcf1AR12DuCexJY7jjLBE8jN/0@public.gmane.org>
2013-09-26 10:14           ` Daniel Lezcano

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=1379530118-22813-4-git-send-email-soren.brinkmann@xilinx.com \
    --to=soren.brinkmann@xilinx.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@secretlab.ca \
    --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=preeti.lkml@gmail.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;
as well as URLs for NNTP newsgroup(s).