Skip to content

Commit

Permalink
generic: Use raw local irq variant for generic cmpxchg
Browse files Browse the repository at this point in the history
The interrupt disabled region is extremly tiny and therefor not
latency relevant. Avoid cluttering the traces with those pointless
entries.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Ingo Molnar authored and Ingo Molnar committed Feb 19, 2013
1 parent 9fb1b90 commit 5042afe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/asm-generic/cmpxchg-local.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static inline unsigned long __cmpxchg_local_generic(volatile void *ptr,
if (size == 8 && sizeof(unsigned long) != 8)
wrong_size_cmpxchg(ptr);

local_irq_save(flags);
raw_local_irq_save(flags);
switch (size) {
case 1: prev = *(u8 *)ptr;
if (prev == old)
Expand All @@ -42,7 +42,7 @@ static inline unsigned long __cmpxchg_local_generic(volatile void *ptr,
default:
wrong_size_cmpxchg(ptr);
}
local_irq_restore(flags);
raw_local_irq_restore(flags);
return prev;
}

Expand All @@ -55,11 +55,11 @@ static inline u64 __cmpxchg64_local_generic(volatile void *ptr,
u64 prev;
unsigned long flags;

local_irq_save(flags);
raw_local_irq_save(flags);
prev = *(u64 *)ptr;
if (prev == old)
*(u64 *)ptr = new;
local_irq_restore(flags);
raw_local_irq_restore(flags);
return prev;
}

Expand Down

0 comments on commit 5042afe

Please sign in to comment.