From patchwork Wed Sep 18 18:48:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 2908741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 530369F1E3 for ; Wed, 18 Sep 2013 18:51:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 943A5201DC for ; Wed, 18 Sep 2013 18:51:22 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC0292016D for ; Wed, 18 Sep 2013 18:51:21 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VMMpQ-0002ci-Tb; Wed, 18 Sep 2013 18:50:22 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VMMp9-00040O-NE; Wed, 18 Sep 2013 18:50:03 +0000 Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VMMog-0003ve-BC for linux-arm-kernel@lists.infradead.org; Wed, 18 Sep 2013 18:49:35 +0000 Received: by mail-pa0-f51.google.com with SMTP id lf1so8691868pab.10 for ; Wed, 18 Sep 2013 11:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=Osge++4Ml+/EjtEUonOQX5RsgpSrPJgjEVradvdEa2U=; b=uGwWkoBDLKnv0IPq5w/Xc6GY2vfdPvx/AgLJX+s85eKDnylGPFdK1/tVvdvJ9Az27B nVf7RVC+w3GJPqsigW3/QX5H71q4lhE3ruKytcKhAuMf3ZXvqhbkIhgRdEuxEPINUCzL Iq4Jfv0Wvcfrip27ITztrbheF33TdQu6zA8EtgVBugiUuq4bV5qwGQdyAfLsvUp7Wqng H3V/uLSV4NoU+L4BTGYF1A4jjXTr+SPZ8izpWhH2HM/SJSpx/RU7daFj0ogAHksCji5v de4VlIV9PVq/rGC9n8EtV+e1ALQuUW6Ozkj9kpm9KNG+mqAWWBTAEF5PjA+xQhZCko87 xooA== X-Received: by 10.67.15.70 with SMTP id fm6mr21212310pad.109.1379530152405; Wed, 18 Sep 2013 11:49:12 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id t2sm3561261pbi.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 18 Sep 2013 11:49:11 -0700 (PDT) From: Soren Brinkmann To: Rob Herring , Pawel Moll , Mark Rutland , Stephen Warren , Ian Campbell , Russell King , Michal Simek , Thomas Gleixner , Daniel Lezcano , Stephen Boyd , Grant Likely , Preeti Murthy Subject: [PATCH v2 3/4] tick: broadcast: Deny per-cpu clockevents from being broadcast sources Date: Wed, 18 Sep 2013 11:48:37 -0700 Message-Id: <1379530118-22813-4-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1379530118-22813-1-git-send-email-soren.brinkmann@xilinx.com> References: <1379530118-22813-1-git-send-email-soren.brinkmann@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130918_144934_646165_9161EBD9 X-CRM114-Status: GOOD ( 12.50 ) X-Spam-Score: 1.7 (+) Cc: Soren Brinkmann , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, KHOP_BIG_TO_CC,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Daniel Lezcano --- 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;