From patchwork Thu Feb 25 13:37:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 62887 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp165135lbc; Thu, 25 Feb 2016 05:38:17 -0800 (PST) X-Received: by 10.98.18.215 with SMTP id 84mr62809245pfs.131.1456407493465; Thu, 25 Feb 2016 05:38:13 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u69si9436129pfa.253.2016.02.25.05.38.13; Thu, 25 Feb 2016 05:38:13 -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=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760764AbcBYNh7 (ORCPT + 30 others); Thu, 25 Feb 2016 08:37:59 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:36374 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760739AbcBYNh5 (ORCPT ); Thu, 25 Feb 2016 08:37:57 -0500 Received: by mail-wm0-f54.google.com with SMTP id g62so29019487wme.1 for ; Thu, 25 Feb 2016 05:37:57 -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; bh=KkwXPm1SaN/RHJjTlBkdDsvGJCXSTn2DF9U7d7AkBRI=; b=GR5w/Ng7FeELccgaYz9C6bNh4qqfy0iyBWAXPc9udTQrr1pqBFAKyTMRcjOy4tAgxe vEF3bfzamMvX7YUwje5505g411XWj+JyEM2cQTZo8V8fkJ/LjCjbXK8/z617OWRC3yeO nh41k/S0/THVE3YAhIrRdGir6qpYMHy03tWPI= 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; bh=KkwXPm1SaN/RHJjTlBkdDsvGJCXSTn2DF9U7d7AkBRI=; b=aeHW0zcq7Gr6wUBqGezz3O7wOTHKymZ4otx0IFW5AfWCj71tJ4rrBnctBpzEbnmlPS Zlfo21UJW1jVwV0N+paONsZ4PGttDIkPKBsfPwpmPq0oCmHXsvWiRJyEVFbVclJL5QGv 5MqTIS+Dke6uU5UwS21YU3d950vJDw2AHqkdnog+RE3zhwT2yuB9T4RfVKabSDaUZRbx JxeuWiDpZBzmUz6V4j67WRxdp4Dxi//BxWZPqBXpJqLw4dSK/eIKy9KPS6H1lqrm2Gtv 0MpcfqgI939D0omqcKA0gWb1MHraY5S3jE8hEEDsqbAeIkddxmBAzuOnTT+HTBEw6kPz f3eA== X-Gm-Message-State: AG10YOSnBVOgY5njeTBvKFgoVjRoWaMp2tE8Ldd2Z+tgZsckOhastwhU9O/on1kGkeBJerPi X-Received: by 10.28.5.203 with SMTP id 194mr3998445wmf.101.1456407476303; Thu, 25 Feb 2016 05:37:56 -0800 (PST) Received: from mai.com (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.gmail.com with ESMTPSA id g1sm4056053wmc.0.2016.02.25.05.37.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Feb 2016 05:37:55 -0800 (PST) From: Daniel Lezcano To: tglx@linutronix.de Cc: Viresh Kumar , linux-kernel@vger.kernel.org (open list:CLOCKSOURCE, CLOC...) Subject: [PATCH 7/9] clockevents/drivers/arm_arch_timer: Implement ->set_state_oneshot_stopped() Date: Thu, 25 Feb 2016 14:37:15 +0100 Message-Id: <1456407438-6131-7-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456407438-6131-1-git-send-email-daniel.lezcano@linaro.org> References: <56CF00F6.9010301@linaro.org> <1456407438-6131-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Viresh Kumar 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 Signed-off-by: Daniel Lezcano --- drivers/clocksource/arm_arch_timer.c | 4 ++++ 1 file changed, 4 insertions(+) -- 1.9.1 diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 7c567f0..f0dd9d4 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -274,10 +274,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 { @@ -287,10 +289,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; }