From patchwork Wed Dec 23 11:29:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 58973 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp3796261lbb; Wed, 23 Dec 2015 03:29:39 -0800 (PST) X-Received: by 10.98.80.138 with SMTP id g10mr43162379pfj.25.1450870179630; Wed, 23 Dec 2015 03:29:39 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l85si25863333pfi.176.2015.12.23.03.29.39; Wed, 23 Dec 2015 03:29:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756549AbbLWL3b (ORCPT + 29 others); Wed, 23 Dec 2015 06:29:31 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:34906 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756468AbbLWL32 (ORCPT ); Wed, 23 Dec 2015 06:29:28 -0500 Received: by mail-pa0-f43.google.com with SMTP id jx14so104795242pad.2 for ; Wed, 23 Dec 2015 03:29:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=MPhHyMGp9xrUN6KDexP8wiew5XR7hB9MM24dhIhPUMY=; b=OYGv1jcYQj7KG1a77IESya+M4jglswfiFYyI4BWwsieTe00hI/f9f4dy7MBnMyC2rn 9yyQuDkQpKyBiTw7yluLTePa2crEkJhzEhHYYBEPEGq8Maij3SZmuaZ8T77f6u0gwxkN BV5fOvj3wzskB6CqBytjkLqYAYegjyzgtlHHo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=MPhHyMGp9xrUN6KDexP8wiew5XR7hB9MM24dhIhPUMY=; b=fK9PiQUXtBL+BUMzKgWcvprj7o6T6+w+kWl+/b40dD1C2ESpi7NXo3pfFWhI6hy6n1 8FCvCrR/LE1XjvReBZeZQ4QK/WdhpDQZu2KUSwdbY6AiyrpYJfd80gGFaNrj7QhFxCSi ehHbZpPh8upPMY//XHvoV/HiFQUw9baEn6kTXGSTQxqYolcZUSTt6qwmJolxd3e3r8K2 SMuxl0wSHcM5B8wCkz2B3Z72OesaKU5H7Pakwt7H7/utKDP+mpo33yxsSrgHzPb7RkrH G81joSLIdAGULXRwS+SlyRDY/iseO6Yg5bqWaZ9Rsai2HFDEC73EwdqudxVVrxPa4h6N hfmg== X-Gm-Message-State: ALoCoQkW6PfCChQILXU7ewPo9ciXXY1WBulJDK9pgFHR6uwLB88t+UIEx4lUBS0SilGRCS8ly5oprbiskSsNfaLGclLDl9daWQ== X-Received: by 10.66.255.10 with SMTP id am10mr43227617pad.79.1450870167576; Wed, 23 Dec 2015 03:29:27 -0800 (PST) Received: from localhost ([122.171.29.67]) by smtp.gmail.com with ESMTPSA id c20sm47432528pfj.47.2015.12.23.03.29.26 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 23 Dec 2015 03:29:27 -0800 (PST) From: Viresh Kumar To: Daniel Lezcano , Thomas Gleixner Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH 1/3] clockevents/arm_arch_timer: Implement ->set_state_oneshot_stopped() Date: Wed, 23 Dec 2015 16:59:12 +0530 Message-Id: <221e3d20259b9387b10468b22fecd621b35a569b.1450869375.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.0.rc1.186.g94414c4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org set_state_oneshot_stopped() is called by the clkevt core, when the next event is required at an expiry time of 'KTIME_MAX'. This normally happens with NO_HZ_{IDLE|FULL} in both LOWRES/HIGHRES modes. This patch makes the clockevent device to stop on such an event, to avoid spurious interrupts, as explained by: commit 8fff52fd5093 ("clockevents: Introduce CLOCK_EVT_STATE_ONESHOT_STOPPED state"). Signed-off-by: Viresh Kumar --- drivers/clocksource/arm_arch_timer.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.7.0.rc1.186.g94414c4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index c64d543d64bf..c816823888c0 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -266,10 +266,12 @@ static void __arch_timer_setup(unsigned type, if (arch_timer_use_virtual) { clk->irq = arch_timer_ppi[VIRT_PPI]; clk->set_state_shutdown = arch_timer_shutdown_virt; + clk->set_state_oneshot_stopped = arch_timer_shutdown_virt; clk->set_next_event = arch_timer_set_next_event_virt; } else { clk->irq = arch_timer_ppi[PHYS_SECURE_PPI]; clk->set_state_shutdown = arch_timer_shutdown_phys; + clk->set_state_oneshot_stopped = arch_timer_shutdown_phys; clk->set_next_event = arch_timer_set_next_event_phys; } } else { @@ -279,10 +281,12 @@ static void __arch_timer_setup(unsigned type, clk->cpumask = cpu_all_mask; if (arch_timer_mem_use_virtual) { clk->set_state_shutdown = arch_timer_shutdown_virt_mem; + clk->set_state_oneshot_stopped = arch_timer_shutdown_virt_mem; clk->set_next_event = arch_timer_set_next_event_virt_mem; } else { clk->set_state_shutdown = arch_timer_shutdown_phys_mem; + clk->set_state_oneshot_stopped = arch_timer_shutdown_phys_mem; clk->set_next_event = arch_timer_set_next_event_phys_mem; }