From patchwork Wed May 20 21:56:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mason X-Patchwork-Id: 6450331 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 352379F1C1 for ; Wed, 20 May 2015 21:59:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67DB6203ED for ; Wed, 20 May 2015 21:59:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91521203B0 for ; Wed, 20 May 2015 21:59:51 +0000 (UTC) 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 1YvBzS-0004jP-1l; Wed, 20 May 2015 21:57:26 +0000 Received: from smtp4-g21.free.fr ([212.27.42.4]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YvBzB-0004ai-7s for linux-arm-kernel@lists.infradead.org; Wed, 20 May 2015 21:57:09 +0000 Received: from [192.168.1.68] (unknown [77.207.132.113]) (Authenticated sender: shill) by smtp4-g21.free.fr (Postfix) with ESMTPSA id 2A67C4C803D; Wed, 20 May 2015 23:53:02 +0200 (CEST) Message-ID: <555D030F.8030100@free.fr> Date: Wed, 20 May 2015 23:56:31 +0200 From: Mason User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1 MIME-Version: 1.0 To: Arnd Bergmann Subject: Re: schedule_timeout sleeps too long after dividing CPU frequency References: <20150514144239.GZ2067@n2100.arm.linux.org.uk> <20150520201438.GW2067@n2100.arm.linux.org.uk> <555CF17D.4060500@free.fr> <76003699.Oyq777txnm@wuerfel> In-Reply-To: <76003699.Oyq777txnm@wuerfel> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150520_145709_512124_A15EBE6F X-CRM114-Status: GOOD ( 15.94 ) X-Spam-Score: -0.7 (/) Cc: Mans Rullgard , Russell King - ARM Linux , Marc Zyngier , Viresh Kumar , Linus Walleij , Daniel Lezcano , Will Deacon , John Stultz , Catalin Marinas , Thomas Gleixner , Linux ARM X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 20/05/2015 22:52, Arnd Bergmann wrote: > On Wednesday 20 May 2015 22:41:33 Mason wrote: > >> Oh... I didn't even think it made sense (and was supported) >> to select more than one machine... >> >> Is this related to CONFIG_ARCH_MULTIPLATFORM? > > Yes. In the old days, each platform had its own entry in the top-level > choice statement, which meant they were mutually exclusive. Most of > them are converted now and can be put into a single kernel with > CONFIG_ARCH_MULTIPLATFORM, and we stopped accepting new ones that > don't do this a few years ago. Is the following patch (more) acceptable: Or perhaps the other way around? i.e. feat_c3stop initialized to 0 (thus in the bss section) and set to FEAT_C3STOP if "twd_never_stops" doesn't exist... Russell, when you added the FEAT_C3STOP flag unconditionally in commit 5388a6b266, didn't that potentially break platforms that didn't expect the flag to be set? Regards. diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 6591e26fc13f..3e867b2f067f 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c @@ -32,6 +32,7 @@ static void __iomem *twd_base; static struct clk *twd_clk; static unsigned long twd_timer_rate; static DEFINE_PER_CPU(bool, percpu_setup_called); +static int feat_c3stop = CLOCK_EVT_FEAT_C3STOP; static struct clock_event_device __percpu *twd_evt; static int twd_ppi; @@ -294,7 +295,7 @@ static void twd_timer_setup(void) clk->name = "local_timer"; clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | - CLOCK_EVT_FEAT_C3STOP; + feat_c3stop; clk->rating = 350; clk->set_mode = twd_set_mode; clk->set_next_event = twd_set_next_event; @@ -346,6 +347,7 @@ static int __init twd_local_timer_common_register(struct device_node *np) goto out_irq; twd_get_clock(np); + if (of_get_property(np, "twd_never_stops", NULL)) feat_c3stop = 0; /* * Immediately configure the timer on the boot CPU, unless we need