diff options
| author | Ingo Molnar <mingo@kernel.org> | 2018-03-29 16:03:48 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2018-03-29 16:03:48 +0200 |
| commit | 2d074918fb1568f398777343ff9a28049fb86337 (patch) | |
| tree | 84277c1471f6d575a9515d42a53345666addabc8 /include/linux/u64_stats_sync.h | |
| parent | 78282bec4b4a02a13b87d01fbe529396d37db926 (diff) | |
| parent | f67b15037a7a50c57f72e69a6d59941ad90a0f0f (diff) | |
Merge branch 'perf/urgent' into perf/core
Conflicts:
kernel/events/hw_breakpoint.c
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/u64_stats_sync.h')
| -rw-r--r-- | include/linux/u64_stats_sync.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/u64_stats_sync.h b/include/linux/u64_stats_sync.h index 5bdbd9f49395..07ee0f84a46c 100644 --- a/include/linux/u64_stats_sync.h +++ b/include/linux/u64_stats_sync.h @@ -90,6 +90,28 @@ static inline void u64_stats_update_end(struct u64_stats_sync *syncp) #endif } +static inline unsigned long +u64_stats_update_begin_irqsave(struct u64_stats_sync *syncp) +{ + unsigned long flags = 0; + +#if BITS_PER_LONG==32 && defined(CONFIG_SMP) + local_irq_save(flags); + write_seqcount_begin(&syncp->seq); +#endif + return flags; +} + +static inline void +u64_stats_update_end_irqrestore(struct u64_stats_sync *syncp, + unsigned long flags) +{ +#if BITS_PER_LONG==32 && defined(CONFIG_SMP) + write_seqcount_end(&syncp->seq); + local_irq_restore(flags); +#endif +} + static inline void u64_stats_update_begin_raw(struct u64_stats_sync *syncp) { #if BITS_PER_LONG==32 && defined(CONFIG_SMP) |
