| /drivers/power/supply/ |
| D | max1720x_battery.c | 139 { .name = "nXTable0", .offset = 0, .bytes = 2, }, 140 { .name = "nXTable1", .offset = 2, .bytes = 2, }, 141 { .name = "nXTable2", .offset = 4, .bytes = 2, }, 142 { .name = "nXTable3", .offset = 6, .bytes = 2, }, 143 { .name = "nXTable4", .offset = 8, .bytes = 2, }, 144 { .name = "nXTable5", .offset = 10, .bytes = 2, }, 145 { .name = "nXTable6", .offset = 12, .bytes = 2, }, 146 { .name = "nXTable7", .offset = 14, .bytes = 2, }, 147 { .name = "nXTable8", .offset = 16, .bytes = 2, }, 148 { .name = "nXTable9", .offset = 18, .bytes = 2, }, [all …]
|
| /drivers/md/ |
| D | dm-io-rewind.c | 14 unsigned int bytes) in dm_bvec_iter_rewind() argument 18 iter->bi_size += bytes; in dm_bvec_iter_rewind() 19 if (bytes <= iter->bi_bvec_done) { in dm_bvec_iter_rewind() 20 iter->bi_bvec_done -= bytes; in dm_bvec_iter_rewind() 24 bytes -= iter->bi_bvec_done; in dm_bvec_iter_rewind() 27 while (idx >= 0 && bytes && bytes > bv[idx].bv_len) { in dm_bvec_iter_rewind() 28 bytes -= bv[idx].bv_len; in dm_bvec_iter_rewind() 32 if (WARN_ONCE(idx < 0 && bytes, in dm_bvec_iter_rewind() 34 iter->bi_size -= bytes; in dm_bvec_iter_rewind() 41 iter->bi_bvec_done = bv[idx].bv_len - bytes; in dm_bvec_iter_rewind() [all …]
|
| /drivers/staging/media/atomisp/pci/hmm/ |
| D | hmm.c | 169 static ia_css_ptr __hmm_alloc(size_t bytes, enum hmm_bo_type type, in __hmm_alloc() argument 184 pgnr = size_to_pgnr_ceil(bytes); in __hmm_alloc() 217 ia_css_ptr hmm_alloc(size_t bytes) in hmm_alloc() argument 219 return __hmm_alloc(bytes, HMM_BO_PRIVATE, NULL); in hmm_alloc() 222 ia_css_ptr hmm_create_from_vmalloc_buf(size_t bytes, void *vmalloc_addr) in hmm_create_from_vmalloc_buf() argument 224 return __hmm_alloc(bytes, HMM_BO_VMALLOC, vmalloc_addr); in hmm_create_from_vmalloc_buf() 274 unsigned int bytes) in load_and_flush_by_kmap() argument 287 while (bytes) { in load_and_flush_by_kmap() 293 if ((bytes + offset) >= PAGE_SIZE) { in load_and_flush_by_kmap() 295 bytes -= len; in load_and_flush_by_kmap() [all …]
|
| /drivers/gpu/drm/vmwgfx/ |
| D | vmwgfx_cmd.c | 187 static bool vmw_fifo_is_full(struct vmw_private *dev_priv, uint32_t bytes) in vmw_fifo_is_full() argument 194 return ((max - next_cmd) + (stop - min) <= bytes); in vmw_fifo_is_full() 198 uint32_t bytes, bool interruptible, in vmw_fifo_wait_noirq() argument 211 if (!vmw_fifo_is_full(dev_priv, bytes)) in vmw_fifo_wait_noirq() 231 uint32_t bytes, bool interruptible, in vmw_fifo_wait() argument 236 if (likely(!vmw_fifo_is_full(dev_priv, bytes))) in vmw_fifo_wait() 241 return vmw_fifo_wait_noirq(dev_priv, bytes, in vmw_fifo_wait() 250 !vmw_fifo_is_full(dev_priv, bytes), timeout); in vmw_fifo_wait() 254 !vmw_fifo_is_full(dev_priv, bytes), timeout); in vmw_fifo_wait() 278 uint32_t bytes) in vmw_local_fifo_reserve() argument [all …]
|
| /drivers/soc/tegra/fuse/ |
| D | fuse-tegra30.c | 140 .bytes = 4, 146 .bytes = 4, 152 .bytes = 4, 158 .bytes = 4, 164 .bytes = 4, 170 .bytes = 4, 176 .bytes = 4, 182 .bytes = 4, 188 .bytes = 4, 194 .bytes = 4, [all …]
|
| /drivers/gpu/drm/i915/gvt/ |
| D | mmio.c | 67 void *p_data, unsigned int bytes, bool read) in failsafe_emulate_mmio_rw() argument 82 bytes); in failsafe_emulate_mmio_rw() 85 bytes); in failsafe_emulate_mmio_rw() 90 memcpy(p_data, pt, bytes); in failsafe_emulate_mmio_rw() 92 memcpy(pt, p_data, bytes); in failsafe_emulate_mmio_rw() 109 void *p_data, unsigned int bytes) in intel_vgpu_emulate_mmio_read() argument 117 failsafe_emulate_mmio_rw(vgpu, pa, p_data, bytes, true); in intel_vgpu_emulate_mmio_read() 124 if (drm_WARN_ON(&i915->drm, bytes > 8)) in intel_vgpu_emulate_mmio_read() 131 if (drm_WARN_ON(&i915->drm, bytes != 4 && bytes != 8)) in intel_vgpu_emulate_mmio_read() 134 !reg_is_gtt(gvt, offset + bytes - 1))) in intel_vgpu_emulate_mmio_read() [all …]
|
| D | cfg_space.c | 70 u8 *src, unsigned int bytes) in vgpu_pci_cfg_mem_write() argument 77 for (; i < bytes && (off + i < sizeof(pci_cfg_space_rw_bmp)); i++) { in vgpu_pci_cfg_mem_write() 94 if (i < bytes) in vgpu_pci_cfg_mem_write() 95 memcpy(cfg_base + off + i, src + i, bytes - i); in vgpu_pci_cfg_mem_write() 118 void *p_data, unsigned int bytes) in intel_vgpu_emulate_cfg_read() argument 122 if (drm_WARN_ON(&i915->drm, bytes > 4)) in intel_vgpu_emulate_cfg_read() 126 offset + bytes > vgpu->gvt->device_info.cfg_space_size)) in intel_vgpu_emulate_cfg_read() 129 memcpy(p_data, vgpu_cfg_space(vgpu) + offset, bytes); in intel_vgpu_emulate_cfg_read() 146 unsigned int offset, void *p_data, unsigned int bytes) in emulate_pci_command_write() argument 152 vgpu_pci_cfg_mem_write(vgpu, offset, p_data, bytes); in emulate_pci_command_write() [all …]
|
| D | edid.c | 139 unsigned int offset, void *p_data, unsigned int bytes) in gmbus0_mmio_write() argument 144 memcpy(&vgpu_vreg(vgpu, offset), p_data, bytes); in gmbus0_mmio_write() 179 void *p_data, unsigned int bytes) in gmbus1_mmio_write() argument 280 void *p_data, unsigned int bytes) in gmbus3_mmio_write() argument 289 void *p_data, unsigned int bytes) in gmbus3_mmio_read() argument 302 memcpy(p_data, &vgpu_vreg(vgpu, offset), bytes); in gmbus3_mmio_read() 314 memcpy(p_data, &vgpu_vreg(vgpu, offset), bytes); in gmbus3_mmio_read() 335 memcpy(p_data, &vgpu_vreg(vgpu, offset), bytes); in gmbus3_mmio_read() 342 void *p_data, unsigned int bytes) in gmbus2_mmio_read() argument 348 memcpy(p_data, (void *)&value, bytes); in gmbus2_mmio_read() [all …]
|
| D | handlers.c | 94 void *p_data, unsigned int bytes) in read_vreg() argument 96 memcpy(p_data, &vgpu_vreg(vgpu, offset), bytes); in read_vreg() 100 void *p_data, unsigned int bytes) in write_vreg() argument 102 memcpy(&vgpu_vreg(vgpu, offset), p_data, bytes); in write_vreg() 199 unsigned int fence_num, void *p_data, unsigned int bytes) in sanitize_fence_mmio_access() argument 215 memset(p_data, 0, bytes); in sanitize_fence_mmio_access() 222 unsigned int offset, void *p_data, unsigned int bytes) in gamw_echo_dev_rw_ia_write() argument 242 write_vreg(vgpu, offset, p_data, bytes); in gamw_echo_dev_rw_ia_write() 247 void *p_data, unsigned int bytes) in fence_mmio_read() argument 252 p_data, bytes); in fence_mmio_read() [all …]
|
| /drivers/net/ethernet/freescale/dpaa/ |
| D | dpaa_eth_sysfs.c | 36 ssize_t bytes = 0; in dpaa_eth_show_fqids() local 69 bytes += sprintf(buf + bytes, in dpaa_eth_show_fqids() 72 bytes += sprintf(buf + bytes, in dpaa_eth_show_fqids() 91 bytes += sprintf(buf + bytes, "%s: %d\n", prevstr, in dpaa_eth_show_fqids() 94 bytes += sprintf(buf + bytes, "%s: %d - %d\n", prevstr, in dpaa_eth_show_fqids() 98 return bytes; in dpaa_eth_show_fqids() 105 ssize_t bytes = 0; in dpaa_eth_show_bpids() local 107 bytes += snprintf(buf + bytes, PAGE_SIZE - bytes, "%u\n", in dpaa_eth_show_bpids() 110 return bytes; in dpaa_eth_show_bpids()
|
| /drivers/accessibility/speakup/ |
| D | devsynth.c | 19 size_t bytes; in speakup_file_write() local 26 bytes = min(count, sizeof(buf)); in speakup_file_write() 27 if (copy_from_user(buf, ptr, bytes)) in speakup_file_write() 29 count -= bytes; in speakup_file_write() 30 ptr += bytes; in speakup_file_write() 32 synth_write(buf, bytes); in speakup_file_write() 44 size_t bytes; in speakup_file_writeu() local 56 bytes = min(count, sizeof(buf)); in speakup_file_writeu() 57 if (copy_from_user(buf, ptr, bytes)) in speakup_file_writeu() 61 for (in = 0, out = 0; in < bytes; in += consumed) { in speakup_file_writeu() [all …]
|
| /drivers/media/pci/cobalt/ |
| D | cobalt-omnitek.c | 172 unsigned bytes; in descriptor_list_create() local 193 bytes = min(sg_dma_len(scatter_list) - offset, in descriptor_list_create() 203 d->bytes = (bytes / 2) & ~3; in descriptor_list_create() 205 size -= d->bytes; in descriptor_list_create() 206 copied += d->bytes; in descriptor_list_create() 207 offset += d->bytes; in descriptor_list_create() 208 addr += d->bytes; in descriptor_list_create() 213 bytes -= d->bytes; in descriptor_list_create() 228 d->bytes = bytes; in descriptor_list_create() 230 size -= bytes; in descriptor_list_create() [all …]
|
| /drivers/ps3/ |
| D | ps3-vuart.c | 352 const void *buf, unsigned int bytes, u64 *bytes_written) in ps3_vuart_raw_write() argument 358 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_written); in ps3_vuart_raw_write() 369 *bytes_written, bytes, priv->stats.bytes_written); in ps3_vuart_raw_write() 382 unsigned int bytes, u64 *bytes_read) in ps3_vuart_raw_read() argument 387 dev_dbg(&dev->core, "%s:%d: %xh\n", __func__, __LINE__, bytes); in ps3_vuart_raw_read() 390 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_read); in ps3_vuart_raw_read() 401 *bytes_read, bytes, priv->stats.bytes_read); in ps3_vuart_raw_read() 415 unsigned int bytes) in ps3_vuart_clear_rx_bytes() argument 426 bytes = bytes ? min(bytes, (unsigned int)bytes_waiting) : bytes_waiting; in ps3_vuart_clear_rx_bytes() 428 dev_dbg(&dev->core, "%s:%d: %u\n", __func__, __LINE__, bytes); in ps3_vuart_clear_rx_bytes() [all …]
|
| /drivers/media/usb/hdpvr/ |
| D | hdpvr-core.c | 69 static void challenge(u8 *bytes) in challenge() argument 78 bytes[(idx >> 3) + 3] = bytes[(idx >> 2) & 0x3]; in challenge() 82 bytes[2] += bytes[3] * 4 + bytes[4] + bytes[5]; in challenge() 83 bytes[4] += bytes[(idx & 0x1) * 2] * 9 + 9; in challenge() 86 bytes[0] *= 8; in challenge() 87 bytes[0] += 7*idx + 4; in challenge() 88 bytes[6] += bytes[3] * 3; in challenge() 91 bytes[3 - (idx >> 3)] = bytes[idx >> 2]; in challenge() 92 bytes[5] += bytes[6] * 3; in challenge() 94 bytes[3] *= bytes[3] + 1; in challenge() [all …]
|
| /drivers/infiniband/sw/rxe/ |
| D | rxe_mr.c | 250 unsigned int bytes; in rxe_mr_copy_xarray() local 259 bytes = min_t(unsigned int, length, in rxe_mr_copy_xarray() 263 memcpy(addr, va + page_offset, bytes); in rxe_mr_copy_xarray() 265 memcpy(va + page_offset, addr, bytes); in rxe_mr_copy_xarray() 269 addr += bytes; in rxe_mr_copy_xarray() 270 length -= bytes; in rxe_mr_copy_xarray() 281 unsigned int bytes; in rxe_mr_copy_dma() local 287 bytes = min_t(unsigned int, length, in rxe_mr_copy_dma() 292 memcpy(va + page_offset, addr, bytes); in rxe_mr_copy_dma() 294 memcpy(addr, va + page_offset, bytes); in rxe_mr_copy_dma() [all …]
|
| /drivers/nvmem/ |
| D | zynqmp_nvmem.c | 60 void *val, size_t bytes, enum efuse_access flag, in zynqmp_efuse_access() argument 67 size_t words = bytes / WORD_INBYTES; in zynqmp_efuse_access() 72 if (bytes % WORD_INBYTES != 0) { in zynqmp_efuse_access() 83 memcpy(&value, val, bytes); in zynqmp_efuse_access() 103 data = dma_alloc_coherent(dev, sizeof(bytes), in zynqmp_efuse_access() 111 memcpy(data, val, bytes); in zynqmp_efuse_access() 135 memcpy(val, data, bytes); in zynqmp_efuse_access() 137 dma_free_coherent(dev, sizeof(bytes), in zynqmp_efuse_access() 146 static int zynqmp_nvmem_read(void *context, unsigned int offset, void *val, size_t bytes) in zynqmp_nvmem_read() argument 160 if (bytes != SOC_VER_SIZE) in zynqmp_nvmem_read() [all …]
|
| D | sunxi_sid.c | 40 void *val, size_t bytes) in sunxi_sid_read() argument 46 __ioread32_copy(val, sid->base + sid->value_offset + offset, bytes / 4); in sunxi_sid_read() 48 val += round_down(bytes, 4); in sunxi_sid_read() 49 offset += round_down(bytes, 4); in sunxi_sid_read() 50 bytes = bytes % 4; in sunxi_sid_read() 52 if (!bytes) in sunxi_sid_read() 57 memcpy(val, &word, bytes); in sunxi_sid_read() 94 void *val, size_t bytes) in sun8i_sid_read_by_reg() argument 101 while (bytes >= 4) { in sun8i_sid_read_by_reg() 108 bytes -= 4; in sun8i_sid_read_by_reg() [all …]
|
| D | qcom-spmi-sdam.c | 64 size_t bytes) in sdam_read() argument 70 if (!sdam_is_valid(sdam, offset, bytes)) { in sdam_read() 72 offset, bytes); in sdam_read() 76 rc = regmap_bulk_read(sdam->regmap, sdam->base + offset, val, bytes); in sdam_read() 79 offset, bytes, rc); in sdam_read() 85 size_t bytes) in sdam_write() argument 91 if (!sdam_is_valid(sdam, offset, bytes)) { in sdam_write() 93 offset, bytes); in sdam_write() 97 if (sdam_is_ro(offset, bytes)) { in sdam_write() 99 offset, bytes); in sdam_write() [all …]
|
| D | stm32-romem.c | 44 size_t bytes) in stm32_romem_read() argument 50 for (i = offset; i < offset + bytes; i++) in stm32_romem_read() 75 size_t bytes) in stm32_bsec_read() argument 86 rbytes = roundup(bytes + skip_bytes, 4); in stm32_bsec_read() 109 size = min(bytes, (size_t)(4 - skip_bytes)); in stm32_bsec_read() 111 size = min(bytes, (size_t)4); in stm32_bsec_read() 113 bytes -= size; in stm32_bsec_read() 122 size_t bytes) in stm32_bsec_write() argument 130 if ((bytes % 4) || (offset % 4)) in stm32_bsec_write() 133 for (i = offset; i < offset + bytes; i += 4) { in stm32_bsec_write() [all …]
|
| /drivers/most/ |
| D | most_snd.c | 57 void (*copy_fn)(void *alsa, void *most, unsigned int bytes); 77 static void swap_copy16(u16 *dest, const u16 *source, unsigned int bytes) in swap_copy16() argument 81 while (i < (bytes / 2)) { in swap_copy16() 87 static void swap_copy24(u8 *dest, const u8 *source, unsigned int bytes) in swap_copy24() argument 91 if (bytes < 2) in swap_copy24() 93 while (i < bytes - 2) { in swap_copy24() 101 static void swap_copy32(u32 *dest, const u32 *source, unsigned int bytes) in swap_copy32() argument 105 while (i < bytes / 4) { in swap_copy32() 111 static void alsa_to_most_memcpy(void *alsa, void *most, unsigned int bytes) in alsa_to_most_memcpy() argument 113 memcpy(most, alsa, bytes); in alsa_to_most_memcpy() [all …]
|
| /drivers/scsi/lpfc/ |
| D | lpfc_compat.h | 40 lpfc_memcpy_to_slim(void __iomem *dest, void *src, unsigned int bytes) in lpfc_memcpy_to_slim() argument 51 for (four_bytes = bytes /4; four_bytes > 0; four_bytes--) { in lpfc_memcpy_to_slim() 62 lpfc_memcpy_from_slim( void *dest, void __iomem *src, unsigned int bytes) in lpfc_memcpy_from_slim() argument 73 for (four_bytes = bytes /4; four_bytes > 0; four_bytes--) { in lpfc_memcpy_from_slim() 85 lpfc_memcpy_to_slim( void __iomem *dest, void *src, unsigned int bytes) in lpfc_memcpy_to_slim() argument 88 __iowrite32_copy(dest, src, bytes / sizeof(uint32_t)); in lpfc_memcpy_to_slim() 92 lpfc_memcpy_from_slim( void *dest, void __iomem *src, unsigned int bytes) in lpfc_memcpy_from_slim() argument 95 memcpy_fromio( dest, src, bytes); in lpfc_memcpy_from_slim()
|
| /drivers/infiniband/sw/siw/ |
| D | siw_qp_rx.c | 36 int pg_off, bytes, rv; in siw_rx_umem() local 52 bytes = min(len, (int)PAGE_SIZE - pg_off); in siw_rx_umem() 54 siw_dbg_qp(rx_qp(srx), "page %pK, bytes=%u\n", p, bytes); in siw_rx_umem() 58 bytes); in siw_rx_umem() 73 (u8 *)(dest + pg_off), bytes); in siw_rx_umem() 87 siw_crc_skb(srx, bytes); in siw_rx_umem() 92 srx->skb_offset += bytes; in siw_rx_umem() 93 copied += bytes; in siw_rx_umem() 94 len -= bytes; in siw_rx_umem() 95 dest_addr += bytes; in siw_rx_umem() [all …]
|
| /drivers/iommu/ |
| D | omap-iommu-debug.c | 32 ssize_t bytes; \ 37 bytes = scnprintf(p, maxcol, str, __stringify(name), \ 39 p += bytes; \ 40 len -= bytes; \ 69 ssize_t bytes) in omap_iommu_dump_ctx() argument 76 bytes = omap2_iommu_dump_ctx(obj, buf, bytes); in omap_iommu_dump_ctx() 80 return bytes; in omap_iommu_dump_ctx() 88 ssize_t bytes; in debug_read_regs() local 100 bytes = omap_iommu_dump_ctx(obj, p, count); in debug_read_regs() 101 if (bytes < 0) in debug_read_regs() [all …]
|
| D | omap-iommu.h | 211 #define iopgsz_max(bytes) \ argument 212 (((bytes) >= SZ_16M) ? SZ_16M : \ 213 ((bytes) >= SZ_1M) ? SZ_1M : \ 214 ((bytes) >= SZ_64K) ? SZ_64K : \ 215 ((bytes) >= SZ_4K) ? SZ_4K : 0) 217 #define bytes_to_iopgsz(bytes) \ argument 218 (((bytes) == SZ_16M) ? MMU_CAM_PGSZ_16M : \ 219 ((bytes) == SZ_1M) ? MMU_CAM_PGSZ_1M : \ 220 ((bytes) == SZ_64K) ? MMU_CAM_PGSZ_64K : \ 221 ((bytes) == SZ_4K) ? MMU_CAM_PGSZ_4K : -1) [all …]
|
| /drivers/vdpa/vdpa_sim/ |
| D | vdpa_sim_blk.c | 116 ssize_t bytes; in vdpasim_blk_handle_req() local 146 bytes = vringh_iov_pull_iotlb(&vq->vring, &vq->out_iov, &hdr, in vdpasim_blk_handle_req() 148 if (bytes != sizeof(hdr)) { in vdpasim_blk_handle_req() 153 to_pull -= bytes; in vdpasim_blk_handle_req() 179 bytes = vringh_iov_push_iotlb(&vq->vring, &vq->in_iov, in vdpasim_blk_handle_req() 182 if (bytes < 0) { in vdpasim_blk_handle_req() 185 bytes, offset, to_push); in vdpasim_blk_handle_req() 190 pushed += bytes; in vdpasim_blk_handle_req() 202 bytes = vringh_iov_pull_iotlb(&vq->vring, &vq->out_iov, in vdpasim_blk_handle_req() 205 if (bytes < 0) { in vdpasim_blk_handle_req() [all …]
|