From patchwork Wed May 20 16:21:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mason X-Patchwork-Id: 6447991 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 259199F318 for ; Wed, 20 May 2015 16:25:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 528F6202FF for ; Wed, 20 May 2015 16:25:12 +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 917EA201C0 for ; Wed, 20 May 2015 16:25:10 +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 1Yv6lJ-0005Hl-7l; Wed, 20 May 2015 16:22:29 +0000 Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yv6lB-00053i-J5 for linux-arm-kernel@lists.infradead.org; Wed, 20 May 2015 16:22:22 +0000 Received: from [172.27.0.114] (unknown [83.142.147.193]) (Authenticated sender: shill) by smtp2-g21.free.fr (Postfix) with ESMTPSA id 2A46F4B01D6; Wed, 20 May 2015 18:20:26 +0200 (CEST) Message-ID: <555CB499.7060600@free.fr> Date: Wed, 20 May 2015 18:21:45 +0200 From: Mason User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32.1 MIME-Version: 1.0 To: Russell King - ARM Linux Subject: Re: schedule_timeout sleeps too long after dividing CPU frequency References: <20150514144239.GZ2067@n2100.arm.linux.org.uk> <5555BC7E.7010601@free.fr> <20150515095159.GF2067@n2100.arm.linux.org.uk> <5555CC1A.5040604@free.fr> <20150515115852.GJ2067@n2100.arm.linux.org.uk> <5555EA68.7030006@free.fr> <20150515131521.GK2067@n2100.arm.linux.org.uk> <5555FB7F.901@free.fr> <55563C63.8090504@free.fr> <5559CC01.9040306@free.fr> <20150518115452.GV2067@n2100.arm.linux.org.uk> In-Reply-To: <20150518115452.GV2067@n2100.arm.linux.org.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150520_092221_818966_76A92B27 X-CRM114-Status: GOOD ( 11.55 ) X-Spam-Score: -0.7 (/) Cc: Mans Rullgard , 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 Hello Russell, Thanks for your detailed answer. On 18/05/2015 13:54, Russell King - ARM Linux wrote: > For a SoC where WFI is not programmed to cause anything other than > the architecture specified dormant behaviour, WFI will not cause the > TWD to stop. According to the hardware engineers, my SoC does not support any low-power modes. But I didn't see the "clean" way to make the kernel aware of this. Is this an acceptable patch? (I have my doubts.) Regards. diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 6591e26..300f13a 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c @@ -295,6 +295,10 @@ static void twd_timer_setup(void) clk->name = "local_timer"; clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP; +#ifdef CONFIG_TANGOX + /*** Tango does not implement low power modes ***/ + clk->features &= ~CLOCK_EVT_FEAT_C3STOP; +#endif clk->rating = 350; clk->set_mode = twd_set_mode; clk->set_next_event = twd_set_next_event;