public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Romain Izard <romain.izard.pro@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] tcb_clksrc: Use 32 bit tcb as sched_clock
Date: Tue, 17 Jan 2017 14:44:03 +0000 (UTC)	[thread overview]
Message-ID: <o5laji$kb7$1@blaine.gmane.org> (raw)
In-Reply-To: 20170111135059.21318-1-david.engraf@sysgo.com

On 2017-01-11, David Engraf <david.engraf@sysgo.com> wrote:
> On newer boards the TC can be read as single 32 bit value without locking.
> Thus the clock can be used as reference for sched_clock which is much more
> accurate than the jiffies implementation.
>
> Tested on a Atmel SAMA5D2 board.
>
> Signed-off-by: David Engraf <david.engraf@sysgo.com>

Unfortunately, this leads to the current boot warning:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at ../kernel/time/sched_clock.c:179 sched_clock_register+0x4c/0x21c
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.4-00041-ge780a8100f0d #1
Hardware name: Atmel SAMA5
[<c01103e4>] (unwind_backtrace) from [<c010d0e4>] (show_stack+0x20/0x24)
[<c010d0e4>] (show_stack) from [<c039c130>] (dump_stack+0x24/0x28)
[<c039c130>] (dump_stack) from [<c011f7b0>] (__warn+0xf4/0x10c)
[<c011f7b0>] (__warn) from [<c011f898>] (warn_slowpath_null+0x30/0x38)
[<c011f898>] (warn_slowpath_null) from [<c0c0d2c0>] (sched_clock_register+0x4c/0x21c)
[<c0c0d2c0>] (sched_clock_register) from [<c0c345fc>] (tcb_clksrc_init+0x1c8/0x424)
[<c0c345fc>] (tcb_clksrc_init) from [<c0101cdc>] (do_one_initcall+0x50/0x184)
[<c0101cdc>] (do_one_initcall) from [<c0c00e70>] (kernel_init_freeable+0x13c/0x1e0)
[<c0c00e70>] (kernel_init_freeable) from [<c08303ec>] (kernel_init+0x18/0x124)
[<c08303ec>] (kernel_init) from [<c0108c34>] (ret_from_fork+0x14/0x20)
---[ end trace 3d13186881cd5c91 ]---

"sched_clock_register" expects to be called with interrupts disabled, but
the tcb_clksrc initialization is called as an arch_initcall, which runs too
late in the boot sequence.

Best regards,
-- 
Romain Izard

  parent reply	other threads:[~2017-01-17 14:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 13:50 [PATCH] tcb_clksrc: Use 32 bit tcb as sched_clock David Engraf
     [not found] ` <e9fa8375-70e9-e621-954e-48c3190171ad@linaro.org>
2017-01-17  9:29   ` David Engraf
2017-01-17  9:42 ` Mason
2017-01-17 14:44 ` Romain Izard [this message]
2017-01-23 13:59 ` Daniel Lezcano
2017-01-24 13:39   ` Nicolas Ferre
2017-01-24 13:39 ` Nicolas Ferre

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='o5laji$kb7$1@blaine.gmane.org' \
    --to=romain.izard.pro@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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