From patchwork Fri Jul 13 11:13:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 1195221 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 0E312DFFFD for ; Fri, 13 Jul 2012 11:17:56 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Spdp2-00069q-Ty; Fri, 13 Jul 2012 11:14:09 +0000 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Spdok-00066F-0Y for linux-arm-kernel@lists.infradead.org; Fri, 13 Jul 2012 11:13:51 +0000 Received: from mudshark.cambridge.arm.com (mudshark.cambridge.arm.com [10.1.79.58]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id q6DBDdOK016296; Fri, 13 Jul 2012 12:13:39 +0100 (BST) Date: Fri, 13 Jul 2012 12:13:37 +0100 From: Will Deacon To: "Shilimkar, Santosh" Subject: Re: [PATCH v2 2/2] ARM: delay: allow timer-based delay implementation to be selected Message-ID: <20120713111337.GH18079@mudshark.cambridge.arm.com> References: <1340991231-17682-1-git-send-email-will.deacon@arm.com> <1340991231-17682-3-git-send-email-will.deacon@arm.com> <4FFE7DB2.4040702@renesas.com> <20120712084432.GA2816@mudshark.cambridge.arm.com> <4FFE9A69.3060301@renesas.com> <4FFEFDE3.5000403@codeaurora.org> <4FFF8509.2050302@renesas.com> <20120713085746.GA18079@mudshark.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Thread-Topic: [PATCH v2 2/2] ARM: delay: allow timer-based delay implementation to be selected Accept-Language: en-GB, en-US Content-Language: en-US User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Note: CRM114 invocation failed X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.96.50 listed in list.dnswl.org] -0.0 T_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] Cc: Shinya Kuribayashi , "sboyd@codeaurora.org" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Fri, Jul 13, 2012 at 11:48:25AM +0100, Shilimkar, Santosh wrote: > Wiil, Hi Saantosh :), > On Fri, Jul 13, 2012 at 2:27 PM, Will Deacon wrote: > > That should work, providing you can get a sensible initial estimate for > > loops_per_jiffy. > > > Do you have an updated version of the patch ? I was anticipating that the platform would set the initial loops_per_jiffy value if it requires udelays before loop calibration and the default of 4k is wildly off. If people need loops_per_jiffy to be updated at the same time as lpj_fine, I can post that as a separate patch (below) as Russell has merged v2 of these patches into his delay branch. That said, I'd certainly like to know if this is actually a real problem (and can't be solved by choosing a compromise value as the initial loops_per_jiffy). I think Shinya was doing some tests so I'll wait to see how those went. Will ---8<--- diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c index d6dacc6..395d5fb 100644 --- a/arch/arm/lib/delay.c +++ b/arch/arm/lib/delay.c @@ -59,6 +59,7 @@ void __init init_current_timer_delay(unsigned long freq) { pr_info("Switching to timer-based delay loop\n"); lpj_fine = freq / HZ; + loops_per_jiffy = lpj_fine; arm_delay_ops.delay = __timer_delay; arm_delay_ops.const_udelay = __timer_const_udelay; arm_delay_ops.udelay = __timer_udelay;