Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1560662
| From | Romain Izard <romain.izard.pro@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] tcb_clksrc: Use 32 bit tcb as sched_clock |
| Date | 2017-01-17 15:50 +0100 |
| Message-ID | <t0Dfb-8i5-3@gated-at.bofh.it> (permalink) |
| References | <sYrBv-7Bc-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] tcb_clksrc: Use 32 bit tcb as sched_clock Romain Izard <romain.izard.pro@gmail.com> - 2017-01-17 15:50 +0100
csiph-web