/openbmc/linux/net/netfilter/ |
H A D | nft_set_pipapo_avx2.c | 45 #define NFT_PIPAPO_AVX2_BUCKET_LOAD4(reg, lt, group, v, bsize) \ argument 48 (v)) * (bsize)]) 49 #define NFT_PIPAPO_AVX2_BUCKET_LOAD8(reg, lt, group, v, bsize) \ argument 52 (v)) * (bsize)]) 219 int i, ret = -1, m256_size = f->bsize / NFT_PIPAPO_LONGS_PER_M256, b; in nft_pipapo_avx2_lookup_4b_2() 221 unsigned long *lt = f->lt, bsize = f->bsize; in nft_pipapo_avx2_lookup_4b_2() local 228 NFT_PIPAPO_AVX2_BUCKET_LOAD4(0, lt, 0, pg[0], bsize); in nft_pipapo_avx2_lookup_4b_2() 229 NFT_PIPAPO_AVX2_BUCKET_LOAD4(1, lt, 1, pg[1], bsize); in nft_pipapo_avx2_lookup_4b_2() 232 NFT_PIPAPO_AVX2_BUCKET_LOAD4(0, lt, 0, pg[0], bsize); in nft_pipapo_avx2_lookup_4b_2() 234 NFT_PIPAPO_AVX2_BUCKET_LOAD4(1, lt, 1, pg[1], bsize); in nft_pipapo_avx2_lookup_4b_2() [all …]
|
H A D | nft_set_pipapo.h | 124 size_t bsize; member 207 __bitmap_and(dst, dst, lt + v * f->bsize, in pipapo_and_field_buckets_4bit() 208 f->bsize * BITS_PER_LONG); in pipapo_and_field_buckets_4bit() 209 lt += f->bsize * NFT_PIPAPO_BUCKETS(4); in pipapo_and_field_buckets_4bit() 212 __bitmap_and(dst, dst, lt + v * f->bsize, in pipapo_and_field_buckets_4bit() 213 f->bsize * BITS_PER_LONG); in pipapo_and_field_buckets_4bit() 214 lt += f->bsize * NFT_PIPAPO_BUCKETS(4); in pipapo_and_field_buckets_4bit() 232 __bitmap_and(dst, dst, lt + *data * f->bsize, in pipapo_and_field_buckets_8bit() 233 f->bsize * BITS_PER_LONG); in pipapo_and_field_buckets_8bit() 234 lt += f->bsize * NFT_PIPAPO_BUCKETS(8); in pipapo_and_field_buckets_8bit() [all …]
|
/openbmc/linux/crypto/ |
H A D | cbc.c | 20 unsigned int bsize = crypto_skcipher_blocksize(skcipher); in crypto_cbc_encrypt_segment() local 34 crypto_xor(iv, src, bsize); in crypto_cbc_encrypt_segment() 36 memcpy(iv, dst, bsize); in crypto_cbc_encrypt_segment() 38 src += bsize; in crypto_cbc_encrypt_segment() 39 dst += bsize; in crypto_cbc_encrypt_segment() 40 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_segment() 48 unsigned int bsize = crypto_skcipher_blocksize(skcipher); in crypto_cbc_encrypt_inplace() local 61 crypto_xor(src, iv, bsize); in crypto_cbc_encrypt_inplace() 65 src += bsize; in crypto_cbc_encrypt_inplace() 66 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_inplace() [all …]
|
H A D | pcbc.c | 24 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_encrypt_segment() local 31 crypto_xor(iv, src, bsize); in crypto_pcbc_encrypt_segment() 33 crypto_xor_cpy(iv, dst, src, bsize); in crypto_pcbc_encrypt_segment() 35 src += bsize; in crypto_pcbc_encrypt_segment() 36 dst += bsize; in crypto_pcbc_encrypt_segment() 37 } while ((nbytes -= bsize) >= bsize); in crypto_pcbc_encrypt_segment() 46 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_encrypt_inplace() local 53 memcpy(tmpbuf, src, bsize); in crypto_pcbc_encrypt_inplace() 54 crypto_xor(iv, src, bsize); in crypto_pcbc_encrypt_inplace() 56 crypto_xor_cpy(iv, tmpbuf, src, bsize); in crypto_pcbc_encrypt_inplace() [all …]
|
H A D | cfb.c | 61 const unsigned int bsize = crypto_cfb_bsize(tfm); in crypto_cfb_encrypt_segment() local 69 crypto_xor(dst, src, bsize); in crypto_cfb_encrypt_segment() 72 src += bsize; in crypto_cfb_encrypt_segment() 73 dst += bsize; in crypto_cfb_encrypt_segment() 74 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_segment() 76 memcpy(walk->iv, iv, bsize); in crypto_cfb_encrypt_segment() 84 const unsigned int bsize = crypto_cfb_bsize(tfm); in crypto_cfb_encrypt_inplace() local 92 crypto_xor(src, tmp, bsize); in crypto_cfb_encrypt_inplace() 95 src += bsize; in crypto_cfb_encrypt_inplace() 96 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_inplace() [all …]
|
H A D | cts.c | 103 int bsize = crypto_skcipher_blocksize(tfm); in cts_cbc_encrypt() local 112 sg = scatterwalk_ffwd(rctx->sg, req->dst, offset - bsize); in cts_cbc_encrypt() 113 scatterwalk_map_and_copy(d + bsize, sg, 0, bsize, 0); in cts_cbc_encrypt() 115 memset(d, 0, bsize); in cts_cbc_encrypt() 118 scatterwalk_map_and_copy(d, sg, 0, bsize + lastn, 1); in cts_cbc_encrypt() 124 skcipher_request_set_crypt(subreq, sg, sg, bsize, req->iv); in cts_cbc_encrypt() 149 int bsize = crypto_skcipher_blocksize(tfm); in crypto_cts_encrypt() local 155 if (nbytes < bsize) in crypto_cts_encrypt() 158 if (nbytes == bsize) { in crypto_cts_encrypt() 167 offset = rounddown(nbytes - 1, bsize); in crypto_cts_encrypt() [all …]
|
H A D | ctr.c | 31 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_final() local 43 crypto_inc(ctrblk, bsize); in crypto_ctr_crypt_final() 51 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_segment() local 60 crypto_xor(dst, src, bsize); in crypto_ctr_crypt_segment() 63 crypto_inc(ctrblk, bsize); in crypto_ctr_crypt_segment() 65 src += bsize; in crypto_ctr_crypt_segment() 66 dst += bsize; in crypto_ctr_crypt_segment() 67 } while ((nbytes -= bsize) >= bsize); in crypto_ctr_crypt_segment() 77 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_inplace() local 88 crypto_xor(src, keystream, bsize); in crypto_ctr_crypt_inplace() [all …]
|
H A D | ofb.c | 22 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ofb_crypt() local 28 while (walk.nbytes >= bsize) { in crypto_ofb_crypt() 36 crypto_xor_cpy(dst, src, iv, bsize); in crypto_ofb_crypt() 37 dst += bsize; in crypto_ofb_crypt() 38 src += bsize; in crypto_ofb_crypt() 39 } while ((nbytes -= bsize) >= bsize); in crypto_ofb_crypt()
|
/openbmc/linux/arch/x86/crypto/ |
H A D | des3_ede_glue.c | 68 const unsigned int bsize = DES3_EDE_BLOCK_SIZE; in ecb_crypt() local 80 if (nbytes >= bsize * 3) { in ecb_crypt() 85 wsrc += bsize * 3; in ecb_crypt() 86 wdst += bsize * 3; in ecb_crypt() 87 nbytes -= bsize * 3; in ecb_crypt() 88 } while (nbytes >= bsize * 3); in ecb_crypt() 90 if (nbytes < bsize) in ecb_crypt() 98 wsrc += bsize; in ecb_crypt() 99 wdst += bsize; in ecb_crypt() 100 nbytes -= bsize; in ecb_crypt() [all …]
|
/openbmc/u-boot/drivers/fpga/ |
H A D | stratixII.c | 10 int StratixII_ps_fpp_load (Altera_desc * desc, void *buf, size_t bsize, 12 int StratixII_ps_fpp_dump (Altera_desc * desc, void *buf, size_t bsize); 16 int StratixII_load (Altera_desc * desc, void *buf, size_t bsize) in StratixII_load() argument 22 ret_val = StratixII_ps_fpp_load (desc, buf, bsize, 1, 0); in StratixII_load() 25 ret_val = StratixII_ps_fpp_load (desc, buf, bsize, 0, 0); in StratixII_load() 28 ret_val = StratixII_ps_fpp_load (desc, buf, bsize, 0, 1); in StratixII_load() 39 int StratixII_dump (Altera_desc * desc, void *buf, size_t bsize) in StratixII_dump() argument 47 ret_val = StratixII_ps_fpp_dump (desc, buf, bsize); in StratixII_dump() 62 int StratixII_ps_fpp_dump (Altera_desc * desc, void *buf, size_t bsize) in StratixII_ps_fpp_dump() argument 68 int StratixII_ps_fpp_load (Altera_desc * desc, void *buf, size_t bsize, in StratixII_ps_fpp_load() argument [all …]
|
H A D | virtex2.c | 87 static int virtex2_ssm_load(xilinx_desc *desc, const void *buf, size_t bsize); 88 static int virtex2_ssm_dump(xilinx_desc *desc, const void *buf, size_t bsize); 90 static int virtex2_ss_load(xilinx_desc *desc, const void *buf, size_t bsize); 91 static int virtex2_ss_dump(xilinx_desc *desc, const void *buf, size_t bsize); 93 static int virtex2_load(xilinx_desc *desc, const void *buf, size_t bsize, in virtex2_load() argument 101 ret_val = virtex2_ss_load(desc, buf, bsize); in virtex2_load() 106 ret_val = virtex2_ssm_load(desc, buf, bsize); in virtex2_load() 116 static int virtex2_dump(xilinx_desc *desc, const void *buf, size_t bsize) in virtex2_dump() argument 123 ret_val = virtex2_ss_dump(desc, buf, bsize); in virtex2_dump() 128 ret_val = virtex2_ssm_dump(desc, buf, bsize); in virtex2_dump() [all …]
|
H A D | spartan3.c | 37 static int spartan3_sp_load(xilinx_desc *desc, const void *buf, size_t bsize); 38 static int spartan3_sp_dump(xilinx_desc *desc, const void *buf, size_t bsize); 41 static int spartan3_ss_load(xilinx_desc *desc, const void *buf, size_t bsize); 42 static int spartan3_ss_dump(xilinx_desc *desc, const void *buf, size_t bsize); 47 static int spartan3_load(xilinx_desc *desc, const void *buf, size_t bsize, in spartan3_load() argument 55 ret_val = spartan3_ss_load(desc, buf, bsize); in spartan3_load() 60 ret_val = spartan3_sp_load(desc, buf, bsize); in spartan3_load() 71 static int spartan3_dump(xilinx_desc *desc, const void *buf, size_t bsize) in spartan3_dump() argument 78 ret_val = spartan3_ss_dump(desc, buf, bsize); in spartan3_dump() 83 ret_val = spartan3_sp_dump(desc, buf, bsize); in spartan3_dump() [all …]
|
H A D | spartan2.c | 33 static int spartan2_sp_load(xilinx_desc *desc, const void *buf, size_t bsize); 34 static int spartan2_sp_dump(xilinx_desc *desc, const void *buf, size_t bsize); 37 static int spartan2_ss_load(xilinx_desc *desc, const void *buf, size_t bsize); 38 static int spartan2_ss_dump(xilinx_desc *desc, const void *buf, size_t bsize); 43 static int spartan2_load(xilinx_desc *desc, const void *buf, size_t bsize, in spartan2_load() argument 51 ret_val = spartan2_ss_load(desc, buf, bsize); in spartan2_load() 56 ret_val = spartan2_sp_load(desc, buf, bsize); in spartan2_load() 67 static int spartan2_dump(xilinx_desc *desc, const void *buf, size_t bsize) in spartan2_dump() argument 74 ret_val = spartan2_ss_dump(desc, buf, bsize); in spartan2_dump() 79 ret_val = spartan2_sp_dump(desc, buf, bsize); in spartan2_dump() [all …]
|
H A D | cyclon2.c | 32 static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize); 33 static int CYC2_ps_dump(Altera_desc *desc, const void *buf, size_t bsize); 38 int CYC2_load(Altera_desc *desc, const void *buf, size_t bsize) in CYC2_load() argument 45 ret_val = CYC2_ps_load (desc, buf, bsize); in CYC2_load() 55 ret_val = CYC2_ps_load(desc, buf, bsize); in CYC2_load() 68 int CYC2_dump(Altera_desc *desc, const void *buf, size_t bsize) in CYC2_dump() argument 75 ret_val = CYC2_ps_dump (desc, buf, bsize); in CYC2_dump() 95 static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize) in CYC2_ps_load() argument 149 ret = (*fn->write) (buf, bsize, true, cookie); in CYC2_ps_load() 197 static int CYC2_ps_dump(Altera_desc *desc, const void *buf, size_t bsize) in CYC2_ps_dump() argument
|
H A D | ACEX1K.c | 34 static int ACEX1K_ps_load(Altera_desc *desc, const void *buf, size_t bsize); 35 static int ACEX1K_ps_dump(Altera_desc *desc, const void *buf, size_t bsize); 40 int ACEX1K_load(Altera_desc *desc, const void *buf, size_t bsize) in ACEX1K_load() argument 47 ret_val = ACEX1K_ps_load (desc, buf, bsize); in ACEX1K_load() 60 int ACEX1K_dump(Altera_desc *desc, const void *buf, size_t bsize) in ACEX1K_dump() argument 67 ret_val = ACEX1K_ps_dump (desc, buf, bsize); in ACEX1K_dump() 89 static int ACEX1K_ps_load(Altera_desc *desc, const void *buf, size_t bsize) in ACEX1K_ps_load() argument 157 while (bytecount < bsize) { in ACEX1K_ps_load() 191 if (bytecount % (bsize / 40) == 0) in ACEX1K_ps_load() 242 static int ACEX1K_ps_dump(Altera_desc *desc, const void *buf, size_t bsize) in ACEX1K_ps_dump() argument
|
H A D | fpga.c | 58 size_t bsize, char *fn) in fpga_validate() argument 252 int fpga_load(int devnum, const void *buf, size_t bsize, bitstream_type bstype) in fpga_load() argument 255 const fpga_desc *desc = fpga_validate(devnum, buf, bsize, in fpga_load() 262 ret_val = xilinx_load(desc->devdesc, buf, bsize, in fpga_load() 270 ret_val = altera_load(desc->devdesc, buf, bsize); in fpga_load() 277 ret_val = lattice_load(desc->devdesc, buf, bsize); in fpga_load() 295 int fpga_dump(int devnum, const void *buf, size_t bsize) in fpga_dump() argument 298 const fpga_desc *desc = fpga_validate(devnum, buf, bsize, in fpga_dump() 305 ret_val = xilinx_dump(desc->devdesc, buf, bsize); in fpga_dump() 312 ret_val = altera_dump(desc->devdesc, buf, bsize); in fpga_dump() [all …]
|
H A D | zynqmppl.c | 103 static void *check_data(u8 *buf, size_t bsize, u32 *swap) in check_data() argument 108 for (p = 0; p < bsize; p++) { in check_data() 169 size_t bsize, u32 blocksize, u32 *swap) in zynqmp_validate_bitstream() argument 196 static int zynqmp_load(xilinx_desc *desc, const void *buf, size_t bsize, in zynqmp_load() argument 212 if (zynqmp_validate_bitstream(desc, buf, bsize, bsize, &swap)) in zynqmp_load() 214 bsizeptr = (u32 *)&bsize; in zynqmp_load() 220 bin_buf = zynqmp_align_dma_buffer((u32 *)buf, bsize, swap); in zynqmp_load() 223 flush_dcache_range(bin_buf, bin_buf + bsize); in zynqmp_load() 233 (u32)bsize, 0, ret_payload); in zynqmp_load() 242 static int zynqmp_loads(xilinx_desc *desc, const void *buf, size_t bsize, in zynqmp_loads() argument [all …]
|
H A D | zynqpl.c | 127 static void *check_data(u8 *buf, size_t bsize, u32 *swap) in check_data() argument 132 for (p = 0; p < bsize; p++) { in check_data() 337 size_t bsize, u32 blocksize, u32 *swap, in zynq_validate_bitstream() argument 368 static int zynq_load(xilinx_desc *desc, const void *buf, size_t bsize, in zynq_load() argument 378 if (zynq_validate_bitstream(desc, buf, bsize, bsize, &swap, in zynq_load() 382 buf = zynq_align_dma_buffer((u32 *)buf, bsize, swap); in zynq_load() 385 debug("%s: Size = %zu\n", __func__, bsize); in zynq_load() 389 roundup(bsize, ARCH_DMA_MINALIGN)); in zynq_load() 391 if (zynq_dma_transfer((u32)buf | 1, bsize >> 2, 0xffffffff, 0)) in zynq_load() 415 static int zynq_loadfs(xilinx_desc *desc, const void *buf, size_t bsize, in zynq_loadfs() argument [all …]
|
/openbmc/linux/arch/s390/crypto/ |
H A D | sha_common.c | 19 unsigned int bsize = crypto_shash_blocksize(desc->tfm); in s390_sha_update() local 23 index = ctx->count % bsize; in s390_sha_update() 26 if ((index + len) < bsize) in s390_sha_update() 31 memcpy(ctx->buf + index, data, bsize - index); in s390_sha_update() 32 cpacf_kimd(ctx->func, ctx->state, ctx->buf, bsize); in s390_sha_update() 33 data += bsize - index; in s390_sha_update() 34 len -= bsize - index; in s390_sha_update() 39 if (len >= bsize) { in s390_sha_update() 40 n = (len / bsize) * bsize; in s390_sha_update() 75 unsigned int bsize = crypto_shash_blocksize(desc->tfm); in s390_sha_final() local [all …]
|
/openbmc/linux/arch/m68k/emu/ |
H A D | nfblock.c | 55 u32 blocks, bsize; member 97 static int __init nfhd_init_one(int id, u32 blocks, u32 bsize) in nfhd_init_one() argument 104 blocks, bsize); in nfhd_init_one() 106 if (bsize < 512 || (bsize & (bsize - 1))) { in nfhd_init_one() 117 dev->bsize = bsize; in nfhd_init_one() 118 dev->bshift = ffs(bsize) - 10; in nfhd_init_one() 130 set_capacity(dev->disk, (sector_t)blocks * (bsize / 512)); in nfhd_init_one() 131 blk_queue_logical_block_size(dev->disk->queue, bsize); in nfhd_init_one() 150 u32 blocks, bsize; in nfhd_init() local 168 if (nfhd_get_capacity(i, 0, &blocks, &bsize)) in nfhd_init() [all …]
|
/openbmc/linux/lib/crypto/mpi/ |
H A D | mpi-pow.c | 31 mpi_size_t esize, msize, bsize, rsize; in mpi_powm() local 79 bsize = base->nlimbs; in mpi_powm() 81 if (bsize > msize) { /* The base is larger than the module. Reduce it. */ in mpi_powm() 84 bp = bp_marker = mpi_alloc_limb_space(bsize + 1); in mpi_powm() 87 MPN_COPY(bp, base->d, bsize); in mpi_powm() 90 mpihelp_divrem(bp + msize, 0, bp, bsize, mp, msize); in mpi_powm() 91 bsize = msize; in mpi_powm() 94 MPN_NORMALIZE(bp, bsize); in mpi_powm() 98 if (!bsize) { in mpi_powm() 122 bp = bp_marker = mpi_alloc_limb_space(bsize); in mpi_powm() [all …]
|
/openbmc/u-boot/fs/yaffs2/ |
H A D | yaffs_nameval.c | 90 int bsize, int flags) in nval_set() argument 109 reclen = (sizeof(int) + namelen + 1 + bsize); in nval_set() 125 memcpy(xb + pos, buf, bsize); in nval_set() 130 int bsize) in nval_get() argument 153 if (!bsize) in nval_get() 156 if (size <= bsize) { in nval_get() 167 int nval_list(const char *xb, int xb_size, char *buf, int bsize) in nval_list() argument 183 if (ncopied + name_len + 1 < bsize) { in nval_list()
|
/openbmc/linux/include/crypto/ |
H A D | ctr.h | 48 int bsize = min(nbytes, blocksize); in crypto_ctr_encrypt_walk() local 52 crypto_xor_cpy(dst, src, buf, bsize); in crypto_ctr_encrypt_walk() 55 dst += bsize; in crypto_ctr_encrypt_walk() 56 src += bsize; in crypto_ctr_encrypt_walk() 57 nbytes -= bsize; in crypto_ctr_encrypt_walk()
|
/openbmc/linux/fs/jfs/ |
H A D | jfs_mount.c | 297 s32 bsize; in chkSuper() local 313 bsize = le32_to_cpu(j_sb->s_bsize); in chkSuper() 314 if (bsize != PSIZE) { in chkSuper() 328 AIM_bytesize = lengthPXD(&(j_sb->s_aim2)) * bsize; in chkSuper() 330 AIT_bytesize = lengthPXD(&(j_sb->s_ait2)) * bsize; in chkSuper() 331 AIM_byte_addr = addressPXD(&(j_sb->s_aim2)) * bsize; in chkSuper() 332 AIT_byte_addr = addressPXD(&(j_sb->s_ait2)) * bsize; in chkSuper() 334 fsckwsp_addr = addressPXD(&(j_sb->s_fsckpxd)) * bsize; in chkSuper() 362 sbi->bsize = bsize; in chkSuper() 366 if (sbi->l2bsize != ilog2((u32)bsize) || in chkSuper()
|
/openbmc/linux/fs/freevxfs/ |
H A D | vxfs_lookup.c | 59 u_long bsize = ip->i_sb->s_blocksize; in vxfs_find_entry() local 80 if ((pos & (bsize - 1)) < 4) { in vxfs_find_entry() 92 pos += bsize - 1; in vxfs_find_entry() 93 pos &= ~(bsize - 1); in vxfs_find_entry() 195 u_long bsize = sbp->s_blocksize; in vxfs_readdir() local 231 if ((pos & (bsize - 1)) < 4) { in vxfs_readdir() 243 pos += bsize - 1; in vxfs_readdir() 244 pos &= ~(bsize - 1); in vxfs_readdir()
|