summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/atomic.h21
-rw-r--r--include/asm-mips64/atomic.h6
2 files changed, 8 insertions, 19 deletions
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h
index e4084d577..6bb29f1b7 100644
--- a/include/asm-mips/atomic.h
+++ b/include/asm-mips/atomic.h
@@ -80,21 +80,6 @@ extern __inline__ int atomic_sub_return(int i, atomic_t * v)
return temp;
}
-extern __inline__ void atomic_clear_mask(unsigned long mask, unsigned long * v)
-{
- unsigned long temp;
- int flags;
-
- save_flags(flags);
- cli();
- temp = *v;
- temp &= ~mask;
- *v = temp;
- restore_flags(flags);
-
- return;
-}
-
#else
/*
@@ -144,7 +129,8 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v)
"addu\t%0,%1,%3\n\t"
".set\treorder"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
- : "Ir" (i), "m" (v->counter));
+ : "Ir" (i), "m" (v->counter)
+ : "memory");
return result;
}
@@ -162,7 +148,8 @@ extern __inline__ int atomic_sub_return(int i, atomic_t * v)
"subu\t%0,%1,%3\n\t"
".set\treorder"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
- : "Ir" (i), "m" (v->counter));
+ : "Ir" (i), "m" (v->counter)
+ : "memory");
return result;
}
diff --git a/include/asm-mips64/atomic.h b/include/asm-mips64/atomic.h
index 0ed12d406..bef7dfef7 100644
--- a/include/asm-mips64/atomic.h
+++ b/include/asm-mips64/atomic.h
@@ -66,7 +66,8 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v)
"addu\t%0,%1,%3\n\t"
".set\treorder"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
- : "Ir" (i), "m" (v->counter));
+ : "Ir" (i), "m" (v->counter)
+ : "memory");
return result;
}
@@ -84,7 +85,8 @@ extern __inline__ int atomic_sub_return(int i, atomic_t * v)
"subu\t%0,%1,%3\n\t"
".set\treorder"
: "=&r" (result), "=&r" (temp), "=m" (v->counter)
- : "Ir" (i), "m" (v->counter));
+ : "Ir" (i), "m" (v->counter)
+ : "memory");
return result;
}