/kernel/liteos_a/syscall/ |
D | syscall_pub.h | 43 extern int CheckRegion(const LosVmSpace *space, VADDR_T ptr, size_t len); 44 extern void *DupUserMem(const void *ptr, size_t len, int needCopy); 48 #define CHECK_ASPACE(ptr, len, ...) \ argument 50 if (ptr != NULL && len != 0) { \ 51 if (!LOS_IsUserAddressRange((VADDR_T)(UINTPTR)ptr, len)) { \ 58 if (CheckRegion(__aspace, (VADDR_T)(UINTPTR)ptr, len) == -1) { \ 68 #define LEN(ptr) ((ptr) ? *(ptr) : 0) argument 70 #define DUP_FROM_USER_(ptr, size, copy, ...) \ argument 71 __typeof(ptr) ptr##bak = ptr; \ 72 if (ptr != NULL && (size) != 0) { \ [all …]
|
/kernel/linux/linux-4.19/drivers/staging/media/zoran/ |
D | zr36050.c | 68 zr36050_read (struct zr36050 *ptr, in zr36050_read() argument 74 if (ptr->codec->master_data->readreg) in zr36050_read() 75 value = (ptr->codec->master_data->readreg(ptr->codec, in zr36050_read() 80 ptr->name); in zr36050_read() 82 dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, in zr36050_read() 89 zr36050_write (struct zr36050 *ptr, in zr36050_write() argument 93 dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, in zr36050_write() 97 if (ptr->codec->master_data->writereg) in zr36050_write() 98 ptr->codec->master_data->writereg(ptr->codec, reg, value); in zr36050_write() 103 ptr->name); in zr36050_write() [all …]
|
D | zr36060.c | 72 zr36060_read (struct zr36060 *ptr, in zr36060_read() argument 78 if (ptr->codec->master_data->readreg) in zr36060_read() 79 value = (ptr->codec->master_data->readreg(ptr->codec, in zr36060_read() 84 ptr->name); in zr36060_read() 92 zr36060_write(struct zr36060 *ptr, in zr36060_write() argument 100 if (ptr->codec->master_data->writereg) in zr36060_write() 101 ptr->codec->master_data->writereg(ptr->codec, reg, value); in zr36060_write() 106 ptr->name); in zr36060_write() 117 zr36060_read_status (struct zr36060 *ptr) in zr36060_read_status() argument 119 ptr->status = zr36060_read(ptr, ZR060_CFSR); in zr36060_read_status() [all …]
|
D | zr36016.c | 70 zr36016_read (struct zr36016 *ptr, in zr36016_read() argument 76 if (ptr->codec->master_data->readreg) in zr36016_read() 78 (ptr->codec->master_data-> in zr36016_read() 79 readreg(ptr->codec, reg)) & 0xFF; in zr36016_read() 83 ptr->name); in zr36016_read() 85 dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, in zr36016_read() 92 zr36016_write (struct zr36016 *ptr, in zr36016_write() argument 96 dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, in zr36016_write() 100 if (ptr->codec->master_data->writereg) { in zr36016_write() 101 ptr->codec->master_data->writereg(ptr->codec, reg, value); in zr36016_write() [all …]
|
/kernel/linux/linux-5.10/drivers/staging/media/zoran/ |
D | zr36050.c | 52 static u8 zr36050_read(struct zr36050 *ptr, u16 reg) in zr36050_read() argument 57 if (ptr->codec->master_data->readreg) in zr36050_read() 58 value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xFF; in zr36050_read() 61 KERN_ERR "%s: invalid I/O setup, nothing read!\n", ptr->name); in zr36050_read() 63 dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); in zr36050_read() 68 static void zr36050_write(struct zr36050 *ptr, u16 reg, u8 value) in zr36050_write() argument 70 dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); in zr36050_write() 73 if (ptr->codec->master_data->writereg) in zr36050_write() 74 ptr->codec->master_data->writereg(ptr->codec, reg, value); in zr36050_write() 79 ptr->name); in zr36050_write() [all …]
|
D | zr36060.c | 54 static u8 zr36060_read(struct zr36060 *ptr, u16 reg) in zr36060_read() argument 59 if (ptr->codec->master_data->readreg) in zr36060_read() 60 value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xff; in zr36060_read() 62 pr_err("%s: invalid I/O setup, nothing read!\n", ptr->name); in zr36060_read() 67 static void zr36060_write(struct zr36060 *ptr, u16 reg, u8 value) in zr36060_write() argument 72 if (ptr->codec->master_data->writereg) in zr36060_write() 73 ptr->codec->master_data->writereg(ptr->codec, reg, value); in zr36060_write() 75 pr_err("%s: invalid I/O setup, nothing written!\n", ptr->name); in zr36060_write() 85 static u8 zr36060_read_status(struct zr36060 *ptr) in zr36060_read_status() argument 87 ptr->status = zr36060_read(ptr, ZR060_CFSR); in zr36060_read_status() [all …]
|
D | zr36016.c | 43 static u8 zr36016_read(struct zr36016 *ptr, u16 reg) in zr36016_read() argument 48 if (ptr->codec->master_data->readreg) in zr36016_read() 49 value = (ptr->codec->master_data->readreg(ptr->codec, reg)) & 0xFF; in zr36016_read() 51 pr_err("%s: invalid I/O setup, nothing read!\n", ptr->name); in zr36016_read() 53 dprintk(4, "%s: reading from 0x%04x: %02x\n", ptr->name, reg, value); in zr36016_read() 58 static void zr36016_write(struct zr36016 *ptr, u16 reg, u8 value) in zr36016_write() argument 60 dprintk(4, "%s: writing 0x%02x to 0x%04x\n", ptr->name, value, reg); in zr36016_write() 63 if (ptr->codec->master_data->writereg) in zr36016_write() 64 ptr->codec->master_data->writereg(ptr->codec, reg, value); in zr36016_write() 66 pr_err("%s: invalid I/O setup, nothing written!\n", ptr->name); in zr36016_write() [all …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-4.19/arch/riscv/include/asm/ |
D | cmpxchg.h | 22 #define __xchg_relaxed(ptr, new, size) \ argument 24 __typeof__(ptr) __ptr = (ptr); \ 26 __typeof__(*(ptr)) __ret; \ 48 #define xchg_relaxed(ptr, x) \ argument 50 __typeof__(*(ptr)) _x_ = (x); \ 51 (__typeof__(*(ptr))) __xchg_relaxed((ptr), \ 52 _x_, sizeof(*(ptr))); \ 55 #define __xchg_acquire(ptr, new, size) \ argument 57 __typeof__(ptr) __ptr = (ptr); \ 59 __typeof__(*(ptr)) __ret; \ [all …]
|
/kernel/linux/linux-4.19/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 …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-4.19/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 …]
|
/kernel/linux/linux-5.10/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, (volatile unsigned long *) ptr); in __xchg() 31 case 4: return __xchg32((int) x, (volatile int *) ptr); in __xchg() 32 case 1: return __xchg8((char) x, (volatile 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 …]
|
/kernel/linux/linux-5.10/arch/csky/include/asm/ |
D | uaccess.h | 55 #define put_user(x, ptr) \ argument 56 __put_user_check((x), (ptr), sizeof(*(ptr))) 58 #define __put_user(x, ptr) \ argument 59 __put_user_nocheck((x), (ptr), sizeof(*(ptr))) 63 #define get_user(x, ptr) \ argument 64 __get_user_check((x), (ptr), sizeof(*(ptr))) 66 #define __get_user(x, ptr) \ argument 67 __get_user_nocheck((x), (ptr), sizeof(*(ptr))) 69 #define __put_user_nocheck(x, ptr, size) \ argument 72 typeof(*(ptr)) *__pu_addr = (ptr); \ [all …]
|
/kernel/linux/linux-4.19/arch/x86/include/asm/ |
D | uaccess.h | 171 #define get_user(x, ptr) \ argument 174 register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \ 175 __chk_user_ptr(ptr); \ 180 : "0" (ptr), "i" (sizeof(*(ptr)))); \ 181 (x) = (__force __typeof__(*(ptr))) __val_gu; \ 185 #define __put_user_x(size, x, ptr, __ret_pu) \ argument 187 : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") 215 #define __put_user_x8(x, ptr, __ret_pu) \ argument 217 : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") 219 #define __put_user_asm_u64(x, ptr, retval, errret) \ argument [all …]
|
/kernel/linux/linux-4.19/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 …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/vm/ |
D | hmm-tests.c | 37 void *ptr; member 129 cmd.addr = (__u64)buffer->ptr; in hmm_dmirror_cmd() 130 cmd.ptr = (__u64)buffer->mirror; in hmm_dmirror_cmd() 152 if (buffer->ptr) in hmm_buffer_free() 153 munmap(buffer->ptr, buffer->size); in hmm_buffer_free() 226 int *ptr; in TEST_F() local 242 buffer->ptr = mmap(NULL, size, in TEST_F() 246 ASSERT_NE(buffer->ptr, MAP_FAILED); in TEST_F() 252 i = 2 * self->page_size / sizeof(*ptr); in TEST_F() 253 for (ptr = buffer->ptr; i < size / sizeof(*ptr); ++i) in TEST_F() [all …]
|
/kernel/linux/linux-5.10/arch/powerpc/include/asm/ |
D | cmpxchg.h | 152 __xchg_local(void *ptr, unsigned long x, unsigned int size) in __xchg_local() argument 156 return __xchg_u8_local(ptr, x); in __xchg_local() 158 return __xchg_u16_local(ptr, x); in __xchg_local() 160 return __xchg_u32_local(ptr, x); in __xchg_local() 163 return __xchg_u64_local(ptr, x); in __xchg_local() 171 __xchg_relaxed(void *ptr, unsigned long x, unsigned int size) in __xchg_relaxed() argument 175 return __xchg_u8_relaxed(ptr, x); in __xchg_relaxed() 177 return __xchg_u16_relaxed(ptr, x); in __xchg_relaxed() 179 return __xchg_u32_relaxed(ptr, x); in __xchg_relaxed() 182 return __xchg_u64_relaxed(ptr, x); in __xchg_relaxed() [all …]
|
/kernel/linux/linux-4.19/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 …]
|
/kernel/linux/linux-4.19/drivers/video/ |
D | hdmi.c | 34 static u8 hdmi_infoframe_checksum(u8 *ptr, size_t size) in hdmi_infoframe_checksum() argument 41 csum += ptr[i]; in hdmi_infoframe_checksum() 48 u8 *ptr = buffer; in hdmi_infoframe_set_checksum() local 50 ptr[3] = hdmi_infoframe_checksum(buffer, size); in hdmi_infoframe_set_checksum() 88 u8 *ptr = buffer; in hdmi_avi_infoframe_pack() local 101 ptr[0] = frame->type; in hdmi_avi_infoframe_pack() 102 ptr[1] = frame->version; in hdmi_avi_infoframe_pack() 103 ptr[2] = frame->length; in hdmi_avi_infoframe_pack() 104 ptr[3] = 0; /* checksum */ in hdmi_avi_infoframe_pack() 107 ptr += HDMI_INFOFRAME_HEADER_SIZE; in hdmi_avi_infoframe_pack() [all …]
|
/kernel/linux/linux-5.10/arch/parisc/lib/ |
D | bitops.c | 21 unsigned long __xchg64(unsigned long x, volatile 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, volatile 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 …]
|
/kernel/linux/linux-4.19/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 …]
|
/kernel/linux/linux-4.19/drivers/net/ethernet/neterion/vxge/ |
D | vxge-ethtool.c | 242 u64 *ptr = tmp_stats; in vxge_get_ethtool_stats() local 276 *ptr++ = 0; in vxge_get_ethtool_stats() 305 memset(ptr, 0, (VXGE_HW_VPATH_TX_STATS_LEN + in vxge_get_ethtool_stats() 307 ptr += (VXGE_HW_VPATH_TX_STATS_LEN + in vxge_get_ethtool_stats() 312 *ptr++ = vpath_info->tx_stats.tx_ttl_eth_frms; in vxge_get_ethtool_stats() 313 *ptr++ = vpath_info->tx_stats.tx_ttl_eth_octets; in vxge_get_ethtool_stats() 314 *ptr++ = vpath_info->tx_stats.tx_data_octets; in vxge_get_ethtool_stats() 315 *ptr++ = vpath_info->tx_stats.tx_mcast_frms; in vxge_get_ethtool_stats() 316 *ptr++ = vpath_info->tx_stats.tx_bcast_frms; in vxge_get_ethtool_stats() 317 *ptr++ = vpath_info->tx_stats.tx_ucast_frms; in vxge_get_ethtool_stats() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/neterion/vxge/ |
D | vxge-ethtool.c | 242 u64 *ptr = tmp_stats; in vxge_get_ethtool_stats() local 276 *ptr++ = 0; in vxge_get_ethtool_stats() 305 memset(ptr, 0, (VXGE_HW_VPATH_TX_STATS_LEN + in vxge_get_ethtool_stats() 307 ptr += (VXGE_HW_VPATH_TX_STATS_LEN + in vxge_get_ethtool_stats() 312 *ptr++ = vpath_info->tx_stats.tx_ttl_eth_frms; in vxge_get_ethtool_stats() 313 *ptr++ = vpath_info->tx_stats.tx_ttl_eth_octets; in vxge_get_ethtool_stats() 314 *ptr++ = vpath_info->tx_stats.tx_data_octets; in vxge_get_ethtool_stats() 315 *ptr++ = vpath_info->tx_stats.tx_mcast_frms; in vxge_get_ethtool_stats() 316 *ptr++ = vpath_info->tx_stats.tx_bcast_frms; in vxge_get_ethtool_stats() 317 *ptr++ = vpath_info->tx_stats.tx_ucast_frms; in vxge_get_ethtool_stats() [all …]
|