From patchwork Sat Mar 2 10:10:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 15205 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 DF14223F8E for ; Sat, 2 Mar 2013 10:10:21 +0000 (UTC) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by fiordland.canonical.com (Postfix) with ESMTP id 986E7A181E3 for ; Sat, 2 Mar 2013 10:10:21 +0000 (UTC) Received: by mail-vb0-f48.google.com with SMTP id fc21so515559vbb.35 for ; Sat, 02 Mar 2013 02:10:21 -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=W6SJFox1oaHMjhBCEmPnGF6nqvxQQa9zsGrLL+fs2x7kXug4P0VrO0NOvAmYbNwIfR feh5WCRHnyhCogNoyst2tRDeRhUigsK4DcrfHyrjKoYuDlc4gdM9Dh4Fd6flqhg4c3sU 06xbF86H3T4zCX6AeQp5DgwGy7tN7gInbbiEV+KzH44c4zrpPf+P6O+g+IpiuiP6fTnr 51iveS1fWw7kklLML8jvF5JLPDbFgwTTetby4EzJIsZg+u6LJYrKoJHWF9BLQgRrhOVv TOI2EjYcRMdETrD32/jTtiQQM3FO7s23WFEwRUSFLFqFAVYtTv6DdYT2qjUkG+1uZHuS sjjw== X-Received: by 10.52.88.237 with SMTP id bj13mr4561253vdb.75.1362219021056; Sat, 02 Mar 2013 02:10:21 -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.127.98 with SMTP id nf2csp4144veb; Sat, 2 Mar 2013 02:10:20 -0800 (PST) X-Received: by 10.180.183.193 with SMTP id eo1mr2172808wic.19.1362219019836; Sat, 02 Mar 2013 02:10:19 -0800 (PST) Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]) by mx.google.com with ESMTPS id gq7si628213wib.62.2013.03.02.02.10.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Mar 2013 02:10:19 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::229 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c05::229; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c05::229 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-wi0-f169.google.com with SMTP id l13so464758wie.4 for ; Sat, 02 Mar 2013 02:10:19 -0800 (PST) X-Received: by 10.194.60.195 with SMTP id j3mr22170579wjr.33.1362219019463; Sat, 02 Mar 2013 02:10:19 -0800 (PST) Received: from mai.home (AToulouse-654-1-336-203.w86-199.abo.wanadoo.fr. [86.199.223.203]) by mx.google.com with ESMTPS id cf8sm2519888wib.1.2013.03.02.02.10.17 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Mar 2013 02:10:18 -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, rickard.andersson@stericsson.com, vincent.guittot@linaro.org, linus.walleij@stericsson.com Subject: [PATCH 4/4][V2] ARM: timer-sp: Set dynamic irq affinity Date: Sat, 2 Mar 2013 11:10:13 +0100 Message-Id: <1362219013-18173-5-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1362219013-18173-1-git-send-email-daniel.lezcano@linaro.org> References: <1362219013-18173-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQkkUDOBsVz9XiNgEvBN8QHJB2MsiXu9bvk9devxV94af+cX9ZrPYErJB3MkYo8nVwq5LKsI 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 Acked-by: Russell King --- 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,