[PATCH] CRIS: turn local_save_flags() + local_irq_disable() into local_irq_save(...
authorJiri Kosina <jkosina@suse.cz>
Sat, 10 Feb 2007 09:43:50 +0000 (01:43 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 11 Feb 2007 18:51:20 +0000 (10:51 -0800)
Various headers for CRIS architecture contain local_irq_disable() after
local_save_flags().  Turn it into local_irq_save().

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/asm-cris/semaphore-helper.h
include/asm-cris/system.h

index a8e1e6cb7cd02f816823b22261808e53bbb290bd..27bfeca1b981a5b8fa343a76796aa38ef8f8c90e 100644 (file)
@@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem)
        unsigned long flags;
        int ret = 0;
 
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
        if (read(&sem->waking) > 0) {
                dec(&sem->waking);
                ret = 1;
@@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem,
        int ret = 0;
        unsigned long flags;
 
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
        if (read(&sem->waking) > 0) {
                dec(&sem->waking);
                ret = 1;
@@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem)
         int ret = 1;
        unsigned long flags;
 
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
        if (read(&sem->waking) <= 0)
                inc(&sem->count);
        else {
index b869f6161aaa1c73e770fb2f238eecc7894654d9..fea0e8d57cb51883f5d0c31202ef33ed089f863d 100644 (file)
@@ -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
      irq's (if enabled) and do it with move.d's */
   unsigned long flags,temp;
-  local_save_flags(flags); /* save flags, including irq enable bit */
-  local_irq_disable();             /* shut off irq's */
+  local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */
   switch (size) {
   case 1:
     *((unsigned char *)&temp) = x;