diff options
-rw-r--r-- | include/asm-cris/semaphore-helper.h | 9 | ||||
-rw-r--r-- | include/asm-cris/system.h | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/include/asm-cris/semaphore-helper.h b/include/asm-cris/semaphore-helper.h index a8e1e6cb7cd0..27bfeca1b981 100644 --- a/include/asm-cris/semaphore-helper.h +++ b/include/asm-cris/semaphore-helper.h | |||
@@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem) | |||
30 | unsigned long flags; | 30 | unsigned long flags; |
31 | int ret = 0; | 31 | int ret = 0; |
32 | 32 | ||
33 | local_save_flags(flags); | 33 | local_irq_save(flags); |
34 | local_irq_disable(); | ||
35 | if (read(&sem->waking) > 0) { | 34 | if (read(&sem->waking) > 0) { |
36 | dec(&sem->waking); | 35 | dec(&sem->waking); |
37 | ret = 1; | 36 | ret = 1; |
@@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem, | |||
46 | int ret = 0; | 45 | int ret = 0; |
47 | unsigned long flags; | 46 | unsigned long flags; |
48 | 47 | ||
49 | local_save_flags(flags); | 48 | local_irq_save(flags); |
50 | local_irq_disable(); | ||
51 | if (read(&sem->waking) > 0) { | 49 | if (read(&sem->waking) > 0) { |
52 | dec(&sem->waking); | 50 | dec(&sem->waking); |
53 | ret = 1; | 51 | ret = 1; |
@@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem) | |||
64 | int ret = 1; | 62 | int ret = 1; |
65 | unsigned long flags; | 63 | unsigned long flags; |
66 | 64 | ||
67 | local_save_flags(flags); | 65 | local_irq_save(flags); |
68 | local_irq_disable(); | ||
69 | if (read(&sem->waking) <= 0) | 66 | if (read(&sem->waking) <= 0) |
70 | inc(&sem->count); | 67 | inc(&sem->count); |
71 | else { | 68 | else { |
diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h index b869f6161aaa..fea0e8d57cb5 100644 --- a/include/asm-cris/system.h +++ b/include/asm-cris/system.h | |||
@@ -44,8 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
44 | /* since Etrax doesn't have any atomic xchg instructions, we need to disable | 44 | /* since Etrax doesn't have any atomic xchg instructions, we need to disable |
45 | irq's (if enabled) and do it with move.d's */ | 45 | irq's (if enabled) and do it with move.d's */ |
46 | unsigned long flags,temp; | 46 | unsigned long flags,temp; |
47 | local_save_flags(flags); /* save flags, including irq enable bit */ | 47 | local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */ |
48 | local_irq_disable(); /* shut off irq's */ | ||
49 | switch (size) { | 48 | switch (size) { |
50 | case 1: | 49 | case 1: |
51 | *((unsigned char *)&temp) = x; | 50 | *((unsigned char *)&temp) = x; |