Received: by 10.213.65.68 with SMTP id h4csp548226imn; Tue, 27 Mar 2018 04:32:51 -0700 (PDT) X-Google-Smtp-Source: AG47ELstkwYLQtuzcT0xf2cMqvVBR514fit9FxzNSioXIkSN80qsiPpzUg0vx7G070SUU9IvenTy X-Received: by 2002:a17:902:108a:: with SMTP id c10-v6mr39693418pla.22.1522150371905; Tue, 27 Mar 2018 04:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522150371; cv=none; d=google.com; s=arc-20160816; b=dD/eTudUZtQyzqHJ56mAmpB3mGxDlDSRZNdU8WDkYGupqXmdIm+arRjAIx+cdGQrxc lPOr5kKb43A15QvJe8ZusiUMpU/JRe7T2mMi/xCcHPtICuY4ik1sQzgpdWoye4B5qhjj G7v6Vz/xPwPsL9/nF8qy6iO9t7eF2qKvYX/eTyoVa1agDsQz1p5pvlK7JbsJDZ9BRa5N 0LNb9cF8FnZSccXz6CHf3DMVx1Aw7lagC7DnOI8fKEAokfYwbdz67QLlXnWeAgFqka6p Qb4ok/rOXnfh164RS70FO4f4kKnatlJmZFl9328kR45c23yeXDmhdBXEeS4+wn7WGxvE GZ+w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=jRZtjI/B7B0cGVTXmp+i96FVNv8VLwPcBMfBBi9i9Bg=; b=rSNDRfBWH9ToIIr1Fvm2x0NMIeLalzIAU8/o/CecwStcXBWK2oYTjGRrzlMtCZi0aI gDi27RxqESJyphtSdVoL0pA2tcuqXRXUb6dkqfF70/yd/pNAIWpKipHGrxHyEPkaLXWh ldOTaqGuTQukoyGLuLLucUQLi18vCRtbvp7VYrZaFGeRnfdEUHmi5/EST83EW1r5rmrS mHg8PbHZsh5gj+m4GWJCR9rgrVotzUpiERntwnffMhxbu8MqhJz+dIuPRRIlMHblCknK cnZb2cdh+Cd482J6kv/e2PXhE5JJgLW5Yyv9HJ6Q3fZFLKazJ8LDN5PjR14Z/XmbHAfe PIbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JXTtVqZv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si704347pgv.668.2018.03.27.04.32.34; Tue, 27 Mar 2018 04:32:51 -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; dkim=pass header.i=@linaro.org header.s=google header.b=JXTtVqZv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752055AbeC0La1 (ORCPT + 99 others); Tue, 27 Mar 2018 07:30:27 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:52933 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120AbeC0LaZ (ORCPT ); Tue, 27 Mar 2018 07:30:25 -0400 Received: by mail-wm0-f67.google.com with SMTP id l9so21035883wmh.2 for ; Tue, 27 Mar 2018 04:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jRZtjI/B7B0cGVTXmp+i96FVNv8VLwPcBMfBBi9i9Bg=; b=JXTtVqZv4rMA6P+hC+yBqloKfaPGVtWxcuw6D5ALevhAUUz/qpsvE59ZmfZgNXC8Os iEOKkl7gHLaU9fDWBwkhQ96G+gkg5U45u5bIPFNuBDELIFQtWp+39vyHpMaL3/cL0SrF IdO842QTL4NdtVWOO0OOVwsVYJzbe5GVvRiVk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jRZtjI/B7B0cGVTXmp+i96FVNv8VLwPcBMfBBi9i9Bg=; b=So5Kxx4O4qwvhlscfON/nOlSz+qS9qZydtPdPaFpin8v4B3tvP9vFie/sdAQmIMBGO SmS9q8olNyAcODQ+FBHxzs2dMLg88zXfR+6xi6J+yPJt+33C+dnJqAMV/uBla0WwERiz qR1FAqfCKgO63r/kuF9BR1dEFN7LdyZ8mzDWEiRtuGNZd0/kOBYhV9Rkf/j2yDeCRtwe rA0rQ7J7Hlo64/5jUf8Aja6e9NoGXiKn7wfkXn7aytqVK6nbcerwhjDAOToDe5kn+cRv pwkpHXdZa5R7XOM0tdHfA8zyg3Dvmuq+XhEA9t3J9VK7hcWBmy7bMm6c3AtVmlt98pZ5 GDbA== X-Gm-Message-State: AElRT7HRDKYnB49nUrNq+Vjqq46al58Kao9Lc1Bq9ZPmtDUnfuSiTTPs 6uiHOrg6LFfpGfmXG7M1mgz0Lg== X-Received: by 10.80.190.66 with SMTP id b2mr14053560edi.161.1522150224366; Tue, 27 Mar 2018 04:30:24 -0700 (PDT) Received: from ?IPv6:2001:41d0:fe90:b800:b0a9:da92:8c72:d9e2? ([2001:41d0:fe90:b800:b0a9:da92:8c72:d9e2]) by smtp.googlemail.com with ESMTPSA id 64sm706472edh.79.2018.03.27.04.30.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 04:30:23 -0700 (PDT) Subject: Re: [PATCH v3 0/6] clocksource: rework Atmel TCB timer driver To: Alexander Dahl , linux-arm-kernel@lists.infradead.org Cc: Alexandre Belloni , linux-kernel@vger.kernel.org, Boris Brezillon , Thomas Gleixner References: <20180223171558.7037-1-alexandre.belloni@bootlin.com> <9761072.pX2B0LJlSJ@ada> From: Daniel Lezcano Message-ID: <989df8a3-462a-c645-87f1-9f956e1b22c9@linaro.org> Date: Tue, 27 Mar 2018 13:30:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <9761072.pX2B0LJlSJ@ada> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/03/2018 12:41, Alexander Dahl wrote: > Hello Alexandre, > > Am Freitag, 23. Februar 2018, 18:15:52 CEST schrieb Alexandre Belloni: >> - using the PIT doesn't work well with preempt-rt because its interrupt is >> shared (in particular with the UART and their interrupt flags are >> incompatible) > > This is actually quite annoying when using the UART as a serial console, > producing garbage when you type too fast. That's why I tested this patch > series (on top of v4.16-rc7). Target is a at91sam9g20 based board, quite close > to, but not actually an at91sam9g20-ek. > > First test was with the previous kernel config updated by oldconfig, so > basically still using the PIT: > > +CONFIG_ATMEL_CLOCKSOURCE_PIT=y > > On the serial console with v4.16 and the patch set without switching to the > new options, I see this on boot (no surprise, this is what it also prints with > v4.9): > > clocksource: pit: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: > 14468723050 ns > … > clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: > 19112604462750000 ns > … > clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, > max_idle_ns: 115749784805 ns > … > clocksource: Switched to clocksource tcb_clksrc > > Interrupts here: > > $ cat /proc/interrupts > CPU0 > 16: 4802 atmel-aic 1 Level at91_tick, rtc0, ttyS0 > 19: 24041 atmel-aic 19 Level tc_clkevt > 26: 124 atmel-aic 21 Level eth0 > 28: 1 GPIO 11 Edge reset > Err: 0 > > Second test with tcb block added to dts like in > 32ce250b0af3b6971fc746445fce87861a9f5628 and with changed kernel config > according to defconfig changes in patch 5 and 6: > > +# CONFIG_ATMEL_CLOCKSOURCE_PIT is not set > +CONFIG_ATMEL_CLOCKSOURCE_TCB=y > -CONFIG_ATMEL_TCLIB=y > -CONFIG_ATMEL_TCB_CLKSRC=y > -CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 > +# CONFIG_ATMEL_TCLIB is not set > -CONFIG_ATMEL_PIT=y > +CONFIG_ATMEL_ARM_TCB_CLKSRC=y > -CONFIG_PWM_ATMEL_TCB=m > > The output on the serial console contains this: > > clocksource: timer@fffa0000:0,1: mask: 0xffffffff max_cycles: 0xffffffff, > max_idle_ns: 115749784805 ns > … > clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: > 19112604462750000 ns > … > clocksource: Switched to clocksource timer@fffa0000:0,1 > > Interrupts here: > > $ cat /proc/interrupts > CPU0 > 17: 5727291 atmel-aic 19 Level timer@fffa0000:2 > 18: 5523 atmel-aic 1 Level rtc0, ttyS0 > 26: 5031 atmel-aic 21 Level eth0 > 28: 1 GPIO 11 Edge reset > Err: 0 > > So, the board boots and runs like usual. I don't know if that qualifies for a > Tested-by? Hope that helps. Can you can give a rough amount for the irq rate on the timer ? -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog