mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
atomic: use <linux/atomic.h>
This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by: Arun Sharma <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: David Miller <[email protected]> Cc: Eric Dumazet <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
148817ba09
commit
60063497a9
439 changed files with 427 additions and 448 deletions
|
|
@ -121,15 +121,6 @@ static inline int atomic_read(const atomic_t *v)
|
|||
*/
|
||||
#define atomic_add_negative(i, v) (atomic_add_return((i), (v)) < 0)
|
||||
|
||||
/**
|
||||
* atomic_inc_not_zero - increment unless the number is zero
|
||||
* @v: pointer of type atomic_t
|
||||
*
|
||||
* Atomically increments @v by 1, so long as @v is non-zero.
|
||||
* Returns non-zero if @v was non-zero, and zero otherwise.
|
||||
*/
|
||||
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
|
||||
|
||||
/* Nonexistent functions intended to cause link errors. */
|
||||
extern unsigned long __xchg_called_with_bad_pointer(void);
|
||||
extern unsigned long __cmpxchg_called_with_bad_pointer(void);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
* NON INFRINGEMENT. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* Do not include directly; use <asm/atomic.h>.
|
||||
* Do not include directly; use <linux/atomic.h>.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_TILE_ATOMIC_32_H
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* Tile-specific routines to support <asm/atomic.h>. */
|
||||
/* Tile-specific routines to support <linux/atomic.h>. */
|
||||
int _atomic_xchg(atomic_t *v, int n);
|
||||
int _atomic_xchg_add(atomic_t *v, int i);
|
||||
int _atomic_xchg_add_unless(atomic_t *v, int a, int u);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
* NON INFRINGEMENT. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* Do not include directly; use <asm/atomic.h>.
|
||||
* Do not include directly; use <linux/atomic.h>.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_TILE_ATOMIC_64_H
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#define _ASM_TILE_BITOPS_32_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
/* Tile-specific routines to support <asm/bitops.h>. */
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#define _ASM_TILE_BITOPS_64_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
/* See <asm/bitops.h> for API comments. */
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef _ASM_TILE_SPINLOCK_32_H
|
||||
#define _ASM_TILE_SPINLOCK_32_H
|
||||
|
||||
#include <asm/atomic.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/system.h>
|
||||
#include <linux/compiler.h>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <asm/ptrace.h>
|
||||
#include <asm/thread_info.h>
|
||||
#include <asm/irqflags.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <hv/hypervisor.h>
|
||||
#include <arch/abi.h>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include <linux/uaccess.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mm.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/futex.h>
|
||||
#include <arch/chip.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue