projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
864b9e6
)
powerpc: Convert open coded native hashtable bit lock
author
Anton Blanchard
<anton@samba.org>
Wed, 10 Feb 2010 01:03:06 +0000
(
01:03
+0000)
committer
Benjamin Herrenschmidt
<benh@kernel.crashing.org>
Wed, 17 Feb 2010 03:03:15 +0000
(14:03 +1100)
Now we have real bit locks use them instead of open coding it.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/hash_native_64.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/mm/hash_native_64.c
b/arch/powerpc/mm/hash_native_64.c
index 056d23a1b105f851757a082bcb04001e374a48b3..9e1aa4f99fac0814e0daff3c229bd8e862c8ddfe 100644
(file)
--- a/
arch/powerpc/mm/hash_native_64.c
+++ b/
arch/powerpc/mm/hash_native_64.c
@@
-122,7
+122,7
@@
static inline void native_lock_hpte(struct hash_pte *hptep)
unsigned long *word = &hptep->v;
while (1) {
- if (!test_and_set_bit(HPTE_LOCK_BIT, word))
+ if (!test_and_set_bit
_lock
(HPTE_LOCK_BIT, word))
break;
while(test_bit(HPTE_LOCK_BIT, word))
cpu_relax();
@@
-133,8
+133,7
@@
static inline void native_unlock_hpte(struct hash_pte *hptep)
{
unsigned long *word = &hptep->v;
- asm volatile("lwsync":::"memory");
- clear_bit(HPTE_LOCK_BIT, word);
+ clear_bit_unlock(HPTE_LOCK_BIT, word);
}
static long native_hpte_insert(unsigned long hpte_group, unsigned long va,