Commit 047c7c42 authored by Jiri Kosina's avatar Jiri Kosina Committed by Linus Torvalds

[PATCH] CRIS: turn local_save_flags() + local_irq_disable() into local_irq_save() in headers

Various headers for CRIS architecture contain local_irq_disable() after
local_save_flags().  Turn it into local_irq_save().
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7c101b7b
...@@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem) ...@@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem)
unsigned long flags; unsigned long flags;
int ret = 0; int ret = 0;
local_save_flags(flags); local_irq_save(flags);
local_irq_disable();
if (read(&sem->waking) > 0) { if (read(&sem->waking) > 0) {
dec(&sem->waking); dec(&sem->waking);
ret = 1; ret = 1;
...@@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem, ...@@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem,
int ret = 0; int ret = 0;
unsigned long flags; unsigned long flags;
local_save_flags(flags); local_irq_save(flags);
local_irq_disable();
if (read(&sem->waking) > 0) { if (read(&sem->waking) > 0) {
dec(&sem->waking); dec(&sem->waking);
ret = 1; ret = 1;
...@@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem) ...@@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem)
int ret = 1; int ret = 1;
unsigned long flags; unsigned long flags;
local_save_flags(flags); local_irq_save(flags);
local_irq_disable();
if (read(&sem->waking) <= 0) if (read(&sem->waking) <= 0)
inc(&sem->count); inc(&sem->count);
else { else {
......
...@@ -44,8 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz ...@@ -44,8 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
/* since Etrax doesn't have any atomic xchg instructions, we need to disable /* since Etrax doesn't have any atomic xchg instructions, we need to disable
irq's (if enabled) and do it with move.d's */ irq's (if enabled) and do it with move.d's */
unsigned long flags,temp; unsigned long flags,temp;
local_save_flags(flags); /* save flags, including irq enable bit */ local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */
local_irq_disable(); /* shut off irq's */
switch (size) { switch (size) {
case 1: case 1:
*((unsigned char *)&temp) = x; *((unsigned char *)&temp) = x;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment