From patchwork Fri Oct 12 16:42:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 191161 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DE9752C0089 for ; Sat, 13 Oct 2012 03:44:44 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TMiJj-00016g-0p; Fri, 12 Oct 2012 16:42:31 +0000 Received: from mail-ee0-f49.google.com ([74.125.83.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TMiJf-00015n-Kt for linux-arm-kernel@lists.infradead.org; Fri, 12 Oct 2012 16:42:28 +0000 Received: by mail-ee0-f49.google.com with SMTP id c1so1872213eek.36 for ; Fri, 12 Oct 2012 09:42:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent:x-gm-message-state; bh=FN+BrLZ7JBBemxCx2HlboOpUYmrsrGK/6yfMg0WsKls=; b=ZNGcsaZpMkb+yf9xWVCBYzKg6cU6Xhhj4Y9BPm/1iDK16RAeVgm29ADtQUs8tcs4bp pfxptL3LRRwmD7Q5EyZ4CzJeMcwPJ8OR0O9+1xB0xwvhy0fUqwZ8gAGo7pq3EIVM3pm7 7M1rkfk/nKunM/jcnVOfDi3CQtJ6k3t624xXZ7Q4Tf9ec/t9+9MaldJ5MKKipUqPmXG8 IR/PpUBwwiPHr2ECsOCo+9zuvNYFEitoLATgNcxNYekHdX4sy/DKYUyvv1b+oYeaCr2J eEtrowbL4MPHvBiOHq0QjGYPvXsyt8GtzKMW49iCki/jdpW6FsepLjmXKZdyjX86lBJ8 fotA== Received: by 10.14.179.136 with SMTP id h8mr7532099eem.6.1350060145280; Fri, 12 Oct 2012 09:42:25 -0700 (PDT) Received: from gmail.com (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id i41sm12480143eem.7.2012.10.12.09.42.23 (version=SSLv3 cipher=OTHER); Fri, 12 Oct 2012 09:42:24 -0700 (PDT) Date: Fri, 12 Oct 2012 17:42:21 +0100 From: Lee Jones To: Dan Murphy Subject: Re: [PATCH] Boottime: A tool for automatic measurement of kernel/bootloader boot time Message-ID: <20121012164221.GN12567@gmail.com> References: <1349966545-19340-1-git-send-email-lee.jones@linaro.org> <20121012134542.GH12567@gmail.com> <20121012134813.GK21164@n2100.arm.linux.org.uk> <201210121353.16798.arnd@arndb.de> <20121012140149.GJ12567@gmail.com> <50784729.4030302@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <50784729.4030302@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQl8g1bUoBmy7ZkmOTZSTRk/lvhGmqkMBK5Us/K7kcKm2FdypeUUE+jydQ2FznU4iZSq1ScS X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.49 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Nishanth Menon , Russell King - ARM Linux , linus.walleij@stericsson.com, Arnd Bergmann , Greg Kroah-Hartman , Will Deacon , linux-kernel@vger.kernel.org, Mian Yousaf Kaukab , Jonas Aaberg , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org On Fri, 12 Oct 2012, Dan Murphy wrote: > > On 10/12/2012 09:01 AM, Lee Jones wrote: > >On Fri, 12 Oct 2012, Arnd Bergmann wrote: > > > >>On Friday 12 October 2012, Russell King - ARM Linux wrote: > >>>>root@ME:/ cat /sys/kernel/debug/boottime/bootgraph > >>>>[ 0.185254] calling splash+0x0/0x0 > >>>>[ 2.984335] initcall splash+0x0/0x0 returned 0 after 2799 msecs. > >>>>[ 2.984335] calling autoboot_delay+0x0/0x0 > >>>>[ 4.089513] initcall autoboot_delay+0x0/0x0 returned 0 after 1105 msecs. > >>>>[ 4.089513] calling load_kernel+0x0/0x0 > >>>>[ 4.239174] initcall load_kernel+0x0/0x0 returned 0 after 149 msecs. > >>>>[ 4.239174] calling boot_kernel+0x0/0x0 > >>>>[ 4.276260] initcall boot_kernel+0x0/0x0 returned 0 after 37 msecs. > >>>>[ 4.276260] calling uncompress_ll_init+0x0/0x0 > >>>>[ 4.276260] initcall uncompress_ll_init+0x0/0x0 returned 0 after 0 msecs. > >>>>[ 4.276260] Freeing init memory: 0K > >>>Umm, what happened to sysfs not becoming procfs v2? I thought we had > >>>a fairly strict requirement for "one value per file and not nicely > >>>formatted" for sysfs? > >>> > >>I was thinking the same thing at first, but then I noticed it's actually > >>debugfs, which has no such rules. > >Right. :) > > > OK I don't see when boottime_activate is called. > > Where would this call actually be made from? > > I see the call to deactivate but no call to activate. Here perhaps (Jonas, alerted me to the missing patch): commit 4c49a18bcfd2d041cbad7f41c6e6b39d90008382 (HEAD, refs/heads/dt-snowball-pre-rc1) Author: Jonas Aaberg Date: Wed Sep 14 09:29:20 2011 +0200 drivers: clocksource: dbx500-prcmu: Add boottime support Change-Id: I9b5e3d050131c08c08786ae84cb76619c0525049 Signed-off-by: Jonas Aaberg Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32055 diff --git a/drivers/clocksource/clksrc-dbx500-prcmu.c b/drivers/clocksource/clksrc-dbx500-prcmu.c index c26c369..0069cd9 100644 --- a/drivers/clocksource/clksrc-dbx500-prcmu.c +++ b/drivers/clocksource/clksrc-dbx500-prcmu.c @@ -14,6 +14,7 @@ */ #include #include +#include #include @@ -68,6 +69,23 @@ static u32 notrace dbx500_prcmu_sched_clock_read(void) #endif +#ifdef CONFIG_BOOTTIME +static unsigned long __init boottime_get_time(void) +{ + return div_s64(clocksource_cyc2ns(clocksource_dbx500_prcmu.read( + &clocksource_dbx500_prcmu), + clocksource_dbx500_prcmu.mult, + clocksource_dbx500_prcmu.shift), + 1000); +} + +static struct boottime_timer __initdata boottime_timer = { + .init = NULL, + .get_time = boottime_get_time, + .finalize = NULL, +}; +#endif + void __init clksrc_dbx500_prcmu_init(void __iomem *base) { clksrc_dbx500_timer_base = base; @@ -90,4 +108,6 @@ void __init clksrc_dbx500_prcmu_init(void __iomem *base) 32, RATE_32K); #endif clocksource_register_hz(&clocksource_dbx500_prcmu, RATE_32K); + + boottime_activate(&boottime_timer); }