generic: Use raw local irq variant for generic cmpxchg

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>
This commit is contained in:
Ingo Molnar 2009-07-03 08:29:30 -05:00 committed by Ingo Molnar
parent 9fb1b90ce0
commit 5042afe7fe
1 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ static inline unsigned long __cmpxchg_local_generic(volatile void *ptr,
if (size == 8 && sizeof(unsigned long) != 8) if (size == 8 && sizeof(unsigned long) != 8)
wrong_size_cmpxchg(ptr); wrong_size_cmpxchg(ptr);
local_irq_save(flags); raw_local_irq_save(flags);
switch (size) { switch (size) {
case 1: prev = *(u8 *)ptr; case 1: prev = *(u8 *)ptr;
if (prev == old) if (prev == old)
@ -42,7 +42,7 @@ static inline unsigned long __cmpxchg_local_generic(volatile void *ptr,
default: default:
wrong_size_cmpxchg(ptr); wrong_size_cmpxchg(ptr);
} }
local_irq_restore(flags); raw_local_irq_restore(flags);
return prev; return prev;
} }
@ -55,11 +55,11 @@ static inline u64 __cmpxchg64_local_generic(volatile void *ptr,
u64 prev; u64 prev;
unsigned long flags; unsigned long flags;
local_irq_save(flags); raw_local_irq_save(flags);
prev = *(u64 *)ptr; prev = *(u64 *)ptr;
if (prev == old) if (prev == old)
*(u64 *)ptr = new; *(u64 *)ptr = new;
local_irq_restore(flags); raw_local_irq_restore(flags);
return prev; return prev;
} }