UPSTREAM: irq_work: Convert flags to atomic_t

We need to convert flags to atomic_t in order to later fix an ordering
issue on atomic_cmpxchg() failure. This will allow us to use atomic_fetch_or().

Also clarify the nature of those flags.

[ mingo: Converted two more usage site the original patch missed. ]

Change-Id: Iffe159596630a7996d1570dee5bc3cf73ddff1de
Signed-off-by: Frederic Weisbecker <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Paul E . McKenney <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
Frederic Weisbecker 2019-11-08 17:08:55 +01:00 • committed by basamaryan
commit a715b8b52d
No known key found for this signature in database
GPG key ID: 210D5384FB2A5885
5 changed files with 19 additions and 15 deletions

View file

@ -3060,7 +3060,7 @@ static void wake_up_klogd_work_func(struct irq_work *irq_work)
static DEFINE_PER_CPU(struct irq_work, wake_up_klogd_work) = {
.func = wake_up_klogd_work_func,
.flags = IRQ_WORK_LAZY,
.flags = ATOMIC_INIT(IRQ_WORK_LAZY),
};
void wake_up_klogd(void)