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: 2187711 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id ED5BFDFE86 for ; Tue, 26 Feb 2013 22:18:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757421Ab3BZWSB (ORCPT ); Tue, 26 Feb 2013 17:18:01 -0500 Received: from mail-wg0-f54.google.com ([74.125.82.54]:48857 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757867Ab3BZWRh (ORCPT ); Tue, 26 Feb 2013 17:17:37 -0500 Received: by mail-wg0-f54.google.com with SMTP id fm10so3755176wgb.33 for ; Tue, 26 Feb 2013 14:17:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=/XoB0PFKOTBFWNf3ooYy/ZFPjSLXraUfQFIEb1ielxY=; b=YTK83yVmrUhCTvAy0DnSvX77Vhhn9o+HEXj+ER8jQeCAw9UHa3QAA9Nu1/HvkGMnhw Dz4H1VCBRIEzPnxA45dHHboIYbnQoArBvl1F+ZPhf7j9/WG2LLBS+6swzy30kWdtXulT QKx42Bo9rB8ZUg6a15XuFFtNZ1gKPbprlsoCHeP+ZGmcEZklqO98kJ/sf888XMIV/aOg 4biPEFJwwObKgHkf8hVuzu8NcoaJVMQgR38kqxYwpt8WIOKKwM3VwKpAKQ/DzuYWJKoe uQkIu+17cRLDgXXJeF+rWxzB2P5mZEkyTiYJm6ImRrPQHs3CZaCNEPrAQRD6Dph4T1EY NS8w== 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: ALoCoQlWP/wpa4MTIyXoVOyo5/QogBv8w1wmZJBIBRyjBSH7PEk5wu6nC3QEBwIGVy/DdNkEzXhO Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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,