linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	linux-kernel@vger.kernel.org,
	Boris Brezillon <boris.brezillon@bootlin.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v3 0/6] clocksource: rework Atmel TCB timer driver
Date: Tue, 27 Mar 2018 12:41:08 +0200	[thread overview]
Message-ID: <9761072.pX2B0LJlSJ@ada> (raw)
In-Reply-To: <20180223171558.7037-1-alexandre.belloni@bootlin.com>

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.

Greets
Alex

  parent reply	other threads:[~2018-03-27 10:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 17:15 [PATCH v3 0/6] clocksource: rework Atmel TCB timer driver Alexandre Belloni
2018-02-23 17:15 ` [PATCH v3 1/6] ARM: at91: add TCB registers definitions Alexandre Belloni
2018-02-23 17:15 ` [PATCH v3 2/6] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks Alexandre Belloni
2018-02-23 17:15 ` [PATCH v3 3/6] clocksource/drivers: atmel-pit: make option silent Alexandre Belloni
2018-02-23 17:15 ` [PATCH v3 4/6] ARM: at91: Implement clocksource selection Alexandre Belloni
2018-02-23 17:15 ` [PATCH v3 5/6] ARM: configs: at91: use new TCB timer driver Alexandre Belloni
2018-02-23 17:15 ` [PATCH v3 6/6] ARM: configs: at91: unselect PIT Alexandre Belloni
2018-03-22 15:33 ` [PATCH v3 0/6] clocksource: rework Atmel TCB timer driver Alexandre Belloni
2018-03-27 10:41 ` Alexander Dahl [this message]
2018-03-27 11:30   ` Daniel Lezcano
2018-03-28 10:29     ` Alexander Dahl
2018-03-28 13:03       ` Daniel Lezcano
2018-03-28 14:16         ` Alexandre Belloni
2018-03-28 14:36           ` Daniel Lezcano
2018-03-28 15:31             ` Alexandre Belloni
2018-03-28 15:50               ` Alexandre Belloni
2018-03-29  8:01                 ` Alexander Dahl
2018-03-29 10:45                   ` Alexandre Belloni
2018-03-29 11:31                     ` Alexander Dahl
2018-03-29 11:42                       ` Alexandre Belloni
2018-03-29 12:07                         ` Daniel Lezcano
2018-03-29 13:02                           ` Alexandre Belloni
2018-03-29 15:11                   ` Alexander Dahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9761072.pX2B0LJlSJ@ada \
    --to=ada@thorsis.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=boris.brezillon@bootlin.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).