From patchwork Fri Jun 17 13:43:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 70323 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp288713qgy; Fri, 17 Jun 2016 06:44:55 -0700 (PDT) X-Received: by 10.107.187.196 with SMTP id l187mr1101818iof.28.1466171095006; Fri, 17 Jun 2016 06:44:55 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id to3si15134418pac.1.2016.06.17.06.44.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2016 06:44:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bDu3v-0003Nw-5L; Fri, 17 Jun 2016 13:43:55 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bDu3s-0003MR-7d for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2016 13:43:52 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 678FA2A2; Fri, 17 Jun 2016 06:44:14 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 776B03F41F; Fri, 17 Jun 2016 06:43:31 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 5BB421AE1389; Fri, 17 Jun 2016 14:43:32 +0100 (BST) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH] clocksource: arm_arch_timer: disable the evtstrm via the cmdline Date: Fri, 17 Jun 2016 14:43:31 +0100 Message-Id: <1466171011-30468-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160617_064352_298623_9FD2C038 X-CRM114-Status: GOOD ( 10.78 ) X-Spam-Score: -8.3 (--------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-8.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.101.70 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marc.zyngier@arm.com, catalin.marinas@arm.com, daniel.lezcano@linaro.org, Will Deacon MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Disabling the eventstream can be useful for debugging and development purposes and is currently controlled via a Kconfig option (CONFIG_ARM_ARCH_TIMER_EVTSTREAM). Whilst this does the trick, it's often desirable to toggle the feature on the command line, so this patch adds a "noevtstrm" command line option to do just that. Signed-off-by: Will Deacon --- Sending as an RFC because we might want to remove the Kconfig option altogether if we have this. drivers/clocksource/arm_arch_timer.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- 2.1.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Acked-by: Mark Rutland diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 4814446a0024..f579c0da7423 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -79,6 +79,15 @@ static enum ppi_nr arch_timer_uses_ppi = VIRT_PPI; static bool arch_timer_c3stop; static bool arch_timer_mem_use_virtual; +static bool evtstrm_disable; + +static int __init early_evtstrm_disable(char *buf) +{ + evtstrm_disable = true; + return 0; +} +early_param("noevtstrm", early_evtstrm_disable); + /* * Architected system timer support. */ @@ -372,7 +381,7 @@ static int arch_timer_setup(struct clock_event_device *clk) enable_percpu_irq(arch_timer_ppi[PHYS_NONSECURE_PPI], 0); arch_counter_set_user_access(); - if (IS_ENABLED(CONFIG_ARM_ARCH_TIMER_EVTSTREAM)) + if (IS_ENABLED(CONFIG_ARM_ARCH_TIMER_EVTSTREAM) && !evtstrm_disable) arch_timer_configure_evtstream(); return 0;