/arch/sh/mm/ |
D | flush-sh4.c | 15 reg_size_t aligned_start, v, cnt, end; in sh4__flush_wback_region() local 18 v = aligned_start & ~(L1_CACHE_BYTES-1); in sh4__flush_wback_region() 21 cnt = (end - v) / L1_CACHE_BYTES; in sh4__flush_wback_region() 24 __ocbwb(v); v += L1_CACHE_BYTES; in sh4__flush_wback_region() 25 __ocbwb(v); v += L1_CACHE_BYTES; in sh4__flush_wback_region() 26 __ocbwb(v); v += L1_CACHE_BYTES; in sh4__flush_wback_region() 27 __ocbwb(v); v += L1_CACHE_BYTES; in sh4__flush_wback_region() 28 __ocbwb(v); v += L1_CACHE_BYTES; in sh4__flush_wback_region() 29 __ocbwb(v); v += L1_CACHE_BYTES; in sh4__flush_wback_region() 30 __ocbwb(v); v += L1_CACHE_BYTES; in sh4__flush_wback_region() [all …]
|
/arch/arm64/include/asm/ |
D | atomic.h | 43 #define ___atomic_add_unless(v, a, u, sfx) \ argument 45 typeof((v)->counter) c, old; \ 47 c = atomic##sfx##_read(v); \ 49 (old = atomic##sfx##_cmpxchg((v), c, c + (a))) != c) \ 56 #define atomic_read(v) READ_ONCE((v)->counter) argument 57 #define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i)) argument 64 #define atomic_inc_return_relaxed(v) atomic_add_return_relaxed(1, (v)) argument 65 #define atomic_inc_return_acquire(v) atomic_add_return_acquire(1, (v)) argument 66 #define atomic_inc_return_release(v) atomic_add_return_release(1, (v)) argument 67 #define atomic_inc_return(v) atomic_add_return(1, (v)) argument [all …]
|
/arch/frv/include/asm/ |
D | atomic.h | 35 #define atomic_read(v) READ_ONCE((v)->counter) argument 36 #define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i)) argument 38 static inline int atomic_inc_return(atomic_t *v) in atomic_inc_return() argument 40 return __atomic_add_return(1, &v->counter); in atomic_inc_return() 43 static inline int atomic_dec_return(atomic_t *v) in atomic_dec_return() argument 45 return __atomic_sub_return(1, &v->counter); in atomic_dec_return() 48 static inline int atomic_add_return(int i, atomic_t *v) in atomic_add_return() argument 50 return __atomic_add_return(i, &v->counter); in atomic_add_return() 53 static inline int atomic_sub_return(int i, atomic_t *v) in atomic_sub_return() argument 55 return __atomic_sub_return(i, &v->counter); in atomic_sub_return() [all …]
|
/arch/ia64/include/asm/ |
D | atomic.h | 24 #define atomic_read(v) READ_ONCE((v)->counter) argument 25 #define atomic64_read(v) READ_ONCE((v)->counter) argument 27 #define atomic_set(v,i) WRITE_ONCE(((v)->counter), (i)) argument 28 #define atomic64_set(v,i) WRITE_ONCE(((v)->counter), (i)) argument 32 ia64_atomic_##op (int i, atomic_t *v) \ 38 CMPXCHG_BUGCHECK(v); \ 39 old = atomic_read(v); \ 41 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic_t)) != old); \ 48 #define atomic_add_return(i,v) \ argument 56 ? ia64_fetch_and_add(__ia64_aar_i, &(v)->counter) \ [all …]
|
/arch/x86/lib/ |
D | atomic64_386_32.S | 31 LOCK v; 36 UNLOCK v; \ 43 #define v %ecx macro 45 movl (v), %eax 46 movl 4(v), %edx 48 #undef v 50 #define v %esi macro 52 movl %ebx, (v) 53 movl %ecx, 4(v) 55 #undef v [all …]
|
/arch/sparc/include/asm/ |
D | atomic_64.h | 17 #define atomic_read(v) READ_ONCE((v)->counter) argument 18 #define atomic64_read(v) READ_ONCE((v)->counter) argument 20 #define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i)) argument 21 #define atomic64_set(v, i) WRITE_ONCE(((v)->counter), (i)) argument 44 #define atomic_dec_return(v) atomic_sub_return(1, v) in ATOMIC_OPS() argument 45 #define atomic64_dec_return(v) atomic64_sub_return(1, v) in ATOMIC_OPS() argument 47 #define atomic_inc_return(v) atomic_add_return(1, v) in ATOMIC_OPS() argument 48 #define atomic64_inc_return(v) atomic64_add_return(1, v) in ATOMIC_OPS() argument 58 #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) in ATOMIC_OPS() argument 59 #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) in ATOMIC_OPS() argument [all …]
|
D | atomic_32.h | 31 #define atomic_read(v) ACCESS_ONCE((v)->counter) argument 33 #define atomic_add(i, v) ((void)atomic_add_return( (int)(i), (v))) argument 34 #define atomic_sub(i, v) ((void)atomic_add_return(-(int)(i), (v))) argument 35 #define atomic_inc(v) ((void)atomic_add_return( 1, (v))) argument 36 #define atomic_dec(v) ((void)atomic_add_return( -1, (v))) argument 38 #define atomic_sub_return(i, v) (atomic_add_return(-(int)(i), (v))) argument 39 #define atomic_inc_return(v) (atomic_add_return( 1, (v))) argument 40 #define atomic_dec_return(v) (atomic_add_return( -1, (v))) argument 42 #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) argument 52 #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) argument [all …]
|
/arch/tile/include/asm/ |
D | atomic_64.h | 27 #define atomic_set(v, i) WRITE_ONCE((v)->counter, (i)) argument 35 static inline void atomic_add(int i, atomic_t *v) in atomic_add() argument 37 __insn_fetchadd4((void *)&v->counter, i); in atomic_add() 40 static inline int atomic_add_return(int i, atomic_t *v) in atomic_add_return() argument 44 val = __insn_fetchadd4((void *)&v->counter, i) + i; in atomic_add_return() 49 static inline int __atomic_add_unless(atomic_t *v, int a, int u) in __atomic_add_unless() argument 51 int guess, oldval = v->counter; in __atomic_add_unless() 56 oldval = cmpxchg(&v->counter, guess, guess + a); in __atomic_add_unless() 61 static inline void atomic_and(int i, atomic_t *v) in atomic_and() argument 63 __insn_fetchand4((void *)&v->counter, i); in atomic_and() [all …]
|
D | atomic.h | 35 static inline int atomic_read(const atomic_t *v) in atomic_read() argument 37 return READ_ONCE(v->counter); in atomic_read() 47 #define atomic_sub_return(i, v) atomic_add_return((int)(-(i)), (v)) argument 56 #define atomic_sub(i, v) atomic_add((int)(-(i)), (v)) argument 66 #define atomic_sub_and_test(i, v) (atomic_sub_return((i), (v)) == 0) argument 74 #define atomic_inc_return(v) atomic_add_return(1, (v)) argument 82 #define atomic_dec_return(v) atomic_sub_return(1, (v)) argument 90 #define atomic_inc(v) atomic_add(1, (v)) argument 98 #define atomic_dec(v) atomic_sub(1, (v)) argument 106 #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) argument [all …]
|
/arch/avr32/include/asm/ |
D | atomic.h | 22 #define atomic_read(v) READ_ONCE((v)->counter) argument 23 #define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i)) argument 26 static inline int __atomic_##op##_return(int i, atomic_t *v) \ 37 : "=&r" (result), "=o" (v->counter) \ 38 : "m" (v->counter), #asm_con (i) \ 49 static inline void atomic_##op(int i, atomic_t *v) \ in ATOMIC_OP_RETURN() 51 (void)__atomic_##op##_return(i, v); \ in ATOMIC_OP_RETURN() 82 static inline int atomic_add_return(int i, atomic_t *v) 85 return __atomic_sub_return(-i, v); 87 return __atomic_add_return(i, v); [all …]
|
/arch/parisc/include/asm/ |
D | atomic.h | 58 static __inline__ void atomic_set(atomic_t *v, int i) in atomic_set() argument 61 _atomic_spin_lock_irqsave(v, flags); in atomic_set() 63 v->counter = i; in atomic_set() 65 _atomic_spin_unlock_irqrestore(v, flags); in atomic_set() 68 static __inline__ int atomic_read(const atomic_t *v) in atomic_read() argument 70 return READ_ONCE((v)->counter); in atomic_read() 74 #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) argument 75 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) argument 86 static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u) in __atomic_add_unless() argument 89 c = atomic_read(v); in __atomic_add_unless() [all …]
|
/arch/alpha/include/asm/ |
D | atomic.h | 20 #define atomic_read(v) READ_ONCE((v)->counter) argument 21 #define atomic64_read(v) READ_ONCE((v)->counter) argument 23 #define atomic_set(v,i) WRITE_ONCE((v)->counter, (i)) argument 24 #define atomic64_set(v,i) WRITE_ONCE((v)->counter, (i)) argument 33 static __inline__ void atomic_##op(int i, atomic_t * v) \ 44 :"=&r" (temp), "=m" (v->counter) \ 45 :"Ir" (i), "m" (v->counter)); \ 49 static inline int atomic_##op##_return(int i, atomic_t *v) \ 62 :"=&r" (temp), "=m" (v->counter), "=&r" (result) \ 63 :"Ir" (i), "m" (v->counter) : "memory"); \ [all …]
|
/arch/x86/include/asm/ |
D | atomic64_64.h | 19 static inline long atomic64_read(const atomic64_t *v) in atomic64_read() argument 21 return READ_ONCE((v)->counter); in atomic64_read() 31 static inline void atomic64_set(atomic64_t *v, long i) in atomic64_set() argument 33 WRITE_ONCE(v->counter, i); in atomic64_set() 43 static __always_inline void atomic64_add(long i, atomic64_t *v) in atomic64_add() argument 46 : "=m" (v->counter) in atomic64_add() 47 : "er" (i), "m" (v->counter) : "memory"); in atomic64_add() 57 static inline void atomic64_sub(long i, atomic64_t *v) in atomic64_sub() argument 60 : "=m" (v->counter) in atomic64_sub() 61 : "er" (i), "m" (v->counter) : "memory"); in atomic64_sub() [all …]
|
D | atomic.h | 24 static __always_inline int atomic_read(const atomic_t *v) in atomic_read() argument 26 return READ_ONCE((v)->counter); in atomic_read() 36 static __always_inline void atomic_set(atomic_t *v, int i) in atomic_set() argument 38 WRITE_ONCE(v->counter, i); in atomic_set() 48 static __always_inline void atomic_add(int i, atomic_t *v) in atomic_add() argument 51 : "+m" (v->counter) in atomic_add() 62 static __always_inline void atomic_sub(int i, atomic_t *v) in atomic_sub() argument 65 : "+m" (v->counter) in atomic_sub() 78 static __always_inline int atomic_sub_and_test(int i, atomic_t *v) in atomic_sub_and_test() argument 80 GEN_BINARY_RMWcc(LOCK_PREFIX "subl", v->counter, "er", i, "%0", e); in atomic_sub_and_test() [all …]
|
/arch/arm/include/asm/ |
D | atomic.h | 30 #define atomic_read(v) READ_ONCE((v)->counter) argument 31 #define atomic_set(v,i) WRITE_ONCE(((v)->counter), (i)) argument 42 static inline void atomic_##op(int i, atomic_t *v) \ 47 prefetchw(&v->counter); \ 54 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \ 55 : "r" (&v->counter), "Ir" (i) \ 60 static inline int atomic_##op##_return_relaxed(int i, atomic_t *v) \ 65 prefetchw(&v->counter); \ 73 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \ 74 : "r" (&v->counter), "Ir" (i) \ [all …]
|
/arch/mips/include/asm/ |
D | atomic.h | 33 #define atomic_read(v) READ_ONCE((v)->counter) argument 42 #define atomic_set(v, i) WRITE_ONCE((v)->counter, (i)) argument 45 static __inline__ void atomic_##op(int i, atomic_t * v) \ 57 : "=&r" (temp), "+" GCC_OFF_SMALL_ASM() (v->counter) \ 69 : "=&r" (temp), "+" GCC_OFF_SMALL_ASM() (v->counter) \ 76 v->counter c_op i; \ 82 static __inline__ int atomic_##op##_return(int i, atomic_t * v) \ 100 "+" GCC_OFF_SMALL_ASM() (v->counter) \ 113 "+" GCC_OFF_SMALL_ASM() (v->counter) \ 122 result = v->counter; \ [all …]
|
/arch/sh/include/asm/ |
D | atomic.h | 17 #define atomic_read(v) READ_ONCE((v)->counter) argument 18 #define atomic_set(v,i) WRITE_ONCE((v)->counter, (i)) argument 28 #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) argument 29 #define atomic_dec_return(v) atomic_sub_return(1, (v)) argument 30 #define atomic_inc_return(v) atomic_add_return(1, (v)) argument 31 #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) argument 32 #define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) argument 33 #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) argument 35 #define atomic_inc(v) atomic_add(1, (v)) argument 36 #define atomic_dec(v) atomic_sub(1, (v)) argument [all …]
|
/arch/x86/kvm/ |
D | irq.c | 43 static int pending_userspace_extint(struct kvm_vcpu *v) in pending_userspace_extint() argument 45 return v->arch.pending_external_vector != -1; in pending_userspace_extint() 52 static int kvm_cpu_has_extint(struct kvm_vcpu *v) in kvm_cpu_has_extint() argument 54 u8 accept = kvm_apic_accept_pic_intr(v); in kvm_cpu_has_extint() 57 if (irqchip_split(v->kvm)) in kvm_cpu_has_extint() 58 return pending_userspace_extint(v); in kvm_cpu_has_extint() 60 return pic_irqchip(v->kvm)->output; in kvm_cpu_has_extint() 71 int kvm_cpu_has_injectable_intr(struct kvm_vcpu *v) in kvm_cpu_has_injectable_intr() argument 73 if (!lapic_in_kernel(v)) in kvm_cpu_has_injectable_intr() 74 return v->arch.interrupt.pending; in kvm_cpu_has_injectable_intr() [all …]
|
/arch/hexagon/include/asm/ |
D | atomic.h | 33 static inline void atomic_set(atomic_t *v, int new) in atomic_set() argument 40 : "r" (&v->counter), "r" (new) in atomic_set() 51 #define atomic_read(v) READ_ONCE((v)->counter) argument 58 #define atomic_xchg(v, new) (xchg(&((v)->counter), (new))) argument 78 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument 90 : "r" (&v->counter), "r" (old), "r" (new) in atomic_cmpxchg() 98 static inline void atomic_##op(int i, atomic_t *v) \ 108 : "r" (&v->counter), "r" (i) \ 114 static inline int atomic_##op##_return(int i, atomic_t *v) \ 124 : "r" (&v->counter), "r" (i) \ [all …]
|
/arch/powerpc/include/asm/ |
D | atomic.h | 15 static __inline__ int atomic_read(const atomic_t *v) in atomic_read() argument 19 __asm__ __volatile__("lwz%U1%X1 %0,%1" : "=r"(t) : "m"(v->counter)); in atomic_read() 24 static __inline__ void atomic_set(atomic_t *v, int i) in atomic_set() argument 26 __asm__ __volatile__("stw%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i)); in atomic_set() 30 static __inline__ void atomic_##op(int a, atomic_t *v) \ 40 : "=&r" (t), "+m" (v->counter) \ 41 : "r" (a), "r" (&v->counter) \ 46 static __inline__ int atomic_##op##_return(int a, atomic_t *v) \ 59 : "r" (a), "r" (&v->counter) \ 78 #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) in ATOMIC_OPS() argument [all …]
|
/arch/h8300/include/asm/ |
D | atomic.h | 14 #define atomic_read(v) READ_ONCE((v)->counter) argument 15 #define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i)) argument 20 static inline int atomic_##op##_return(int i, atomic_t *v) \ 26 ret = v->counter c_op i; \ 32 static inline void atomic_##op(int i, atomic_t *v) \ 37 v->counter c_op i; \ 51 #define atomic_add(i, v) (void)atomic_add_return(i, v) argument 52 #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) argument 54 #define atomic_sub(i, v) (void)atomic_sub_return(i, v) argument 55 #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0) argument [all …]
|
/arch/metag/include/asm/ |
D | atomic.h | 20 #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) argument 22 #define atomic_dec_return(v) atomic_sub_return(1, (v)) argument 23 #define atomic_inc_return(v) atomic_add_return(1, (v)) argument 33 #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) argument 35 #define atomic_sub_and_test(i, v) (atomic_sub_return((i), (v)) == 0) argument 36 #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) argument 38 #define atomic_inc(v) atomic_add(1, (v)) argument 39 #define atomic_dec(v) atomic_sub(1, (v)) argument 41 #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) argument 42 #define atomic_dec_if_positive(v) atomic_sub_if_positive(1, v) argument
|
/arch/mn10300/include/asm/ |
D | atomic.h | 37 #define atomic_read(v) READ_ONCE((v)->counter) argument 46 #define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i)) argument 49 static inline void atomic_##op(int i, atomic_t *v) \ 62 : "=&r"(status), "=&r"(retval), "=m"(v->counter) \ 63 : "a"(ATOMIC_OPS_BASE_ADDR), "r"(&v->counter), "r"(i) \ 68 static inline int atomic_##op##_return(int i, atomic_t *v) \ 81 : "=&r"(status), "=&r"(retval), "=m"(v->counter) \ 82 : "a"(ATOMIC_OPS_BASE_ADDR), "r"(&v->counter), "r"(i) \ 100 static inline int atomic_add_negative(int i, atomic_t *v) in ATOMIC_OPS() 102 return atomic_add_return(i, v) < 0; in ATOMIC_OPS() [all …]
|
/arch/mips/include/asm/lasat/ |
D | lasat.h | 103 #define LASAT_W0_DSCTYPE(v) (((v)) & 0xf) argument 104 #define LASAT_W0_BMID(v) (((v) >> 0x04) & 0xf) argument 105 #define LASAT_W0_CPUTYPE(v) (((v) >> 0x08) & 0xf) argument 106 #define LASAT_W0_BUSSPEED(v) (((v) >> 0x0c) & 0xf) argument 107 #define LASAT_W0_CPUCLK(v) (((v) >> 0x10) & 0xf) argument 108 #define LASAT_W0_SDRAMBANKSZ(v) (((v) >> 0x14) & 0xf) argument 109 #define LASAT_W0_SDRAMBANKS(v) (((v) >> 0x18) & 0xf) argument 110 #define LASAT_W0_L2CACHE(v) (((v) >> 0x1c) & 0xf) argument 112 #define LASAT_W1_EDHAC(v) (((v)) & 0xf) argument 113 #define LASAT_W1_HIFN(v) (((v) >> 0x04) & 0x1) argument [all …]
|
/arch/x86/kernel/ |
D | bootflag.c | 22 static int __init parity(u8 v) in parity() argument 28 x ^= (v & 1); in parity() 29 v >>= 1; in parity() 35 static void __init sbf_write(u8 v) in sbf_write() argument 40 v &= ~SBF_PARITY; in sbf_write() 41 if (!parity(v)) in sbf_write() 42 v |= SBF_PARITY; in sbf_write() 45 sbf_port, v); in sbf_write() 48 CMOS_WRITE(v, sbf_port); in sbf_write() 56 u8 v; in sbf_read() local [all …]
|