Received: by 10.213.65.68 with SMTP id h4csp1506860imn; Thu, 29 Mar 2018 06:04:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx49D5VDrpSqs8/gregFICImV+gfS87oxqA1usevNLHKOls6WLFEuXam/JBZZQFE2TFNy5Yif X-Received: by 2002:a17:902:8c83:: with SMTP id t3-v6mr8346627plo.391.1522328684300; Thu, 29 Mar 2018 06:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522328684; cv=none; d=google.com; s=arc-20160816; b=nuv4GJpnI5FxlDO+T+5TX2WVqiCQ66utMyXvcCbIXuatdyF4R75bP3X/Xzid2FOAZz DED5MD4ciRS6xfG211iJjJMivve3pV/A/kBgURUB/C6WQ1+h48CzS8S0TCC0P82soKGK 8jejjpLbeqNG/FW3J1+FHigQ5GNvl0wQWI1d92mzq0mWsfAUU+bOKovllqpZFaBNlNfG tNX8VprxNu57TOTMbBB7zlDMmRfxCce3s23Tu5oaaFRfFoPq1BBSkYKtermXbk8Qj9FS ZpvSIn1xTIKPU+r0DLV1xUHX71VqnQwuZQMWIB06VABpGQ0qTLHyvyepLLaKJG/OUZJp tSCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=0tUr1F/W2/8IocZ9XcL55D55MTJGaZiiHWxVdXStO1o=; b=yOR86ZO6zT3669aFIYL17fFjF8zuqF2xSUTCmYoisuPfoAQkDvFTKw8Ah+0w1+TD+H 4FKvPvSsIAhTN2rsmyXLKu1ZKqch0nZFJdyV1RFuQ57zqTFS2DQEYtvUIKkHHapNlRBH /yLH426qnPpleKNHC+2evQt9bPS+RvobCrYbS9Sk0zM3PU32330rlidbSuCPV3/K3awP 5ZJUXw961DskkHXKSEw6ukTl6EPy3L4y079+MEZIvkHbzEdnN3jizf5ebSdGVZ90UT/L XNnJLpK093PN3iXHYsev+l35Gy0JhPyUp1EGCbyIyJIDbA9OuUmitHT0pKc6cd73MmmT 9YuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i72si3991697pgd.705.2018.03.29.06.04.28; Thu, 29 Mar 2018 06:04:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752611AbeC2NCW (ORCPT + 99 others); Thu, 29 Mar 2018 09:02:22 -0400 Received: from mail.bootlin.com ([62.4.15.54]:39766 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752278AbeC2NCW (ORCPT ); Thu, 29 Mar 2018 09:02:22 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id C1EAB2082C; Thu, 29 Mar 2018 15:02:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id 928C92037A; Thu, 29 Mar 2018 15:02:20 +0200 (CEST) Date: Thu, 29 Mar 2018 15:02:20 +0200 From: Alexandre Belloni To: Daniel Lezcano Cc: Alexander Dahl , linux-arm-kernel@lists.infradead.org, Boris Brezillon , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/6] clocksource: rework Atmel TCB timer driver Message-ID: <20180329130220.GM13942@piout.net> References: <20180223171558.7037-1-alexandre.belloni@bootlin.com> <3478710.yJBBt3uoRT@ada> <20180329104542.GK13942@piout.net> <3103570.fW0XyqvKVi@ada> <20180329114255.GL13942@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/03/2018 at 14:07:34 +0200, Daniel Lezcano wrote: > On 29/03/2018 13:42, Alexandre Belloni wrote: > > On 29/03/2018 at 13:31:18 +0200, Alexander Dahl wrote: > >> Pretty sure. I rebuilt the whole BSP and added another line to the kernel > >> source to see if the tree I applied the patches to, was actually built: > >> > >> > >> diff --git a/drivers/clocksource/timer-atmel-tcb.c b/drivers/clocksource/timer-atmel-tcb.c > >> index 7fde9cfbf203..f85affc74a86 100644 > >> --- a/drivers/clocksource/timer-atmel-tcb.c > >> +++ b/drivers/clocksource/timer-atmel-tcb.c > >> @@ -222,7 +222,8 @@ static int __init tc_clkevt_register(struct device_node *node, > >> goto err_slow; > >> clk_disable(tce.clk); > >> > >> - clockevents_config_and_register(&tce.clkevt, 32768, 1, bits - 1); > >> + pr_info( "*** bits: 0x%x, BIT(bits): 0x%lx\n", bits, BIT(bits) ); > >> + clockevents_config_and_register(&tce.clkevt, 32768, 1, BIT(bits) - 1); > >> > >> ret = request_irq(tce.irq, tc_clkevt2_irq, IRQF_TIMER | IRQF_SHARED, > >> tce.clkevt.name, &tce); > >> > >> > > > > I've just tested on a g20, old driver: > > INT NAME RATE MAX > > 16 [vel at91_tick,] 175 Ints/s (max: 231) > > 19 [ vel tc_clkevt] 129 Ints/s (max: 129) > > > > > > new driver: > > INT NAME RATE MAX > > 17 [vel timer@fffa] 129 Ints/s (max: 129) > > 18 [ vel ttyS0] 175 Ints/s (max: 231) > > Can you give in both platforms how fast the clocksource wraps up ? > sam9g20, old: clocksource: pit: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: 14370379250 ns sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 114963034405 ns sam9g20, new: clocksource: timer@fffa0000:0,1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 114963034405 ns sched_clock: 32 bits at 16MHz, resolution 60ns, wraps every 129171948513ns sama5d4, old: clocksource: pit: mask: 0x7ffffff max_cycles: 0x7ffffff, max_idle_ns: 10859434279 ns sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 173750949719 ns sama5d4, new: clocksource: timer@fc024000:0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 173750949719 ns sched_clock: 32 bits at 11MHz, resolution 90ns, wraps every 195225786322ns -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com