diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-07-22 10:22:02 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-07-22 10:22:02 +0200 |
commit | 015dc08918785201199ed3450c22bb8939f09dfe (patch) | |
tree | 7ba52e0b1e518fa750aaac0c1da8dd70c3eca1eb /include/asm-generic | |
parent | 9d246053a69196c7c27068870e9b4b66ac536f68 (diff) | |
parent | d136122f58458479fd8926020ba2937de61d7f65 (diff) | |
download | linux-015dc08918785201199ed3450c22bb8939f09dfe.tar.bz2 |
Merge branch 'sched/urgent'
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/mmiowb.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-generic/mmiowb.h b/include/asm-generic/mmiowb.h index 9439ff037b2d..5698fca3bf56 100644 --- a/include/asm-generic/mmiowb.h +++ b/include/asm-generic/mmiowb.h @@ -27,7 +27,7 @@ #include <asm/smp.h> DECLARE_PER_CPU(struct mmiowb_state, __mmiowb_state); -#define __mmiowb_state() this_cpu_ptr(&__mmiowb_state) +#define __mmiowb_state() raw_cpu_ptr(&__mmiowb_state) #else #define __mmiowb_state() arch_mmiowb_state() #endif /* arch_mmiowb_state */ @@ -35,7 +35,9 @@ DECLARE_PER_CPU(struct mmiowb_state, __mmiowb_state); static inline void mmiowb_set_pending(void) { struct mmiowb_state *ms = __mmiowb_state(); - ms->mmiowb_pending = ms->nesting_count; + + if (likely(ms->nesting_count)) + ms->mmiowb_pending = ms->nesting_count; } static inline void mmiowb_spin_lock(void) |