From patchwork Tue Feb 26 22:17:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 15107 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8C15623E24 for ; Tue, 26 Feb 2013 22:17:42 +0000 (UTC) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by fiordland.canonical.com (Postfix) with ESMTP id 4310DA18772 for ; Tue, 26 Feb 2013 22:17:42 +0000 (UTC) Received: by mail-ve0-f173.google.com with SMTP id oz10so4419872veb.4 for ; Tue, 26 Feb 2013 14:17:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=/XoB0PFKOTBFWNf3ooYy/ZFPjSLXraUfQFIEb1ielxY=; b=bHBbLUCQvGJzebHNzF7nOclvtxuNZG2FYQril0WvHDLSJ123rMv4pdvFQ5phsPt0ST //I04DxA2O4UIhU58pi359VFAoM7I3Q2hPTtL2y73QZZOrUSLmE4jxLfHwA0oNAug1iQ j1xCJy7WFNzw+UxzEqL5p1XWv0gNnteNiDIErCslhpbvSMAgMVNnXEAKuyP4phiYWZ7O GgztIiX18oYo+iPoMrGCl7bZ10aBL9aRbJe6+By7U9dwjfY7ty0JS8UnEpx27RvIVUN/ bsOfHMHIvsZ6Dud6bhvDdI4/H33shWFgm5isS4kUvmv2jokbt65HkR+9/0wChXn5xtA1 eg8Q== X-Received: by 10.220.242.73 with SMTP id lh9mr8545886vcb.49.1361917061779; Tue, 26 Feb 2013 14:17:41 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp137615veb; Tue, 26 Feb 2013 14:17:41 -0800 (PST) X-Received: by 10.194.5.196 with SMTP id u4mr29630600wju.47.1361917057023; Tue, 26 Feb 2013 14:17:37 -0800 (PST) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id bk9si1143002wib.28.2013.02.26.14.17.36 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Feb 2013 14:17:37 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by mail-wg0-f50.google.com with SMTP id es5so3902818wgb.29 for ; Tue, 26 Feb 2013 14:17:36 -0800 (PST) X-Received: by 10.194.171.74 with SMTP id as10mr8932840wjc.0.1361917056590; Tue, 26 Feb 2013 14:17:36 -0800 (PST) Received: from mai.home (AToulouse-654-1-437-74.w83-205.abo.wanadoo.fr. [83.205.68.74]) by mx.google.com with ESMTPS id ed6sm4920201wib.9.2013.02.26.14.17.34 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Feb 2013 14:17:35 -0800 (PST) From: Daniel Lezcano To: john.stultz@linaro.org, tglx@linutronix.de Cc: viresh.kumar@linaro.org, jacob.jun.pan@linux.intel.com, linux-arm-kernel@lists.infradead.org, santosh.shilimkar@ti.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, patches@linaro.org, linus.walleij@stericsson.com Subject: [PATCH 4/4] ARM: timer-sp: Set dynamic irq affinity Date: Tue, 26 Feb 2013 23:17:27 +0100 Message-Id: <1361917047-29230-5-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1361917047-29230-1-git-send-email-daniel.lezcano@linaro.org> References: <1361917047-29230-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQknnMq8tJDJ0N0Srucf5aeMsJAu+VSHdQ0XXLc77f6AK7jjAmD6T3Hyfb02ktizl4JO5g/3 From: Viresh Kumar When a cpu goes to a deep idle state where its local timer is shutdown, it notifies the time frame work to use the broadcast timer instead. Unfortunately, the broadcast device could wake up any CPU, including an idle one which is not concerned by the wake up at all. This implies, in the worst case, an idle CPU will wake up to send an IPI to another idle cpu. This patch fixes this for ARM platforms using timer-sp, by setting CLOCK_EVT_FEAT_DYNIRQ feature. Signed-off-by: Viresh Kumar Signed-off-by: Daniel Lezcano --- arch/arm/common/timer-sp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index 9d2d3ba..ae3c0f9 100644 --- a/arch/arm/common/timer-sp.c +++ b/arch/arm/common/timer-sp.c @@ -158,7 +158,8 @@ static int sp804_set_next_event(unsigned long next, } static struct clock_event_device sp804_clockevent = { - .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, + .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | + CLOCK_EVT_FEAT_DYNIRQ, .set_mode = sp804_set_mode, .set_next_event = sp804_set_next_event, .rating = 300,