From patchwork Wed Jul 4 15:36:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 1156681 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 60E423FC36 for ; Wed, 4 Jul 2012 15:48:11 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SmRhb-0008LO-BG; Wed, 04 Jul 2012 15:41:20 +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 1SmRd5-000782-U3 for linux-arm-kernel@lists.infradead.org; Wed, 04 Jul 2012 15:36:40 +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 q64FaQOK027215; Wed, 4 Jul 2012 16:36:27 +0100 (BST) Date: Wed, 4 Jul 2012 16:36:24 +0100 From: Will Deacon To: Shinya Kuribayashi Subject: Re: [PATCH v2 2/2] ARM: delay: allow timer-based delay implementation to be selected Message-ID: <20120704153624.GI15104@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> <4FF2E0FB.4040008@renesas.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4FF2E0FB.4040008@renesas.com> 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 -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: "sboyd@codeaurora.org" , "magnus.damm@gmail.com" , "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 Tue, Jul 03, 2012 at 01:09:31PM +0100, Shinya Kuribayashi wrote: > Hello, Hi Shinya, > Looking at init/calibrate.c, 'lpj_fine' can save the first loop > calibration, but does not save the second and subsequent calls to > calibrate_delay(). > > Magnus first noticed this, and changed to use 'preset_lpj' instead. > See the commit 173bf69a7a (ARM / mach-shmobile: Use preset_lpj with > calibrate_delay(), 2012-05-10). > > If we use 'lpj_fine' for this, we need to skip secondary CPU calibration > explicitly in another way, something like this: > > http://lists.infradead.org/pipermail/linux-arm-kernel/2011-January/039506.html > [PATCH 5/5] ARM: smp: Skip secondary cpu calibration to speed-up boot How about keeping it simple like this:? Will diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c index e1030e1..84bb5da 100644 --- a/arch/arm/lib/delay.c +++ b/arch/arm/lib/delay.c @@ -63,4 +63,9 @@ void __init init_current_timer_delay(unsigned long freq) arm_delay_ops.const_udelay = __timer_const_udelay; arm_delay_ops.udelay = __timer_udelay; } + +unsigned long __cpuinit calibrate_delay_is_known(void) +{ + return lpj_fine ?: 0; +} #endif