| /OK3568_Linux_fs/kernel/arch/x86/crypto/ |
| H A D | cast5_avx_glue.c | 36 unsigned int nbytes) in cast5_fpu_begin() argument 39 walk, fpu_enabled, nbytes); in cast5_fpu_begin() 54 unsigned int nbytes; in ecb_crypt() local 60 while ((nbytes = walk.nbytes)) { in ecb_crypt() 64 fpu_enabled = cast5_fpu_begin(fpu_enabled, &walk, nbytes); in ecb_crypt() 67 if (nbytes >= bsize * CAST5_PARALLEL_BLOCKS) { in ecb_crypt() 74 nbytes -= bsize * CAST5_PARALLEL_BLOCKS; in ecb_crypt() 75 } while (nbytes >= bsize * CAST5_PARALLEL_BLOCKS); in ecb_crypt() 77 if (nbytes < bsize) in ecb_crypt() 89 nbytes -= bsize; in ecb_crypt() [all …]
|
| H A D | glue_helper.c | 28 unsigned int nbytes; in glue_ecb_req_128bit() local 33 while ((nbytes = walk.nbytes)) { in glue_ecb_req_128bit() 40 &walk, fpu_enabled, nbytes); in glue_ecb_req_128bit() 44 if (nbytes < func_bytes) in glue_ecb_req_128bit() 52 nbytes -= func_bytes; in glue_ecb_req_128bit() 53 } while (nbytes >= func_bytes); in glue_ecb_req_128bit() 55 if (nbytes < bsize) in glue_ecb_req_128bit() 58 err = skcipher_walk_done(&walk, nbytes); in glue_ecb_req_128bit() 72 unsigned int nbytes; in glue_cbc_encrypt_req_128bit() local 77 while ((nbytes = walk.nbytes)) { in glue_cbc_encrypt_req_128bit() [all …]
|
| H A D | blowfish_glue.c | 79 unsigned int nbytes; in ecb_crypt() local 84 while ((nbytes = walk.nbytes)) { in ecb_crypt() 89 if (nbytes >= bsize * 4) { in ecb_crypt() 95 nbytes -= bsize * 4; in ecb_crypt() 96 } while (nbytes >= bsize * 4); in ecb_crypt() 98 if (nbytes < bsize) in ecb_crypt() 108 nbytes -= bsize; in ecb_crypt() 109 } while (nbytes >= bsize); in ecb_crypt() 112 err = skcipher_walk_done(&walk, nbytes); in ecb_crypt() 132 unsigned int nbytes = walk->nbytes; in __cbc_encrypt() local [all …]
|
| H A D | des3_ede_glue.c | 80 unsigned int nbytes; in ecb_crypt() local 85 while ((nbytes = walk.nbytes)) { in ecb_crypt() 90 if (nbytes >= bsize * 3) { in ecb_crypt() 97 nbytes -= bsize * 3; in ecb_crypt() 98 } while (nbytes >= bsize * 3); in ecb_crypt() 100 if (nbytes < bsize) in ecb_crypt() 110 nbytes -= bsize; in ecb_crypt() 111 } while (nbytes >= bsize); in ecb_crypt() 114 err = skcipher_walk_done(&walk, nbytes); in ecb_crypt() 140 unsigned int nbytes = walk->nbytes; in __cbc_encrypt() local [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/test-drivers/vidtv/ |
| H A D | vidtv_ts.c | 53 u32 nbytes = 0; in vidtv_ts_null_write_into() local 62 nbytes += vidtv_memcpy(args.dest_buf, in vidtv_ts_null_write_into() 63 args.dest_offset + nbytes, in vidtv_ts_null_write_into() 71 nbytes += vidtv_memset(args.dest_buf, in vidtv_ts_null_write_into() 72 args.dest_offset + nbytes, in vidtv_ts_null_write_into() 75 TS_PACKET_LEN - nbytes); in vidtv_ts_null_write_into() 78 if (nbytes != TS_PACKET_LEN) in vidtv_ts_null_write_into() 81 nbytes); in vidtv_ts_null_write_into() 83 return nbytes; in vidtv_ts_null_write_into() 88 u32 nbytes = 0; in vidtv_ts_pcr_write_into() local [all …]
|
| H A D | vidtv_pes.c | 82 u32 nbytes = 0; /* the number of bytes written by this function */ in vidtv_pes_write_pts_dts() local 122 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_pts_dts() 123 args->dest_offset + nbytes, in vidtv_pes_write_pts_dts() 128 return nbytes; in vidtv_pes_write_pts_dts() 133 u32 nbytes = 0; /* the number of bytes written by this function */ in vidtv_pes_write_h() local 158 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_h() 159 args->dest_offset + nbytes, in vidtv_pes_write_h() 165 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_h() 166 args->dest_offset + nbytes, in vidtv_pes_write_h() 173 pts_dts_args.dest_offset = args->dest_offset + nbytes; in vidtv_pes_write_h() [all …]
|
| H A D | vidtv_psi.c | 179 u32 nbytes = 0; in vidtv_psi_ts_psi_write_into() local 191 nbytes += vidtv_memset(args->dest_buf, in vidtv_psi_ts_psi_write_into() 192 args->dest_offset + nbytes, in vidtv_psi_ts_psi_write_into() 199 nbytes_past_boundary = (args->dest_offset + nbytes) % TS_PACKET_LEN; in vidtv_psi_ts_psi_write_into() 206 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_psi_ts_psi_write_into() 207 args->dest_offset + nbytes, in vidtv_psi_ts_psi_write_into() 220 nbytes += vidtv_memset(args->dest_buf, in vidtv_psi_ts_psi_write_into() 221 args->dest_offset + nbytes, in vidtv_psi_ts_psi_write_into() 227 nbytes_past_boundary = (args->dest_offset + nbytes) % TS_PACKET_LEN; in vidtv_psi_ts_psi_write_into() 230 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_psi_ts_psi_write_into() [all …]
|
| H A D | vidtv_mux.c | 164 u32 nbytes; in vidtv_mux_push_si() local 214 nbytes = m->mux_buf_offset - initial_offset; in vidtv_mux_push_si() 218 return nbytes; in vidtv_mux_push_si() 225 u32 nbytes = 0; in vidtv_mux_push_pcr() local 236 nbytes += vidtv_ts_pcr_write_into(args); in vidtv_mux_push_pcr() 237 m->mux_buf_offset += nbytes; in vidtv_mux_push_pcr() 241 return nbytes; in vidtv_mux_push_pcr() 287 u32 nbytes = 0; in vidtv_mux_packetize_access_units() local 302 args.access_unit_len = au->nbytes; in vidtv_mux_packetize_access_units() 318 nbytes = m->mux_buf_offset - initial_offset; in vidtv_mux_packetize_access_units() [all …]
|
| /OK3568_Linux_fs/kernel/crypto/ |
| H A D | pcbc.c | 25 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_segment() local 37 } while ((nbytes -= bsize) >= bsize); in crypto_pcbc_encrypt_segment() 39 return nbytes; in crypto_pcbc_encrypt_segment() 47 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_inplace() local 59 } while ((nbytes -= bsize) >= bsize); in crypto_pcbc_encrypt_inplace() 61 return nbytes; in crypto_pcbc_encrypt_inplace() 69 unsigned int nbytes; in crypto_pcbc_encrypt() local 74 while ((nbytes = walk.nbytes)) { in crypto_pcbc_encrypt() 76 nbytes = crypto_pcbc_encrypt_inplace(req, &walk, in crypto_pcbc_encrypt() 79 nbytes = crypto_pcbc_encrypt_segment(req, &walk, in crypto_pcbc_encrypt() [all …]
|
| H A D | cfb.c | 52 unsigned int nbytes = walk->nbytes; in crypto_cfb_final() local 55 crypto_xor_cpy(dst, stream, src, nbytes); in crypto_cfb_final() 62 unsigned int nbytes = walk->nbytes; in crypto_cfb_encrypt_segment() local 74 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_segment() 78 return nbytes; in crypto_cfb_encrypt_segment() 85 unsigned int nbytes = walk->nbytes; in crypto_cfb_encrypt_inplace() local 96 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_inplace() 100 return nbytes; in crypto_cfb_encrypt_inplace() 112 while (walk.nbytes >= bsize) { in crypto_cfb_encrypt() 120 if (walk.nbytes) { in crypto_cfb_encrypt() [all …]
|
| H A D | cbc.c | 22 unsigned int nbytes = walk->nbytes; in crypto_cbc_encrypt_segment() local 40 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_segment() 42 return nbytes; in crypto_cbc_encrypt_segment() 50 unsigned int nbytes = walk->nbytes; in crypto_cbc_encrypt_inplace() local 66 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_inplace() 70 return nbytes; in crypto_cbc_encrypt_inplace() 81 while (walk.nbytes) { in crypto_cbc_encrypt() 97 unsigned int nbytes = walk->nbytes; in crypto_cbc_decrypt_segment() local 115 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_decrypt_segment() 119 return nbytes; in crypto_cbc_decrypt_segment() [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/spi/ |
| H A D | spi-mem-nodm.c | 21 if (op->data.nbytes) { in spi_mem_exec_op() 28 op_len = sizeof(op->cmd.opcode) + op->addr.nbytes + op->dummy.nbytes; in spi_mem_exec_op() 37 if (op->addr.nbytes) { in spi_mem_exec_op() 38 for (i = 0; i < op->addr.nbytes; i++) in spi_mem_exec_op() 40 (8 * (op->addr.nbytes - i - 1)); in spi_mem_exec_op() 42 pos += op->addr.nbytes; in spi_mem_exec_op() 45 if (op->dummy.nbytes) in spi_mem_exec_op() 46 memset(op_buf + pos, 0xff, op->dummy.nbytes); in spi_mem_exec_op() 60 ret = spi_xfer(slave, op->data.nbytes * 8, tx_buf, in spi_mem_exec_op() 71 tx_buf || rx_buf ? op->data.nbytes : 0, in spi_mem_exec_op() [all …]
|
| H A D | spi-mem.c | 42 if (!op->data.nbytes) in spi_controller_dma_map_mem_op_data() 55 return spi_map_buf(ctlr, dmadev, sgt, op->data.buf.in, op->data.nbytes, in spi_controller_dma_map_mem_op_data() 88 if (!op->data.nbytes) in spi_controller_dma_unmap_mem_op_data() 146 if (op->addr.nbytes && in spi_mem_default_supports_op() 150 if (op->dummy.nbytes && in spi_mem_default_supports_op() 154 if (op->data.nbytes && in spi_mem_default_supports_op() 265 tmpbufsize = sizeof(op->cmd.opcode) + op->addr.nbytes + in spi_mem_exec_op() 266 op->dummy.nbytes; in spi_mem_exec_op() 287 if (op->addr.nbytes) { in spi_mem_exec_op() 290 for (i = 0; i < op->addr.nbytes; i++) in spi_mem_exec_op() [all …]
|
| /OK3568_Linux_fs/kernel/arch/arm64/crypto/ |
| H A D | ghash-ce-glue.c | 369 int nbytes = walk.nbytes; in gcm_encrypt() local 373 if (unlikely(nbytes > 0 && nbytes < AES_BLOCK_SIZE)) { in gcm_encrypt() 374 src = dst = memcpy(buf + sizeof(buf) - nbytes, in gcm_encrypt() 375 src, nbytes); in gcm_encrypt() 376 } else if (nbytes < walk.total) { in gcm_encrypt() 377 nbytes &= ~(AES_BLOCK_SIZE - 1); in gcm_encrypt() 382 pmull_gcm_encrypt(nbytes, dst, src, ctx->ghash_key.h, in gcm_encrypt() 387 if (unlikely(!nbytes)) in gcm_encrypt() 390 if (unlikely(nbytes > 0 && nbytes < AES_BLOCK_SIZE)) in gcm_encrypt() 392 buf + sizeof(buf) - nbytes, nbytes); in gcm_encrypt() [all …]
|
| H A D | aes-neonbs-glue.c | 103 while (walk.nbytes >= AES_BLOCK_SIZE) { in __ecb_crypt() 104 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in __ecb_crypt() 106 if (walk.nbytes < walk.total) in __ecb_crypt() 115 walk.nbytes - blocks * AES_BLOCK_SIZE); in __ecb_crypt() 163 while (walk.nbytes >= AES_BLOCK_SIZE) { in cbc_encrypt() 164 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in cbc_encrypt() 172 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in cbc_encrypt() 186 while (walk.nbytes >= AES_BLOCK_SIZE) { in cbc_decrypt() 187 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in cbc_decrypt() 189 if (walk.nbytes < walk.total) in cbc_decrypt() [all …]
|
| /OK3568_Linux_fs/kernel/arch/powerpc/crypto/ |
| H A D | aes-spe-glue.c | 185 unsigned int nbytes; in ppc_ecb_crypt() local 190 while ((nbytes = walk.nbytes) != 0) { in ppc_ecb_crypt() 191 nbytes = min_t(unsigned int, nbytes, MAX_BYTES); in ppc_ecb_crypt() 192 nbytes = round_down(nbytes, AES_BLOCK_SIZE); in ppc_ecb_crypt() 197 ctx->key_enc, ctx->rounds, nbytes); in ppc_ecb_crypt() 200 ctx->key_dec, ctx->rounds, nbytes); in ppc_ecb_crypt() 203 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in ppc_ecb_crypt() 224 unsigned int nbytes; in ppc_cbc_crypt() local 229 while ((nbytes = walk.nbytes) != 0) { in ppc_cbc_crypt() 230 nbytes = min_t(unsigned int, nbytes, MAX_BYTES); in ppc_cbc_crypt() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/staging/comedi/ |
| H A D | comedi_buf.c | 341 unsigned int nbytes) in comedi_buf_write_alloc() argument 346 if (nbytes > unalloc) in comedi_buf_write_alloc() 347 nbytes = unalloc; in comedi_buf_write_alloc() 349 async->buf_write_alloc_count += nbytes; in comedi_buf_write_alloc() 357 return nbytes; in comedi_buf_write_alloc() 431 unsigned int nbytes) in comedi_buf_write_free() argument 436 if (nbytes > allocated) in comedi_buf_write_free() 437 nbytes = allocated; in comedi_buf_write_free() 439 async->buf_write_count += nbytes; in comedi_buf_write_free() 440 async->buf_write_ptr += nbytes; in comedi_buf_write_free() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/spi/ |
| H A D | spi-mtk-nor.c | 145 if (op->addr.nbytes == 4) { in mtk_nor_set_addr() 163 dummy = op->dummy.nbytes * BITS_PER_BYTE / op->dummy.buswidth; in mtk_nor_match_read() 190 tx_len = op->cmd.nbytes + op->addr.nbytes; in mtk_nor_match_prg() 194 tx_len += op->dummy.nbytes; in mtk_nor_match_prg() 202 if ((!op->addr.nbytes) && in mtk_nor_match_prg() 203 (tx_len + op->data.nbytes > MTK_NOR_REG_PRGDATA_MAX + 1)) in mtk_nor_match_prg() 209 rx_len = op->data.nbytes; in mtk_nor_match_prg() 210 prg_left = MTK_NOR_PRG_CNT_MAX / 8 - tx_len - op->dummy.nbytes; in mtk_nor_match_prg() 214 if (!op->addr.nbytes) in mtk_nor_match_prg() 219 prg_len = tx_len + op->dummy.nbytes + rx_len; in mtk_nor_match_prg() [all …]
|
| H A D | spi-mem.c | 40 if (!op->data.nbytes) in spi_controller_dma_map_mem_op_data() 53 return spi_map_buf(ctlr, dmadev, sgt, op->data.buf.in, op->data.nbytes, in spi_controller_dma_map_mem_op_data() 86 if (!op->data.nbytes) in spi_controller_dma_unmap_mem_op_data() 146 if (op->addr.nbytes && in spi_mem_check_buswidth() 150 if (op->dummy.nbytes && in spi_mem_check_buswidth() 165 if (op->cmd.nbytes != 2) in spi_mem_dtr_supports_op() 178 if (op->cmd.nbytes != 1) in spi_mem_default_supports_op() 195 if (!op->cmd.buswidth || !op->cmd.nbytes) in spi_mem_check_op() 198 if ((op->addr.nbytes && !op->addr.buswidth) || in spi_mem_check_op() 199 (op->dummy.nbytes && !op->dummy.buswidth) || in spi_mem_check_op() [all …]
|
| /OK3568_Linux_fs/kernel/lib/mpi/ |
| H A D | mpicoder.c | 36 MPI mpi_read_raw_data(const void *xbuffer, size_t nbytes) in mpi_read_raw_data() argument 44 while (nbytes > 0 && buffer[0] == 0) { in mpi_read_raw_data() 46 nbytes--; in mpi_read_raw_data() 49 nbits = nbytes * 8; in mpi_read_raw_data() 54 if (nbytes > 0) in mpi_read_raw_data() 57 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_read_raw_data() 65 if (nbytes > 0) { in mpi_read_raw_data() 66 i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB; in mpi_read_raw_data() 85 unsigned int nbits, nbytes; in mpi_read_from_buffer() local 97 nbytes = DIV_ROUND_UP(nbits, 8); in mpi_read_from_buffer() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/infiniband/hw/hfi1/ |
| H A D | pio_copy.c | 225 unsigned int nbytes) in read_low_bytes() argument 228 jcopy(&pbuf->carry.val8[0], from, nbytes); in read_low_bytes() 229 pbuf->carry_bytes = nbytes; in read_low_bytes() 241 const void *from, unsigned int nbytes) in read_extra_bytes() argument 243 jcopy(&pbuf->carry.val8[pbuf->carry_bytes], from, nbytes); in read_extra_bytes() 244 pbuf->carry_bytes += nbytes; in read_extra_bytes() 304 const void *from, size_t nbytes) in seg_pio_copy_start() argument 314 dend = dest + ((nbytes >> 3) * sizeof(u64)); in seg_pio_copy_start() 379 read_low_bytes(pbuf, from, nbytes & 0x7); in seg_pio_copy_start() 381 pbuf->qw_written = 1 /*PBC*/ + (nbytes >> 3); in seg_pio_copy_start() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/crypto/rockchip/ |
| H A D | rk_crypto_ahash_utils.c | 80 static u32 rk_calc_lastc_new_len(u32 nbytes, u32 old_len) in rk_calc_lastc_new_len() argument 82 u32 total_len = nbytes + old_len; in rk_calc_lastc_new_len() 85 return nbytes; in rk_calc_lastc_new_len() 215 CRYPTO_TRACE("nbytes = %u", req->nbytes); in rk_ahash_update() 255 CRYPTO_TRACE("nbytes = %u", req->nbytes); in rk_ahash_finup() 262 if (req->nbytes == 0 && in rk_ahash_finup() 275 CRYPTO_TRACE("calc data %u bytes.", req->nbytes); in rk_ahash_digest() 289 unsigned int nbytes; in rk_ahash_start() local 293 ctx->hash_tmp_len, ctx->lastc_len, req->nbytes, rctx->flag); in rk_ahash_start() 296 if (req->nbytes == 0 && !(rctx->flag & RK_FLAG_FINAL)) in rk_ahash_start() [all …]
|
| /OK3568_Linux_fs/kernel/tools/arch/x86/lib/ |
| H A D | insn.c | 144 prefixes->nbytes++; in insn_get_prefixes() 168 insn->rex_prefix.nbytes = 1; in insn_get_prefixes() 198 insn->vex_prefix.nbytes = 4; in insn_get_prefixes() 206 insn->vex_prefix.nbytes = 3; in insn_get_prefixes() 218 insn->vex_prefix.nbytes = 2; in insn_get_prefixes() 265 opcode->nbytes = 1; in insn_get_opcode() 288 opcode->bytes[opcode->nbytes++] = op; in insn_get_opcode() 336 modrm->nbytes = 1; in insn_get_modrm() 384 return (modrm->nbytes && (modrm->value & 0xc7) == 0x5); in insn_rip_relative() 412 if (insn->modrm.nbytes) { in insn_get_sib() [all …]
|
| /OK3568_Linux_fs/kernel/arch/x86/lib/ |
| H A D | insn.c | 144 prefixes->nbytes++; in insn_get_prefixes() 168 insn->rex_prefix.nbytes = 1; in insn_get_prefixes() 198 insn->vex_prefix.nbytes = 4; in insn_get_prefixes() 206 insn->vex_prefix.nbytes = 3; in insn_get_prefixes() 218 insn->vex_prefix.nbytes = 2; in insn_get_prefixes() 265 opcode->nbytes = 1; in insn_get_opcode() 288 opcode->bytes[opcode->nbytes++] = op; in insn_get_opcode() 336 modrm->nbytes = 1; in insn_get_modrm() 384 return (modrm->nbytes && (modrm->value & 0xc7) == 0x5); in insn_rip_relative() 412 if (insn->modrm.nbytes) { in insn_get_sib() [all …]
|
| /OK3568_Linux_fs/kernel/lib/crypto/ |
| H A D | poly1305.c | 31 unsigned int nbytes) in poly1305_update_generic() argument 36 bytes = min(nbytes, POLY1305_BLOCK_SIZE - desc->buflen); in poly1305_update_generic() 39 nbytes -= bytes; in poly1305_update_generic() 49 if (likely(nbytes >= POLY1305_BLOCK_SIZE)) { in poly1305_update_generic() 51 nbytes / POLY1305_BLOCK_SIZE, 1); in poly1305_update_generic() 52 src += nbytes - (nbytes % POLY1305_BLOCK_SIZE); in poly1305_update_generic() 53 nbytes %= POLY1305_BLOCK_SIZE; in poly1305_update_generic() 56 if (unlikely(nbytes)) { in poly1305_update_generic() 57 desc->buflen = nbytes; in poly1305_update_generic() 58 memcpy(desc->buf, src, nbytes); in poly1305_update_generic()
|