[PATCH 3/5] u64_stats: Introduce IRQs disabled helpers

2016-09-25 Thread Frederic Weisbecker
Introduce light versions of u64_stats helpers for context where either preempt or IRQs are disabled. This way we can make this library usable by scheduler irqtime accounting which currenty implement its ad-hoc version. Cc: Rik van Riel Cc: Paolo Bonzini Cc:

[PATCH 3/5] u64_stats: Introduce IRQs disabled helpers

2016-09-25 Thread Frederic Weisbecker
Introduce light versions of u64_stats helpers for context where either preempt or IRQs are disabled. This way we can make this library usable by scheduler irqtime accounting which currenty implement its ad-hoc version. Cc: Rik van Riel Cc: Paolo Bonzini Cc: Wanpeng Li Cc: Mike Galbraith Cc:

Re: [PATCH 3/5] u64_stats: Introduce IRQs disabled helpers

2016-09-18 Thread Frederic Weisbecker
On Fri, Sep 02, 2016 at 04:35:54PM +0200, Paolo Bonzini wrote: > > > On 02/09/2016 16:03, Frederic Weisbecker wrote: > > static inline unsigned int u64_stats_fetch_begin(const struct > > u64_stats_sync *syncp) > > { > > -#if BITS_PER_LONG==32 && defined(CONFIG_SMP) > > - return

Re: [PATCH 3/5] u64_stats: Introduce IRQs disabled helpers

2016-09-18 Thread Frederic Weisbecker
On Fri, Sep 02, 2016 at 04:35:54PM +0200, Paolo Bonzini wrote: > > > On 02/09/2016 16:03, Frederic Weisbecker wrote: > > static inline unsigned int u64_stats_fetch_begin(const struct > > u64_stats_sync *syncp) > > { > > -#if BITS_PER_LONG==32 && defined(CONFIG_SMP) > > - return

Re: [PATCH 3/5] u64_stats: Introduce IRQs disabled helpers

2016-09-02 Thread Paolo Bonzini
On 02/09/2016 16:03, Frederic Weisbecker wrote: > static inline unsigned int u64_stats_fetch_begin(const struct u64_stats_sync > *syncp) > { > -#if BITS_PER_LONG==32 && defined(CONFIG_SMP) > - return read_seqcount_begin(>seq); > -#else > -#if BITS_PER_LONG==32 > +#if BITS_PER_LONG==32 &&

Re: [PATCH 3/5] u64_stats: Introduce IRQs disabled helpers

2016-09-02 Thread Paolo Bonzini
On 02/09/2016 16:03, Frederic Weisbecker wrote: > static inline unsigned int u64_stats_fetch_begin(const struct u64_stats_sync > *syncp) > { > -#if BITS_PER_LONG==32 && defined(CONFIG_SMP) > - return read_seqcount_begin(>seq); > -#else > -#if BITS_PER_LONG==32 > +#if BITS_PER_LONG==32 &&

[PATCH 3/5] u64_stats: Introduce IRQs disabled helpers

2016-09-02 Thread Frederic Weisbecker
Introduce light versions of u64_stats helpers for context where either preempt or IRQs are disabled. This way we can make this library usable by scheduler irqtime accounting which currenty implement its ad-hoc version. Cc: Rik van Riel Cc: Paolo Bonzini Cc:

[PATCH 3/5] u64_stats: Introduce IRQs disabled helpers

2016-09-02 Thread Frederic Weisbecker
Introduce light versions of u64_stats helpers for context where either preempt or IRQs are disabled. This way we can make this library usable by scheduler irqtime accounting which currenty implement its ad-hoc version. Cc: Rik van Riel Cc: Paolo Bonzini Cc: Wanpeng Li Cc: Mike Galbraith Cc: