Received: by 10.213.65.68 with SMTP id h4csp1260698imn; Thu, 29 Mar 2018 01:02:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/eAQDGx817IH2y08bNRCFaCqqAucfrKbIPqC1ji73q1l1ueWmm5CGQOmGL2Npdg6jqLOTu X-Received: by 2002:a17:902:ab86:: with SMTP id f6-v6mr2054747plr.258.1522310565945; Thu, 29 Mar 2018 01:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522310565; cv=none; d=google.com; s=arc-20160816; b=KSwcFaYylTDOQJ5FP8p9ReXqcVdvNBv+VDfUPsq+2ODHJOcorotWaCht42LYDkCQj0 vXzhUz6f+4W+FYhFQet6DQSgQq8ycYaOvTdI5zZa2z/lH4XSWl1AzNPOa4dWbWrv1wla Nc8t3RSOyaw71buvOhE8E57guojzMYVlTL5oKO45Bb2ZReSyIo+hHME21q7cMDeC12ny aZPfvjhG63Un7miFxuLWI0gLBGqPtVVgVZoqfba8MHKWEBThPAtMJ4KVi7c4J6cfPHmR M8UAbmenawf7yKwsSctJ/9g+cthwPUAtbGdJBLd5nwhachYG52NkoA4H6CWO31S75JQn g43Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6hB3gvpIwXLE/mGcIFmhC4gnF83ZTilXdDFUJqZuN1Y=; b=p9ZraSVwkpejDScGrqWuXUW3dWy0m9GTuB+rT/fThPG/OVZpY+kEtJ56217fZpQrUS de63KI9ZBXzRswxDyMsF/A3V99lAjrGU2tEtzmvTjrnO6+fsrrCFjIhmjtagsWuzt5yd 0Wr/Cygy8HBEO/hlwcH/Gi+aMbCf9UvOrBPXy3TJnr2cSxF3tqGYe8jGYf/k687gdLn6 3FGpNS7sV7lOysg5eZuH/o8GIdJNroQw975bwIZpOToG4QPlE3cdx41R9QYplzWbkUec 68tmHTLZAwpmsfN2LGMGBZyQoGhFvfPU6nfzI9DJLQ3XTlGz/iqoS0HunhuAUfSD0OLW yjHQ== 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 s9si3651503pgr.708.2018.03.29.01.02.31; Thu, 29 Mar 2018 01:02:45 -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 S1752105AbeC2IBb (ORCPT + 99 others); Thu, 29 Mar 2018 04:01:31 -0400 Received: from mail.thorsis.com ([92.198.35.195]:41247 "EHLO mail.thorsis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbeC2IBa (ORCPT ); Thu, 29 Mar 2018 04:01:30 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.thorsis.com (Postfix) with ESMTP id E0D0F3A4513; Thu, 29 Mar 2018 10:01:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.thorsis.com Received: from mail.thorsis.com ([127.0.0.1]) by localhost (mail.thorsis.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rjpdq4FnBJH7; Thu, 29 Mar 2018 10:01:31 +0200 (CEST) From: Alexander Dahl To: Alexandre Belloni Cc: Daniel Lezcano , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Boris Brezillon , Thomas Gleixner Subject: Re: [PATCH v3 0/6] clocksource: rework Atmel TCB timer driver Date: Thu, 29 Mar 2018 10:01:26 +0200 Message-ID: <3478710.yJBBt3uoRT@ada> In-Reply-To: <20180328155033.GH13942@piout.net> References: <20180223171558.7037-1-alexandre.belloni@bootlin.com> <20180328153135.GG13942@piout.net> <20180328155033.GH13942@piout.net> Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on seven.thorsis.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hei hei, Am Mittwoch, 28. M=E4rz 2018, 17:50:33 CEST schrieb Alexandre Belloni: > On 28/03/2018 at 17:31:35 +0200, Alexandre Belloni wrote: > > > Do you have an explanation of why the rate is much higher ? > >=20 > > The core is giving deltas of 31 clocks instead of much more than that, I > > guess I messed up the initialization somewhere. >=20 > I did mess up. >=20 > Alexander, can you test that: Well, I just did. >=20 > diff --git a/drivers/clocksource/timer-atmel-tcb.c > b/drivers/clocksource/timer-atmel-tcb.c index 7fde9cfbf203..bbbacf8c46b0 > 100644 > --- a/drivers/clocksource/timer-atmel-tcb.c > +++ b/drivers/clocksource/timer-atmel-tcb.c > @@ -222,7 +222,7 @@ static int __init tc_clkevt_register(struct device_no= de > *node, goto err_slow; > clk_disable(tce.clk); >=20 > - clockevents_config_and_register(&tce.clkevt, 32768, 1, bits - 1); > + clockevents_config_and_register(&tce.clkevt, 32768, 1, BIT(bits) - 1); >=20 > ret =3D request_irq(tce.irq, tc_clkevt2_irq, IRQF_TIMER | IRQF_SHARED, > tce.clkevt.name, &tce); >=20 > This will behave exactly the same as before on 16bits TCB and will have > much less interrupts on 32 bits platforms. This is the result: INT NAME RATE MAX 17 [vel timer@fffa] 1837 Ints/s (max: 1912) 26 [ vel eth0] 3 Ints/s (max: 11) This is not much lower than the ~2150 I reported yesterday? I'm sorry I can just test this on at91sam9g20 currently, I have no=20 understanding of the subsystem, I can't do a decent review. Greets Alex