git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixing Tegra2 build
[tpg/acess2.git]
/
Kernel
/
arch
/
armv7
/
include
/
lock.h
diff --git
a/Kernel/arch/armv7/include/lock.h
b/Kernel/arch/armv7/include/lock.h
index
627726b
..
6688af4
100644
(file)
--- a/
Kernel/arch/armv7/include/lock.h
+++ b/
Kernel/arch/armv7/include/lock.h
@@
-26,7
+26,7
@@
static inline int CPU_HAS_LOCK(struct sShortSpinlock *Lock)
static inline int SHORTLOCK(struct sShortSpinlock *Lock)
{
static inline int SHORTLOCK(struct sShortSpinlock *Lock)
{
- #if
1
+ #if
0
// Coped from linux, yes, but I know what it does now :)
Uint tmp;
__asm__ __volatile__ (
// Coped from linux, yes, but I know what it does now :)
Uint tmp;
__asm__ __volatile__ (
@@
-39,11
+39,14
@@
static inline int SHORTLOCK(struct sShortSpinlock *Lock)
: "r" (&Lock->Lock), "r" (1)
: "cc" // Condition codes clobbered
);
: "r" (&Lock->Lock), "r" (1)
: "cc" // Condition codes clobbered
);
+ #elif 1
+ while( *(volatile int*)&Lock->Lock ) ;
+ Lock->Lock = 1;
#else
int v = 1;
while( v )
__asm__ __volatile__ (
#else
int v = 1;
while( v )
__asm__ __volatile__ (
- "swp %0, [%1]"
+ "swp %0,
%0,
[%1]"
: "=r" (v) : "r" (&Lock->Lock)
: "cc"
);
: "=r" (v) : "r" (&Lock->Lock)
: "cc"
);
UCC
git Repository :: git.ucc.asn.au