aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/cmpxchg-local.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-07-03 09:29:30 -0400
committerIngo Molnar <mingo@kernel.org>2013-02-19 02:43:37 -0500
commit5042afe7fe32390e79910ecd0a1f0563d4bca38c (patch)
tree7a86a70e811f7f89786ee79fd021ad7ae53063cf /include/asm-generic/cmpxchg-local.h
parent9fb1b90ce0a847a8cc9492a6c1f347b5be1f33ff (diff)
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>
Diffstat (limited to 'include/asm-generic/cmpxchg-local.h')
-rw-r--r--include/asm-generic/cmpxchg-local.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-generic/cmpxchg-local.h b/include/asm-generic/cmpxchg-local.h
index 2533fddd34a6..d8d4c898c1bb 100644
--- a/include/asm-generic/cmpxchg-local.h
+++ b/include/asm-generic/cmpxchg-local.h
@@ -21,7 +21,7 @@ static inline unsigned long __cmpxchg_local_generic(volatile void *ptr,
21 if (size == 8 && sizeof(unsigned long) != 8) 21 if (size == 8 && sizeof(unsigned long) != 8)
22 wrong_size_cmpxchg(ptr); 22 wrong_size_cmpxchg(ptr);
23 23
24 local_irq_save(flags); 24 raw_local_irq_save(flags);
25 switch (size) { 25 switch (size) {
26 case 1: prev = *(u8 *)ptr; 26 case 1: prev = *(u8 *)ptr;
27 if (prev == old) 27 if (prev == old)
@@ -42,7 +42,7 @@ static inline unsigned long __cmpxchg_local_generic(volatile void *ptr,
42 default: 42 default:
43 wrong_size_cmpxchg(ptr); 43 wrong_size_cmpxchg(ptr);
44 } 44 }
45 local_irq_restore(flags); 45 raw_local_irq_restore(flags);
46 return prev; 46 return prev;
47} 47}
48 48
@@ -55,11 +55,11 @@ static inline u64 __cmpxchg64_local_generic(volatile void *ptr,
55 u64 prev; 55 u64 prev;
56 unsigned long flags; 56 unsigned long flags;
57 57
58 local_irq_save(flags); 58 raw_local_irq_save(flags);
59 prev = *(u64 *)ptr; 59 prev = *(u64 *)ptr;
60 if (prev == old) 60 if (prev == old)
61 *(u64 *)ptr = new; 61 *(u64 *)ptr = new;
62 local_irq_restore(flags); 62 raw_local_irq_restore(flags);
63 return prev; 63 return prev;
64} 64}
65 65