Release 4.14 arch/parisc/lib/bitops.c
// SPDX-License-Identifier: GPL-2.0
/*
* bitops.c: atomic operations which got too long to be inlined all over
* the place.
*
* Copyright 1999 Philipp Rumpf (prumpf@tux.org)
* Copyright 2000 Grant Grundler (grundler@cup.hp.com)
*/
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/atomic.h>
#ifdef CONFIG_SMP
arch_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = {
[0 ... (ATOMIC_HASH_SIZE-1)] = __ARCH_SPIN_LOCK_UNLOCKED
};
#endif
#ifdef CONFIG_64BIT
unsigned long __xchg64(unsigned long x, unsigned long *ptr)
{
unsigned long temp, flags;
_atomic_spin_lock_irqsave(ptr, flags);
temp = *ptr;
*ptr = x;
_atomic_spin_unlock_irqrestore(ptr, flags);
return temp;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 42 | 87.50% | 1 | 33.33% |
Matthew Wilcox | 6 | 12.50% | 2 | 66.67% |
Total | 48 | 100.00% | 3 | 100.00% |
#endif
unsigned long __xchg32(int x, int *ptr)
{
unsigned long flags;
long temp;
_atomic_spin_lock_irqsave(ptr, flags);
temp = (long) *ptr; /* XXX - sign extension wanted? */
*ptr = x;
_atomic_spin_unlock_irqrestore(ptr, flags);
return (unsigned long)temp;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 36 | 65.45% | 1 | 25.00% |
Matthew Wilcox | 19 | 34.55% | 3 | 75.00% |
Total | 55 | 100.00% | 4 | 100.00% |
unsigned long __xchg8(char x, char *ptr)
{
unsigned long flags;
long temp;
_atomic_spin_lock_irqsave(ptr, flags);
temp = (long) *ptr; /* XXX - sign extension wanted? */
*ptr = x;
_atomic_spin_unlock_irqrestore(ptr, flags);
return (unsigned long)temp;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Matthew Wilcox | 30 | 54.55% | 3 | 75.00% |
Linus Torvalds (pre-git) | 25 | 45.45% | 1 | 25.00% |
Total | 55 | 100.00% | 4 | 100.00% |
u64 __cmpxchg_u64(volatile u64 *ptr, u64 old, u64 new)
{
unsigned long flags;
u64 prev;
_atomic_spin_lock_irqsave(ptr, flags);
if ((prev = *ptr) == old)
*ptr = new;
_atomic_spin_unlock_irqrestore(ptr, flags);
return prev;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Matthew Wilcox | 48 | 85.71% | 2 | 50.00% |
Helge Deller | 5 | 8.93% | 1 | 25.00% |
Linus Torvalds (pre-git) | 3 | 5.36% | 1 | 25.00% |
Total | 56 | 100.00% | 4 | 100.00% |
unsigned long __cmpxchg_u32(volatile unsigned int *ptr, unsigned int old, unsigned int new)
{
unsigned long flags;
unsigned int prev;
_atomic_spin_lock_irqsave(ptr, flags);
if ((prev = *ptr) == old)
*ptr = new;
_atomic_spin_unlock_irqrestore(ptr, flags);
return (unsigned long)prev;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Matthew Wilcox | 65 | 100.00% | 2 | 100.00% |
Total | 65 | 100.00% | 2 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Matthew Wilcox | 174 | 54.21% | 4 | 36.36% |
Linus Torvalds (pre-git) | 137 | 42.68% | 1 | 9.09% |
Helge Deller | 6 | 1.87% | 2 | 18.18% |
Thomas Gleixner | 2 | 0.62% | 2 | 18.18% |
Greg Kroah-Hartman | 1 | 0.31% | 1 | 9.09% |
Arun Sharma | 1 | 0.31% | 1 | 9.09% |
Total | 321 | 100.00% | 11 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.