Re: [PATCH 1/3 v2] time: Fix clock->read(clock) race around clocksource changes

2017-06-08 Thread John Stultz
On Sun, Jun 4, 2017 at 11:52 AM, Thomas Gleixner wrote: > On Wed, 31 May 2017, John Stultz wrote: >> >> The one exception where this helper isn't necessary is for the >> fast-timekepers which use their own locking and update logic >> to the tkr structures. > > That's simply wrong. The fast time ke

Re: [PATCH 1/3 v2] time: Fix clock->read(clock) race around clocksource changes

2017-06-04 Thread Thomas Gleixner
On Wed, 31 May 2017, John Stultz wrote: > In some testing on arm64 platforms, I was seeing null ptr > crashes in the kselftest/timers clocksource-switch test. > > This was happening in a read function like: > u64 clocksource_mmio_readl_down(struct clocksource *c) > { > return ~(u64)readl_rela

[PATCH 1/3 v2] time: Fix clock->read(clock) race around clocksource changes

2017-05-31 Thread John Stultz
In some testing on arm64 platforms, I was seeing null ptr crashes in the kselftest/timers clocksource-switch test. This was happening in a read function like: u64 clocksource_mmio_readl_down(struct clocksource *c) { return ~(u64)readl_relaxed(to_mmio_clksrc(c)->reg) & c->mask; } Where the cal