/arch/riscv/include/asm/ |
D | cmpxchg.h | 14 #define __xchg_relaxed(ptr, new, size) \ argument 16 __typeof__(ptr) __ptr = (ptr); \ 18 __typeof__(*(ptr)) __ret; \ 40 #define xchg_relaxed(ptr, x) \ argument 42 __typeof__(*(ptr)) _x_ = (x); \ 43 (__typeof__(*(ptr))) __xchg_relaxed((ptr), \ 44 _x_, sizeof(*(ptr))); \ 47 #define __xchg_acquire(ptr, new, size) \ argument 49 __typeof__(ptr) __ptr = (ptr); \ 51 __typeof__(*(ptr)) __ret; \ [all …]
|
/arch/arm/include/asm/ |
D | cmpxchg.h | 28 static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) in __xchg() argument 39 prefetchw((const void *)ptr); in __xchg() 51 : "r" (x), "r" (ptr) in __xchg() 61 : "r" (x), "r" (ptr) in __xchg() 72 : "r" (x), "r" (ptr) in __xchg() 81 ret = *(volatile unsigned char *)ptr; in __xchg() 82 *(volatile unsigned char *)ptr = x; in __xchg() 88 ret = *(volatile unsigned long *)ptr; in __xchg() 89 *(volatile unsigned long *)ptr = x; in __xchg() 97 : "r" (x), "r" (ptr) in __xchg() [all …]
|
/arch/parisc/include/asm/ |
D | cmpxchg.h | 25 __xchg(unsigned long x, __volatile__ void *ptr, int size) in __xchg() argument 29 case 8: return __xchg64(x, (unsigned long *) ptr); in __xchg() 31 case 4: return __xchg32((int) x, (int *) ptr); in __xchg() 32 case 1: return __xchg8((char) x, (char *) ptr); in __xchg() 47 #define xchg(ptr, x) \ argument 49 __typeof__(*(ptr)) __ret; \ 50 __typeof__(*(ptr)) _x_ = (x); \ 51 __ret = (__typeof__(*(ptr))) \ 52 __xchg((unsigned long)_x_, (ptr), sizeof(*(ptr))); \ 62 extern u64 __cmpxchg_u64(volatile u64 *ptr, u64 old, u64 new_); [all …]
|
D | uaccess.h | 36 #define LDD_USER(val, ptr) __get_user_asm64(val, ptr) argument 37 #define STD_USER(x, ptr) __put_user_asm64(x, ptr) argument 39 #define LDD_USER(val, ptr) __get_user_asm(val, "ldd", ptr) argument 40 #define STD_USER(x, ptr) __put_user_asm("std", x, ptr) argument 83 #define __get_user_internal(val, ptr) \ argument 87 switch (sizeof(*(ptr))) { \ 88 case 1: __get_user_asm(val, "ldb", ptr); break; \ 89 case 2: __get_user_asm(val, "ldh", ptr); break; \ 90 case 4: __get_user_asm(val, "ldw", ptr); break; \ 91 case 8: LDD_USER(val, ptr); break; \ [all …]
|
/arch/csky/include/asm/ |
D | uaccess.h | 56 #define put_user(x, ptr) \ argument 57 __put_user_check((x), (ptr), sizeof(*(ptr))) 59 #define __put_user(x, ptr) \ argument 60 __put_user_nocheck((x), (ptr), sizeof(*(ptr))) 64 #define get_user(x, ptr) \ argument 65 __get_user_check((x), (ptr), sizeof(*(ptr))) 67 #define __get_user(x, ptr) \ argument 68 __get_user_nocheck((x), (ptr), sizeof(*(ptr))) 70 #define __put_user_nocheck(x, ptr, size) \ argument 73 typeof(*(ptr)) *__pu_addr = (ptr); \ [all …]
|
/arch/alpha/include/asm/ |
D | cmpxchg.h | 13 #define xchg_local(ptr, x) \ argument 15 __typeof__(*(ptr)) _x_ = (x); \ 16 (__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \ 17 sizeof(*(ptr))); \ 20 #define cmpxchg_local(ptr, o, n) \ argument 22 __typeof__(*(ptr)) _o_ = (o); \ 23 __typeof__(*(ptr)) _n_ = (n); \ 24 (__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \ 26 sizeof(*(ptr))); \ 29 #define cmpxchg64_local(ptr, o, n) \ argument [all …]
|
/arch/parisc/lib/ |
D | bitops.c | 21 unsigned long __xchg64(unsigned long x, unsigned long *ptr) in __xchg64() argument 25 _atomic_spin_lock_irqsave(ptr, flags); in __xchg64() 26 temp = *ptr; in __xchg64() 27 *ptr = x; in __xchg64() 28 _atomic_spin_unlock_irqrestore(ptr, flags); in __xchg64() 33 unsigned long __xchg32(int x, int *ptr) in __xchg32() argument 38 _atomic_spin_lock_irqsave(ptr, flags); in __xchg32() 39 temp = (long) *ptr; /* XXX - sign extension wanted? */ in __xchg32() 40 *ptr = x; in __xchg32() 41 _atomic_spin_unlock_irqrestore(ptr, flags); in __xchg32() [all …]
|
/arch/m68k/include/asm/ |
D | cmpxchg.h | 13 static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) in __xchg() argument 21 tmp = *(u8 *)ptr; in __xchg() 22 *(u8 *)ptr = x; in __xchg() 26 tmp = *(u16 *)ptr; in __xchg() 27 *(u16 *)ptr = x; in __xchg() 31 tmp = *(u32 *)ptr; in __xchg() 32 *(u32 *)ptr = x; in __xchg() 36 tmp = __invalid_xchg_size(x, ptr, size); in __xchg() 44 static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) in __xchg() argument 53 : "=&d" (x) : "d" (x), "m" (*__xg(ptr)) : "memory"); in __xchg() [all …]
|
/arch/powerpc/include/asm/ |
D | cmpxchg.h | 159 __xchg_local(void *ptr, unsigned long x, unsigned int size) in __xchg_local() argument 163 return __xchg_u8_local(ptr, x); in __xchg_local() 165 return __xchg_u16_local(ptr, x); in __xchg_local() 167 return __xchg_u32_local(ptr, x); in __xchg_local() 170 return __xchg_u64_local(ptr, x); in __xchg_local() 178 __xchg_relaxed(void *ptr, unsigned long x, unsigned int size) in __xchg_relaxed() argument 182 return __xchg_u8_relaxed(ptr, x); in __xchg_relaxed() 184 return __xchg_u16_relaxed(ptr, x); in __xchg_relaxed() 186 return __xchg_u32_relaxed(ptr, x); in __xchg_relaxed() 189 return __xchg_u64_relaxed(ptr, x); in __xchg_relaxed() [all …]
|
D | uaccess.h | 88 #define get_user(x, ptr) \ argument 89 __get_user_check((x), (ptr), sizeof(*(ptr))) 90 #define put_user(x, ptr) \ argument 91 __put_user_check((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr))) 93 #define __get_user(x, ptr) \ argument 94 __get_user_nocheck((x), (ptr), sizeof(*(ptr))) 95 #define __put_user(x, ptr) \ argument 96 __put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr))) 98 #define __get_user_inatomic(x, ptr) \ argument 99 __get_user_nosleep((x), (ptr), sizeof(*(ptr))) [all …]
|
/arch/x86/include/asm/ |
D | uaccess.h | 166 #define get_user(x, ptr) \ argument 169 register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \ 170 __chk_user_ptr(ptr); \ 175 : "0" (ptr), "i" (sizeof(*(ptr)))); \ 176 (x) = (__force __typeof__(*(ptr))) __val_gu; \ 180 #define __put_user_x(size, x, ptr, __ret_pu) \ argument 182 : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") 205 #define __put_user_x8(x, ptr, __ret_pu) \ argument 207 : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") 209 #define __put_user_goto_u64(x, ptr, label) \ argument [all …]
|
D | cmpxchg_32.h | 24 static inline void set_64bit(volatile u64 *ptr, u64 value) in set_64bit() argument 28 u64 prev = *ptr; in set_64bit() 33 : "=m" (*ptr), "+A" (prev) in set_64bit() 39 #define arch_cmpxchg64(ptr, o, n) \ argument 40 ((__typeof__(*(ptr)))__cmpxchg64((ptr), (unsigned long long)(o), \ 42 #define arch_cmpxchg64_local(ptr, o, n) \ argument 43 ((__typeof__(*(ptr)))__cmpxchg64_local((ptr), (unsigned long long)(o), \ 47 static inline u64 __cmpxchg64(volatile u64 *ptr, u64 old, u64 new) in __cmpxchg64() argument 52 "+m" (*ptr) in __cmpxchg64() 60 static inline u64 __cmpxchg64_local(volatile u64 *ptr, u64 old, u64 new) in __cmpxchg64_local() argument [all …]
|
D | cmpxchg.h | 42 #define __xchg_op(ptr, arg, op, lock) \ argument 44 __typeof__ (*(ptr)) __ret = (arg); \ 45 switch (sizeof(*(ptr))) { \ 48 : "+q" (__ret), "+m" (*(ptr)) \ 53 : "+r" (__ret), "+m" (*(ptr)) \ 58 : "+r" (__ret), "+m" (*(ptr)) \ 63 : "+r" (__ret), "+m" (*(ptr)) \ 78 #define arch_xchg(ptr, v) __xchg_op((ptr), (v), xchg, "") argument 85 #define __raw_cmpxchg(ptr, old, new, size, lock) \ argument 87 __typeof__(*(ptr)) __ret; \ [all …]
|
/arch/xtensa/variants/test_kc705_hifi/include/variant/ |
D | tie-asm.h | 77 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0 81 xchal_sa_align \ptr, 0, 1020, 4, 4 83 s32i \at1, \ptr, .Lxchal_ofs_+0 86 xchal_sa_align \ptr, 0, 1020, 4, 4 91 xchal_sa_align \ptr, 0, 1016, 4, 4 93 s32i \at1, \ptr, .Lxchal_ofs_+0 95 s32i \at1, \ptr, .Lxchal_ofs_+4 98 xchal_sa_align \ptr, 0, 1016, 4, 4 103 xchal_sa_align \ptr, 0, 1000, 4, 4 105 s32i \at1, \ptr, .Lxchal_ofs_+0 [all …]
|
/arch/sparc/include/asm/ |
D | cmpxchg_64.h | 55 #define xchg(ptr,x) \ argument 56 ({ __typeof__(*(ptr)) __ret; \ 57 __ret = (__typeof__(*(ptr))) \ 58 __xchg((unsigned long)(x), (ptr), sizeof(*(ptr))); \ 75 unsigned int *ptr = (unsigned int *) (maddr & ~2); in xchg16() local 79 load32 = *ptr; in xchg16() 84 load32 = __cmpxchg_u32(ptr, old32, new32); in xchg16() 90 static inline unsigned long __xchg(unsigned long x, __volatile__ void * ptr, in __xchg() argument 95 return xchg16(ptr, x); in __xchg() 97 return xchg32(ptr, x); in __xchg() [all …]
|
D | cmpxchg_32.h | 18 static inline unsigned long __xchg(unsigned long x, __volatile__ void * ptr, int size) in __xchg() argument 22 return __xchg_u32(ptr, x); in __xchg() 28 #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) argument 46 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) in __cmpxchg() argument 50 return __cmpxchg_u32((u32 *)ptr, (u32)old, (u32)new_); in __cmpxchg() 58 #define cmpxchg(ptr, o, n) \ argument 60 __typeof__(*(ptr)) _o_ = (o); \ 61 __typeof__(*(ptr)) _n_ = (n); \ 62 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \ 63 (unsigned long)_n_, sizeof(*(ptr))); \ [all …]
|
/arch/mips/include/asm/ |
D | cmpxchg.h | 77 extern unsigned long __xchg_small(volatile void *ptr, unsigned long val, 81 unsigned long __xchg(volatile void *ptr, unsigned long x, int size) in __xchg() argument 86 return __xchg_small(ptr, x, size); in __xchg() 89 return __xchg_asm("ll", "sc", (volatile u32 *)ptr, x); in __xchg() 95 return __xchg_asm("lld", "scd", (volatile u64 *)ptr, x); in __xchg() 102 #define xchg(ptr, x) \ argument 104 __typeof__(*(ptr)) __res; \ 108 __res = (__typeof__(*(ptr))) \ 109 __xchg((ptr), (unsigned long)(x), sizeof(*(ptr))); \ 153 extern unsigned long __cmpxchg_small(volatile void *ptr, unsigned long old, [all …]
|
/arch/s390/include/asm/ |
D | bitops.h | 45 __bitops_word(unsigned long nr, volatile unsigned long *ptr) in __bitops_word() argument 49 addr = (unsigned long)ptr + ((nr ^ (nr & (BITS_PER_LONG - 1))) >> 3); in __bitops_word() 54 __bitops_byte(unsigned long nr, volatile unsigned long *ptr) in __bitops_byte() argument 56 return ((unsigned char *)ptr) + ((nr ^ (BITS_PER_LONG - 8)) >> 3); in __bitops_byte() 59 static __always_inline void arch_set_bit(unsigned long nr, volatile unsigned long *ptr) in arch_set_bit() argument 61 unsigned long *addr = __bitops_word(nr, ptr); in arch_set_bit() 66 unsigned char *caddr = __bitops_byte(nr, ptr); in arch_set_bit() 80 static __always_inline void arch_clear_bit(unsigned long nr, volatile unsigned long *ptr) in arch_clear_bit() argument 82 unsigned long *addr = __bitops_word(nr, ptr); in arch_clear_bit() 87 unsigned char *caddr = __bitops_byte(nr, ptr); in arch_clear_bit() [all …]
|
D | uaccess.h | 86 static __always_inline int __put_user_fn(void *x, void __user *ptr, unsigned long size) in __put_user_fn() argument 93 rc = __put_get_user_asm((unsigned char __user *)ptr, in __put_user_fn() 98 rc = __put_get_user_asm((unsigned short __user *)ptr, in __put_user_fn() 103 rc = __put_get_user_asm((unsigned int __user *)ptr, in __put_user_fn() 108 rc = __put_get_user_asm((unsigned long __user *)ptr, in __put_user_fn() 116 static __always_inline int __get_user_fn(void *x, const void __user *ptr, unsigned long size) in __get_user_fn() argument 124 (unsigned char __user *)ptr, in __get_user_fn() 129 (unsigned short __user *)ptr, in __get_user_fn() 134 (unsigned int __user *)ptr, in __get_user_fn() 139 (unsigned long __user *)ptr, in __get_user_fn() [all …]
|
/arch/arm/plat-samsung/ |
D | pm-common.c | 27 void s3c_pm_do_save(struct sleep_save *ptr, int count) in s3c_pm_do_save() argument 29 for (; count > 0; count--, ptr++) { in s3c_pm_do_save() 30 ptr->val = readl_relaxed(ptr->reg); in s3c_pm_do_save() 31 S3C_PMDBG("saved %p value %08lx\n", ptr->reg, ptr->val); in s3c_pm_do_save() 46 void s3c_pm_do_restore(const struct sleep_save *ptr, int count) in s3c_pm_do_restore() argument 48 for (; count > 0; count--, ptr++) { in s3c_pm_do_restore() 50 ptr->reg, ptr->val, readl_relaxed(ptr->reg)); in s3c_pm_do_restore() 52 writel_relaxed(ptr->val, ptr->reg); in s3c_pm_do_restore() 67 void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count) in s3c_pm_do_restore_core() argument 69 for (; count > 0; count--, ptr++) in s3c_pm_do_restore_core() [all …]
|
/arch/arc/include/asm/ |
D | cmpxchg.h | 17 __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new) in __cmpxchg() argument 34 : "r"(ptr), /* Not "m": llock only supports reg direct addr mode */ in __cmpxchg() 47 __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new) in __cmpxchg() argument 51 volatile unsigned long *p = ptr; in __cmpxchg() 67 __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new) in __cmpxchg() argument 82 : "r"(ptr), "i"(CTOP_INST_EXC_DI_R2_R2_R3) in __cmpxchg() 92 #define cmpxchg(ptr, o, n) ({ \ argument 93 (typeof(*(ptr)))__cmpxchg((ptr), \ 112 static inline unsigned long __xchg(unsigned long val, volatile void *ptr, in __xchg() argument 124 : "r"(ptr) in __xchg() [all …]
|
/arch/c6x/include/asm/ |
D | cmpxchg.h | 16 static inline unsigned int __xchg(unsigned int x, volatile void *ptr, int size) in __xchg() argument 26 tmp = *((unsigned char *) ptr); in __xchg() 27 *((unsigned char *) ptr) = (unsigned char) x; in __xchg() 31 tmp = *((unsigned short *) ptr); in __xchg() 32 *((unsigned short *) ptr) = x; in __xchg() 36 tmp = *((unsigned int *) ptr); in __xchg() 37 *((unsigned int *) ptr) = x; in __xchg() 44 #define xchg(ptr, x) \ argument 45 ((__typeof__(*(ptr)))__xchg((unsigned int)(x), (void *) (ptr), \ 46 sizeof(*(ptr)))) [all …]
|
/arch/xtensa/variants/test_kc705_be/include/variant/ |
D | tie-asm.h | 76 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0 80 xchal_sa_align \ptr, 0, 1020, 4, 4 82 s32i \at1, \ptr, .Lxchal_ofs_+0 85 xchal_sa_align \ptr, 0, 1020, 4, 4 90 xchal_sa_align \ptr, 0, 1016, 4, 4 92 s32i \at1, \ptr, .Lxchal_ofs_+0 94 s32i \at1, \ptr, .Lxchal_ofs_+4 97 xchal_sa_align \ptr, 0, 1016, 4, 4 102 xchal_sa_align \ptr, 0, 1000, 4, 4 104 s32i \at1, \ptr, .Lxchal_ofs_+0 [all …]
|
/arch/xtensa/variants/test_mmuhifi_c3/include/variant/ |
D | tie-asm.h | 36 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL 39 xchal_sa_align \ptr, 0, 1024-4, 4, 4 41 s32i \at1, \ptr, .Lxchal_ofs_ + 0 45 xchal_sa_align \ptr, 0, 1024-4, 4, 4 47 s32i \at1, \ptr, .Lxchal_ofs_ + 0 51 xchal_sa_align \ptr, 0, 1024-4, 4, 4 53 s32i \at1, \ptr, .Lxchal_ofs_ + 0 63 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL 66 xchal_sa_align \ptr, 0, 1024-4, 4, 4 67 l32i \at1, \ptr, .Lxchal_ofs_ + 0 [all …]
|
/arch/powerpc/boot/ |
D | stdlib.c | 13 unsigned long long int strtoull(const char *ptr, char **end, int base) in strtoull() argument 20 while (*ptr) { in strtoull() 23 if (*ptr >= '0' && *ptr <= '9' && *ptr < '0' + base) in strtoull() 24 digit = *ptr - '0'; in strtoull() 25 else if (*ptr >= 'A' && *ptr < 'A' + base - 10) in strtoull() 26 digit = *ptr - 'A' + 10; in strtoull() 27 else if (*ptr >= 'a' && *ptr < 'a' + base - 10) in strtoull() 28 digit = *ptr - 'a' + 10; in strtoull() 34 ptr++; in strtoull() 39 *end = (char *)ptr; in strtoull()
|