| /linux/drivers/comedi/ |
| H A D | comedi_buf.c | 277 unsigned int nbytes) in _comedi_buf_write_alloc() argument 282 if (nbytes > unalloc) in _comedi_buf_write_alloc() 283 nbytes = unalloc; in _comedi_buf_write_alloc() 285 async->buf_write_alloc_count += nbytes; in _comedi_buf_write_alloc() 293 return nbytes; in _comedi_buf_write_alloc() 308 unsigned int nbytes) in comedi_buf_write_alloc() argument 311 nbytes = _comedi_buf_write_alloc(s, nbytes); in comedi_buf_write_alloc() 314 nbytes = 0; in comedi_buf_write_alloc() 316 return nbytes; in comedi_buf_write_alloc() 378 unsigned int nbytes) in _comedi_buf_write_free() argument [all …]
|
| /linux/drivers/media/test-drivers/vidtv/ |
| H A D | vidtv_pes.c | 83 u32 nbytes = 0; /* the number of bytes written by this function */ in vidtv_pes_write_pts_dts() local 123 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_pts_dts() 124 args->dest_offset + nbytes, in vidtv_pes_write_pts_dts() 129 return nbytes; in vidtv_pes_write_pts_dts() 134 u32 nbytes = 0; /* the number of bytes written by this function */ in vidtv_pes_write_h() local 159 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_h() 160 args->dest_offset + nbytes, in vidtv_pes_write_h() 166 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_h() 167 args->dest_offset + nbytes, in vidtv_pes_write_h() 174 pts_dts_args.dest_offset = args->dest_offset + nbytes; in vidtv_pes_write_h() [all …]
|
| /linux/arch/x86/crypto/ |
| H A D | sm4_aesni_avx_glue.c | 42 unsigned int nbytes; in ecb_do_crypt() local 47 while ((nbytes = walk.nbytes) > 0) { in ecb_do_crypt() 52 while (nbytes >= SM4_CRYPT8_BLOCK_SIZE) { in ecb_do_crypt() 56 nbytes -= SM4_CRYPT8_BLOCK_SIZE; in ecb_do_crypt() 58 while (nbytes >= SM4_BLOCK_SIZE) { in ecb_do_crypt() 59 unsigned int nblocks = min(nbytes >> 4, 4u); in ecb_do_crypt() 63 nbytes -= nblocks * SM4_BLOCK_SIZE; in ecb_do_crypt() 67 err = skcipher_walk_done(&walk, nbytes); in ecb_do_crypt() 96 unsigned int nbytes; in sm4_cbc_encrypt() local 101 while ((nbytes = walk.nbytes) > 0) { in sm4_cbc_encrypt() [all …]
|
| H A D | aria_gfni_avx512_glue.c | 80 unsigned int nbytes; in aria_avx512_ctr_encrypt() local 85 while ((nbytes = walk.nbytes) > 0) { in aria_avx512_ctr_encrypt() 89 while (nbytes >= ARIA_GFNI_AVX512_PARALLEL_BLOCK_SIZE) { in aria_avx512_ctr_encrypt() 97 nbytes -= ARIA_GFNI_AVX512_PARALLEL_BLOCK_SIZE; in aria_avx512_ctr_encrypt() 100 while (nbytes >= ARIA_AESNI_AVX2_PARALLEL_BLOCK_SIZE) { in aria_avx512_ctr_encrypt() 108 nbytes -= ARIA_AESNI_AVX2_PARALLEL_BLOCK_SIZE; in aria_avx512_ctr_encrypt() 111 while (nbytes >= ARIA_AESNI_PARALLEL_BLOCK_SIZE) { in aria_avx512_ctr_encrypt() 119 nbytes -= ARIA_AESNI_PARALLEL_BLOCK_SIZE; in aria_avx512_ctr_encrypt() 122 while (nbytes >= ARIA_BLOCK_SIZE) { in aria_avx512_ctr_encrypt() 134 nbytes -= ARIA_BLOCK_SIZE; in aria_avx512_ctr_encrypt() [all …]
|
| H A D | aesni-intel_glue.c | 597 unsigned int nbytes; 640 while (unlikely((nbytes = walk.nbytes) < walk.total)) { in ctr_crypt() 648 nbytes = round_down(nbytes, AES_BLOCK_SIZE); in ctr_crypt() 650 walk.dst.virt.addr, nbytes, flags); in ctr_crypt() 651 le_ctr[0] += nbytes / AES_BLOCK_SIZE; in ctr_crypt() 653 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in ctr_crypt() 660 walk.dst.virt.addr, nbytes, flag in ctr_crypt() 127 unsigned int nbytes; ecb_encrypt() local 149 unsigned int nbytes; ecb_decrypt() local 171 unsigned int nbytes; cbc_encrypt() local 193 unsigned int nbytes; cbc_decrypt() local 330 unsigned int nbytes; ctr_crypt_aesni() local 610 unsigned int nbytes, p1_nbytes, nblocks; ctr_crypt() local 675 unsigned int nbytes; xctr_crypt() local 1338 unsigned int nbytes; gcm_crypt() local [all...] |
| H A D | aria_aesni_avx2_glue.c | 92 unsigned int nbytes; in aria_avx2_ctr_encrypt() local 97 while ((nbytes = walk.nbytes) > 0) { in aria_avx2_ctr_encrypt() 101 while (nbytes >= ARIA_AESNI_AVX2_PARALLEL_BLOCK_SIZE) { in aria_avx2_ctr_encrypt() 109 nbytes -= ARIA_AESNI_AVX2_PARALLEL_BLOCK_SIZE; in aria_avx2_ctr_encrypt() 112 while (nbytes >= ARIA_AESNI_PARALLEL_BLOCK_SIZE) { in aria_avx2_ctr_encrypt() 120 nbytes -= ARIA_AESNI_PARALLEL_BLOCK_SIZE; in aria_avx2_ctr_encrypt() 123 while (nbytes >= ARIA_BLOCK_SIZE) { in aria_avx2_ctr_encrypt() 134 nbytes -= ARIA_BLOCK_SIZE; in aria_avx2_ctr_encrypt() 137 if (walk.nbytes == walk.total && nbytes > 0) { in aria_avx2_ctr_encrypt() 146 nbytes); in aria_avx2_ctr_encrypt() [all …]
|
| H A D | aria_aesni_avx_glue.c | 90 unsigned int nbytes; in aria_avx_ctr_encrypt() local 95 while ((nbytes = walk.nbytes) > 0) { in aria_avx_ctr_encrypt() 99 while (nbytes >= ARIA_AESNI_PARALLEL_BLOCK_SIZE) { in aria_avx_ctr_encrypt() 107 nbytes -= ARIA_AESNI_PARALLEL_BLOCK_SIZE; in aria_avx_ctr_encrypt() 110 while (nbytes >= ARIA_BLOCK_SIZE) { in aria_avx_ctr_encrypt() 121 nbytes -= ARIA_BLOCK_SIZE; in aria_avx_ctr_encrypt() 124 if (walk.nbytes == walk.total && nbytes > 0) { in aria_avx_ctr_encrypt() 133 nbytes); in aria_avx_ctr_encrypt() 134 dst += nbytes; in aria_avx_ctr_encrypt() 135 src += nbytes; in aria_avx_ctr_encrypt() [all …]
|
| H A D | ecb_cbc_helpers.h | 20 while (walk.nbytes > 0) { \ 21 unsigned int nbytes = walk.nbytes; \ 23 nbytes >= __fpu_blocks * __bsize; \ 35 nbytes -= (blocks) * __bsize; \ 44 while (nbytes >= __blocks * __bsize) { \ 52 while (nbytes >= __bsize) { \ 67 while (nbytes >= __blocks * __bsize) { \ 80 err = skcipher_walk_done(&walk, nbytes); \
|
| /linux/crypto/ |
| H A D | scatterwalk.c | 18 void scatterwalk_skip(struct scatter_walk *walk, unsigned int nbytes) in scatterwalk_skip() argument 22 nbytes += walk->offset - sg->offset; in scatterwalk_skip() 24 while (nbytes > sg->length) { in scatterwalk_skip() 25 nbytes -= sg->length; in scatterwalk_skip() 29 walk->offset = sg->offset + nbytes; in scatterwalk_skip() 34 unsigned int nbytes) in memcpy_from_scatterwalk() argument 39 to_copy = scatterwalk_next(walk, nbytes); in memcpy_from_scatterwalk() 43 nbytes -= to_copy; in memcpy_from_scatterwalk() 44 } while (nbytes); in memcpy_from_scatterwalk() 49 unsigned int nbytes) in memcpy_to_scatterwalk() argument [all …]
|
| /linux/include/crypto/ |
| H A D | scatterwalk.h | 53 unsigned int nbytes) in scatterwalk_clamp() argument 80 return min3(nbytes, len_this_sg, limit); in scatterwalk_clamp() 144 unsigned int nbytes = scatterwalk_clamp(walk, total); in scatterwalk_next() local 147 return nbytes; in scatterwalk_next() 157 unsigned int nbytes) in scatterwalk_advance() argument 159 walk->offset += nbytes; in scatterwalk_advance() 171 unsigned int nbytes) in scatterwalk_done_src() argument 174 scatterwalk_advance(walk, nbytes); in scatterwalk_done_src() 187 unsigned int nbytes) in __scatterwalk_flush_dcache_pages() argument 198 num_pages = nbytes / PAGE_SIZE; in __scatterwalk_flush_dcache_pages() [all …]
|
| /linux/arch/arm64/crypto/ |
| H A D | sm4-neon-glue.c | 39 unsigned int nbytes; in sm4_ecb_do_crypt() local 44 while ((nbytes = walk.nbytes) > 0) { in sm4_ecb_do_crypt() 49 nblocks = nbytes / SM4_BLOCK_SIZE; in sm4_ecb_do_crypt() 55 err = skcipher_walk_done(&walk, nbytes % SM4_BLOCK_SIZE); in sm4_ecb_do_crypt() 82 unsigned int nbytes; in sm4_cbc_encrypt() local 87 while ((nbytes = walk.nbytes) > 0) { in sm4_cbc_encrypt() 92 while (nbytes >= SM4_BLOCK_SIZE) { in sm4_cbc_encrypt() 98 nbytes -= SM4_BLOCK_SIZE; in sm4_cbc_encrypt() 103 err = skcipher_walk_done(&walk, nbytes); in sm4_cbc_encrypt() 114 unsigned int nbytes; in sm4_cbc_decrypt() local [all …]
|
| H A D | aes-neonbs-glue.c | 97 while (walk.nbytes >= AES_BLOCK_SIZE) { in __ecb_crypt() 98 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in __ecb_crypt() 100 if (walk.nbytes < walk.total) in __ecb_crypt() 108 walk.nbytes - blocks * AES_BLOCK_SIZE); in __ecb_crypt() 159 while (walk.nbytes >= AES_BLOCK_SIZE) { in cbc_encrypt() 160 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in cbc_encrypt() 168 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in cbc_encrypt() 182 while (walk.nbytes >= AES_BLOCK_SIZE) { in cbc_decrypt() 183 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in cbc_decrypt() 185 if (walk.nbytes < wal in cbc_decrypt() 211 int nbytes = walk.nbytes % (8 * AES_BLOCK_SIZE); ctr_encrypt() local 282 int nbytes, err; __xts_crypt() local [all...] |
| H A D | sm4-ce-glue.c | 24 #define BYTES2BLKS(nbytes) ((nbytes) >> 4) argument 36 u8 *iv, unsigned int nbytes); 38 u8 *iv, unsigned int nbytes); 42 u8 *tweak, unsigned int nbytes, 45 u8 *tweak, unsigned int nbytes, 109 unsigned int nbytes; in sm4_ecb_do_crypt() local 114 while ((nbytes = walk.nbytes) > 0) { in sm4_ecb_do_crypt() 120 nblks = BYTES2BLKS(nbytes); in sm4_ecb_do_crypt() 123 nbytes -= nblks * SM4_BLOCK_SIZE; in sm4_ecb_do_crypt() 127 err = skcipher_walk_done(&walk, nbytes); in sm4_ecb_do_crypt() [all …]
|
| /linux/drivers/spi/ |
| H A D | spi-realtek-rtl-snand.c | 57 if (op->cmd.nbytes != 1 || op->cmd.buswidth != 1) in rtl_snand_supports_op() 91 if (op->addr.nbytes && op->addr.buswidth == 1) { in rtl_snand_xfer_head() 92 val |= op->addr.val << ((3 - op->addr.nbytes) * 8); in rtl_snand_xfer_head() 93 len += op->addr.nbytes; in rtl_snand_xfer_head() 113 val = op->addr.val << ((3 - op->addr.nbytes) * 8); in rtl_snand_xfer_head() 114 len = op->addr.nbytes; in rtl_snand_xfer_head() 130 if (op->dummy.nbytes) { in rtl_snand_xfer_head() 134 CMR_WID(op->dummy.buswidth) | CMR_LEN(op->dummy.nbytes)); in rtl_snand_xfer_head() 157 unsigned int pos, nbytes; in rtl_snand_xfer() local 167 len = op->data.nbytes; in rtl_snand_xfer() [all …]
|
| H A D | spi-wpcm-fiu.c | 77 static void wpcm_fiu_set_data(struct wpcm_fiu_spi *fiu, const u8 *data, unsigned int nbytes) in wpcm_fiu_set_data() argument 81 for (i = 0; i < nbytes; i++) in wpcm_fiu_set_data() 85 static void wpcm_fiu_get_data(struct wpcm_fiu_spi *fiu, u8 *data, unsigned int nbytes) in wpcm_fiu_get_data() argument 89 for (i = 0; i < nbytes; i++) in wpcm_fiu_get_data() 145 return (op->addr.nbytes == 0 || op->addr.nbytes == 3) && in wpcm_fiu_normal_match() 146 op->dummy.nbytes == 0 && op->data.nbytes <= 4; in wpcm_fiu_normal_match() 157 wpcm_fiu_set_data(fiu, op->data.buf.out, op->data.nbytes); in wpcm_fiu_normal_exec() 159 ret = wpcm_fiu_do_uma(fiu, spi_get_chipselect(mem->spi, 0), op->addr.nbytes == 3, in wpcm_fiu_normal_exec() 160 op->data.dir == SPI_MEM_DATA_OUT, op->data.nbytes); in wpcm_fiu_normal_exec() 163 wpcm_fiu_get_data(fiu, op->data.buf.in, op->data.nbytes); in wpcm_fiu_normal_exec() [all …]
|
| H A D | spi-fsl-qspi.c | 399 if (op->addr.nbytes) in fsl_qspi_supports_op() 402 if (op->dummy.nbytes) in fsl_qspi_supports_op() 405 if (op->data.nbytes) in fsl_qspi_supports_op() 415 if (op->addr.nbytes + in fsl_qspi_supports_op() 416 (op->dummy.nbytes ? 1:0) + in fsl_qspi_supports_op() 417 (op->data.nbytes ? 1:0) > 6) in fsl_qspi_supports_op() 421 if (op->dummy.nbytes && in fsl_qspi_supports_op() 422 (op->dummy.nbytes * 8 / op->dummy.buswidth > 64)) in fsl_qspi_supports_op() 427 (op->data.nbytes > q->devtype_data->ahb_buf_size || in fsl_qspi_supports_op() 428 (op->data.nbytes > q->devtype_data->rxfifo - 4 && in fsl_qspi_supports_op() [all …]
|
| /linux/drivers/infiniband/hw/hfi1/ |
| H A D | pio_copy.c | 184 unsigned int nbytes) in read_low_bytes() argument 187 jcopy(&pbuf->carry.val8[0], from, nbytes); in read_low_bytes() 188 pbuf->carry_bytes = nbytes; in read_low_bytes() 200 const void *from, unsigned int nbytes) in read_extra_bytes() argument 202 jcopy(&pbuf->carry.val8[pbuf->carry_bytes], from, nbytes); in read_extra_bytes() 203 pbuf->carry_bytes += nbytes; in read_extra_bytes() 263 const void *from, size_t nbytes) in seg_pio_copy_start() argument 273 dend = dest + ((nbytes >> 3) * sizeof(u64)); in seg_pio_copy_start() 338 read_low_bytes(pbuf, from, nbytes & 0x7); in seg_pio_copy_start() 340 pbuf->qw_written = 1 /*PBC*/ + (nbytes >> 3); in seg_pio_copy_start() [all …]
|
| /linux/arch/x86/include/asm/ |
| H A D | insn.h | 23 unsigned char nbytes; member 30 p->nbytes = n; in insn_field_set() 49 unsigned char nbytes; member 57 p->nbytes = n; in insn_field_set() 187 return insn->rex_prefix.nbytes == 2; in insn_is_rex2() 206 return (insn->vex_prefix.nbytes == 4); in insn_is_evex() 232 if (insn->vex_prefix.nbytes == 2) /* 2 bytes VEX */ in insn_vex_m_bits() 234 else if (insn->vex_prefix.nbytes == 3) /* 3 bytes VEX */ in insn_vex_m_bits() 242 if (insn->vex_prefix.nbytes == 2) /* 2 bytes VEX */ in insn_vex_p_bits() 250 if (insn->vex_prefix.nbytes < 3) in insn_vex_w_bit() [all …]
|
| /linux/tools/arch/x86/include/asm/ |
| H A D | insn.h | 23 unsigned char nbytes; member 30 p->nbytes = n; in insn_field_set() 49 unsigned char nbytes; member 57 p->nbytes = n; in insn_field_set() 187 return insn->rex_prefix.nbytes == 2; in insn_is_rex2() 206 return (insn->vex_prefix.nbytes == 4); in insn_is_evex() 232 if (insn->vex_prefix.nbytes == 2) /* 2 bytes VEX */ in insn_vex_m_bits() 234 else if (insn->vex_prefix.nbytes == 3) /* 3 bytes VEX */ in insn_vex_m_bits() 242 if (insn->vex_prefix.nbytes == 2) /* 2 bytes VEX */ in insn_vex_p_bits() 250 if (insn->vex_prefix.nbytes < 3) in insn_vex_w_bit() [all …]
|
| /linux/arch/s390/crypto/ |
| H A D | aes_s390.c | 70 unsigned int nbytes; member 125 unsigned int nbytes, n; in ecb_aes_crypt() local 132 while (!ret && ((nbytes = walk.nbytes) != 0)) { in ecb_aes_crypt() 134 n = nbytes & ~(AES_BLOCK_SIZE - 1); in ecb_aes_crypt() 137 ret = skcipher_walk_done(&walk, nbytes - n); in ecb_aes_crypt() 221 unsigned int nbytes, n; in cbc_aes_crypt() local 236 while (!ret && ((nbytes = walk.nbytes) != 0)) { in cbc_aes_crypt() 238 n = nbytes & ~(AES_BLOCK_SIZE - 1); in cbc_aes_crypt() 242 ret = skcipher_walk_done(&walk, nbytes - n); in cbc_aes_crypt() 321 unsigned int offset, nbytes, n; in xts_aes_crypt() local [all …]
|
| /linux/fs/coda/ |
| H A D | psdev.c | 92 size_t nbytes, loff_t *off) in coda_psdev_write() argument 103 if (nbytes < (2 * sizeof(u_int32_t))) in coda_psdev_write() 114 if ( nbytes < sizeof(struct coda_out_hdr) ) { in coda_psdev_write() 117 count = nbytes; in coda_psdev_write() 120 if ( nbytes > size ) { in coda_psdev_write() 123 nbytes = size; in coda_psdev_write() 126 dcbuf = vmemdup_user(buf, nbytes); in coda_psdev_write() 133 error = coda_downcall(vcp, hdr.opcode, dcbuf, nbytes); in coda_psdev_write() 142 count = nbytes; in coda_psdev_write() 166 if (req->uc_outSize < nbytes) { in coda_psdev_write() [all …]
|
| /linux/drivers/iio/pressure/ |
| H A D | abp2030pa_i2c.c | 16 static int abp2_i2c_read(struct abp2_data *data, u8 unused, u8 nbytes) in abp2_i2c_read() argument 21 if (nbytes > ABP2_MEASUREMENT_RD_SIZE) in abp2_i2c_read() 24 ret = i2c_master_recv(client, data->rx_buf, nbytes); in abp2_i2c_read() 27 if (ret != nbytes) in abp2_i2c_read() 33 static int abp2_i2c_write(struct abp2_data *data, u8 cmd, u8 nbytes) in abp2_i2c_write() argument 38 if (nbytes > ABP2_MEASUREMENT_RD_SIZE) in abp2_i2c_write() 42 ret = i2c_master_send(client, data->tx_buf, nbytes); in abp2_i2c_write() 45 if (ret != nbytes) in abp2_i2c_write()
|
| /linux/drivers/crypto/ |
| H A D | padlock-aes.c | 347 unsigned int nbytes; in ecb_aes_encrypt() 354 while ((nbytes = walk.nbytes) != 0) { in ecb_aes_encrypt() 357 nbytes / AES_BLOCK_SIZE); in ecb_aes_encrypt() 358 nbytes &= AES_BLOCK_SIZE - 1; in ecb_aes_encrypt() 359 err = skcipher_walk_done(&walk, nbytes); in ecb_aes_encrypt() 372 unsigned int nbytes; in ecb_aes_decrypt() 379 while ((nbytes = walk.nbytes) != 0) { in ecb_aes_decrypt() 382 nbytes / AES_BLOCK_SIZ in ecb_aes_decrypt() 349 unsigned int nbytes; ecb_aes_encrypt() local 374 unsigned int nbytes; ecb_aes_decrypt() local 414 unsigned int nbytes; cbc_aes_encrypt() local 441 unsigned int nbytes; cbc_aes_decrypt() local [all...] |
| /linux/drivers/pci/hotplug/ |
| H A D | rpadlpar_sysfs.c | 28 const char *buf, size_t nbytes) in add_slot_store() argument 34 if (nbytes >= MAX_DRC_NAME_LEN) in add_slot_store() 37 strscpy(drc_name, buf, nbytes + 1); in add_slot_store() 47 return nbytes; in add_slot_store() 58 const char *buf, size_t nbytes) in remove_slot_store() argument 64 if (nbytes >= MAX_DRC_NAME_LEN) in remove_slot_store() 67 strscpy(drc_name, buf, nbytes + 1); in remove_slot_store() 77 return nbytes; in remove_slot_store()
|
| /linux/lib/crypto/ |
| H A D | poly1305.c | 38 size_t nbytes) in poly1305_update() argument 40 if (nbytes >= POLY1305_BLOCK_SIZE - desc->buflen) { in poly1305_update() 48 nbytes -= l; in poly1305_update() 55 bulk_len = round_down(nbytes, POLY1305_BLOCK_SIZE); in poly1305_update() 56 nbytes %= POLY1305_BLOCK_SIZE; in poly1305_update() 63 if (nbytes) { in poly1305_update() 64 memcpy(&desc->buf[desc->buflen], src, nbytes); in poly1305_update() 65 desc->buflen += nbytes; in poly1305_update()
|