Home
last modified time | relevance | path

Searched refs:crc (Results 1 – 25 of 529) sorted by relevance

12345678910>>...22

/linux/lib/
A Dcrc32.c160 crc = (crc >> 2) ^ tab[0][crc & 3];
161 crc = (crc >> 2) ^ tab[0][crc & 3];
162 crc = (crc >> 2) ^ tab[0][crc & 3];
163 crc = (crc >> 2) ^ tab[0][crc & 3];
168 crc = (crc >> 4) ^ tab[0][crc & 15];
169 crc = (crc >> 4) ^ tab[0][crc & 15];
175 crc = (crc >> 8) ^ tab[0][crc & 255];
310 crc = (crc << 2) ^ tab[0][crc >> 30];
311 crc = (crc << 2) ^ tab[0][crc >> 30];
312 crc = (crc << 2) ^ tab[0][crc >> 30];
[all …]
A Dgen_crc32table.c41 uint32_t crc = 1; in crc32init_le_generic() local
46 crc = (crc >> 1) ^ ((crc & 1) ? polynomial : 0); in crc32init_le_generic()
48 tab[0][i + j] = crc ^ tab[0][j]; in crc32init_le_generic()
51 crc = tab[0][i]; in crc32init_le_generic()
53 crc = tab[0][crc & 0xff] ^ (crc >> 8); in crc32init_le_generic()
54 tab[j][i] = crc; in crc32init_le_generic()
75 uint32_t crc = 0x80000000; in crc32init_be() local
80 crc = (crc << 1) ^ ((crc & 0x80000000) ? CRC32_POLY_BE : 0); in crc32init_be()
85 crc = crc32table_be[0][i]; in crc32init_be()
87 crc = crc32table_be[0][(crc >> 24) & 0xff] ^ (crc << 8); in crc32init_be()
[all …]
A Dcrc32test.c552 u32 crc; /* random starting crc */ member
674 static u32 crc; in crc32c_test() local
680 crc ^= __crc32c_le(test[i].crc, test_buf + in crc32c_test()
723 crc1 = __crc32c_le(test[i].crc, test_buf + in crc32c_combine_test()
754 static u32 crc; in crc32_test() local
760 crc ^= crc32_le(test[i].crc, test_buf + in crc32_test()
763 crc ^= crc32_be(test[i].crc, test_buf + in crc32_test()
772 if (test[i].crc_le != crc32_le(test[i].crc, test_buf + in crc32_test()
776 if (test[i].crc_be != crc32_be(test[i].crc, test_buf + in crc32_test()
805 crc_full = crc32_le(test[i].crc, test_buf + test[i].start, in crc32_combine_test()
[all …]
A Dcrc-ccitt.c99 u16 crc_ccitt(u16 crc, u8 const *buffer, size_t len) in crc_ccitt() argument
102 crc = crc_ccitt_byte(crc, *buffer++); in crc_ccitt()
103 return crc; in crc_ccitt()
114 u16 crc_ccitt_false(u16 crc, u8 const *buffer, size_t len) in crc_ccitt_false() argument
117 crc = crc_ccitt_false_byte(crc, *buffer++); in crc_ccitt_false()
118 return crc; in crc_ccitt_false()
/linux/drivers/gpu/drm/
A Ddrm_debugfs_crc.c125 struct drm_crtc_crc *crc = &crtc->crc; in crc_control_write() local
181 return CIRC_CNT(crc->head, crc->tail, DRM_CRC_ENTRIES_NR); in crtc_crc_data_count()
189 crc->head = 0; in crtc_crc_cleanup()
198 struct drm_crtc_crc *crc = &crtc->crc; in crtc_crc_open() local
261 struct drm_crtc_crc *crc = &crtc->crc; in crtc_crc_release() local
288 struct drm_crtc_crc *crc = &crtc->crc; in crtc_crc_read() local
317 entry = &crc->entries[crc->tail]; in crtc_crc_read()
325 crc->tail = (crc->tail + 1) & (DRM_CRC_ENTRIES_NR - 1); in crtc_crc_read()
347 struct drm_crtc_crc *crc = &crtc->crc; in crtc_crc_poll() local
353 if (crc->source && crtc_crc_data_count(crc)) in crtc_crc_poll()
[all …]
/linux/drivers/gpu/drm/nouveau/dispnv50/
A Dcrc.c128 struct nv50_crc *crc = &head->crc; in nv50_crc_get_entries() local
151 struct nv50_crc *crc = &head->crc; in nv50_crc_handle_vblank() local
171 ctx = &crc->ctx[crc->ctx_idx]; in nv50_crc_handle_vblank()
243 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_stop_reporting() local
275 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_init_notifier_contexts() local
299 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_release_notifier_contexts() local
322 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_start_reporting() local
333 crc->src = asyh->crc.src; in nv50_crc_atomic_start_reporting()
465 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_set() local
472 &crc->ctx[crc->ctx_idx], asyh->crc.wndw); in nv50_crc_atomic_set()
[all …]
/linux/drivers/crypto/stm32/
A Dstm32-crc32.c104 struct stm32_crc *crc; in stm32_crc_get_next_crc() local
108 if (crc) in stm32_crc_get_next_crc()
112 return crc; in stm32_crc_get_next_crc()
119 struct stm32_crc *crc; in stm32_crc_init() local
123 if (!crc) in stm32_crc_init()
152 struct stm32_crc *crc; in burst_update() local
155 if (!crc) in burst_update()
322 crc = devm_kzalloc(dev, sizeof(*crc), GFP_KERNEL); in stm32_crc_probe()
323 if (!crc) in stm32_crc_probe()
326 crc->dev = dev; in stm32_crc_probe()
[all …]
/linux/tools/power/acpi/tools/acpidbg/
A Dacpidbg.c128 p = &crc->buf[crc->head]; in acpi_aml_read()
134 crc->head = (crc->head + len) & (ACPI_AML_BUF_SIZE - 1); in acpi_aml_read()
144 p = &crc->buf[crc->head]; in acpi_aml_read_batch_cmd()
155 crc->head = (crc->head + len) & (ACPI_AML_BUF_SIZE - 1); in acpi_aml_read_batch_cmd()
165 p = &crc->buf[crc->head]; in acpi_aml_read_batch_log()
171 crc->head = (crc->head + 1) & (ACPI_AML_BUF_SIZE - 1); in acpi_aml_read_batch_log()
187 crc->head = (crc->head + 1) & (ACPI_AML_BUF_SIZE - 1); in acpi_aml_read_batch_log()
198 crc->head = (crc->head + 1) & (ACPI_AML_BUF_SIZE - 1); in acpi_aml_read_batch_log()
211 crc->head = (crc->head + 1) & (ACPI_AML_BUF_SIZE - 1); in acpi_aml_read_batch_log()
228 p = &crc->buf[crc->tail]; in acpi_aml_write()
[all …]
/linux/arch/mips/crypto/
A Dcrc32-mips.c60 : "+r" (crc) \
72 u32 crc = crc_; local
78 CRC32(crc, value, d);
89 CRC32(crc, value, w);
107 return crc;
112 u32 crc = crc_; local
146 return crc;
157 u32 crc; member
165 ctx->crc = mctx->key;
191 ctx->crc = crc32_mips_le_hw(ctx->crc, data, length);
[all …]
/linux/drivers/net/can/spi/mcp251xfd/
A Dmcp251xfd-crc16.c58 static inline u16 mcp251xfd_crc16_byte(u16 crc, const u8 data) in mcp251xfd_crc16_byte() argument
60 u8 index = (crc >> 8) ^ data; in mcp251xfd_crc16_byte()
62 return (crc << 8) ^ mcp251xfd_crc16_table[index]; in mcp251xfd_crc16_byte()
68 crc = mcp251xfd_crc16_byte(crc, *buffer++); in mcp251xfd_crc16()
70 return crc; in mcp251xfd_crc16()
75 u16 crc = 0xffff; in mcp251xfd_crc16_compute() local
77 return mcp251xfd_crc16(crc, data, data_size); in mcp251xfd_crc16_compute()
83 u16 crc; in mcp251xfd_crc16_compute2() local
85 crc = mcp251xfd_crc16_compute(cmd, cmd_size); in mcp251xfd_crc16_compute2()
86 crc = mcp251xfd_crc16(crc, data, data_size); in mcp251xfd_crc16_compute2()
[all …]
/linux/arch/powerpc/crypto/
A Dcrct10dif-vpmsum_glue.c31 u32 crc = crci; in crct10dif_vpmsum() local
38 crc = crc_t10dif_generic(crc, p, prealign); in crct10dif_vpmsum()
44 crc <<= 16; in crct10dif_vpmsum()
48 crc = __crct10dif_vpmsum(crc, p, len & ~VMX_ALIGN_MASK); in crct10dif_vpmsum()
52 crc >>= 16; in crct10dif_vpmsum()
58 crc = crc_t10dif_generic(crc, p, tail); in crct10dif_vpmsum()
61 return crc & 0xffff; in crct10dif_vpmsum()
66 u16 *crc = shash_desc_ctx(desc); in crct10dif_vpmsum_init() local
68 *crc = 0; in crct10dif_vpmsum_init()
75 u16 *crc = shash_desc_ctx(desc); in crct10dif_vpmsum_update() local
[all …]
/linux/arch/arm/crypto/
A Dcrc32-ce-glue.c68 *crc = *mctx; in crc32_init()
77 *crc = crc32_armv8_le(*crc, data, length); in crc32_update()
86 *crc = crc32c_armv8_le(*crc, data, length); in crc32c_update()
94 put_unaligned_le32(*crc, out); in crc32_final()
102 put_unaligned_le32(~*crc, out); in crc32c_final()
116 *crc = fallback_crc32(*crc, data, l); in crc32_pmull_update()
126 *crc = crc32_pmull_le(data, l, *crc); in crc32_pmull_update()
135 *crc = fallback_crc32(*crc, data, length); in crc32_pmull_update()
150 *crc = fallback_crc32c(*crc, data, l); in crc32c_pmull_update()
160 *crc = crc32c_pmull_le(data, l, *crc); in crc32c_pmull_update()
[all …]
A Dcrct10dif-ce-glue.c26 u16 *crc = shash_desc_ctx(desc); in crct10dif_init() local
28 *crc = 0; in crct10dif_init()
35 u16 *crc = shash_desc_ctx(desc); in crct10dif_update() local
39 *crc = crc_t10dif_pmull(*crc, data, length); in crct10dif_update()
42 *crc = crc_t10dif_generic(*crc, data, length); in crct10dif_update()
50 u16 *crc = shash_desc_ctx(desc); in crct10dif_final() local
52 *(u16 *)out = *crc; in crct10dif_final()
/linux/arch/s390/crypto/
A Dcrc32-vx.c31 u32 crc; member
49 static u32 __pure ___fname(u32 crc, \
62 crc = ___crc32_sw(crc, data, prealign); \
70 crc = ___crc32_vx(crc, data, aligned); \
74 crc = ___crc32_sw(crc, data + aligned, remaining); \
76 return crc; \
105 ctx->crc = mctx->key; in crc32_vx_init()
135 *(__le32 *)out = cpu_to_le32p(&ctx->crc); in crc32le_vx_final()
143 *(__be32 *)out = cpu_to_be32p(&ctx->crc); in crc32be_vx_final()
155 *(__le32 *)out = ~cpu_to_le32p(&ctx->crc); in crc32c_vx_final()
[all …]
/linux/fs/xfs/libxfs/
A Dxfs_cksum.h17 uint32_t crc; in xfs_start_cksum_safe() local
20 crc = crc32c(XFS_CRC_SEED, buffer, cksum_offset); in xfs_start_cksum_safe()
23 crc = crc32c(crc, &zero, sizeof(__u32)); in xfs_start_cksum_safe()
26 return crc32c(crc, &buffer[cksum_offset + sizeof(__be32)], in xfs_start_cksum_safe()
52 xfs_end_cksum(uint32_t crc) in xfs_end_cksum() argument
54 return ~cpu_to_le32(crc); in xfs_end_cksum()
66 uint32_t crc = xfs_start_cksum_update(buffer, length, cksum_offset); in xfs_update_cksum() local
68 *(__le32 *)(buffer + cksum_offset) = xfs_end_cksum(crc); in xfs_update_cksum()
77 uint32_t crc = xfs_start_cksum_safe(buffer, length, cksum_offset); in xfs_verify_cksum() local
79 return *(__le32 *)(buffer + cksum_offset) == xfs_end_cksum(crc); in xfs_verify_cksum()
/linux/arch/arm64/crypto/
A Dcrct10dif-ce-glue.c28 u16 *crc = shash_desc_ctx(desc); in crct10dif_init() local
30 *crc = 0; in crct10dif_init()
37 u16 *crc = shash_desc_ctx(desc); in crct10dif_update_pmull_p8() local
47 *crc = crc_t10dif_pmull_p8(*crc, data, chunk); in crct10dif_update_pmull_p8()
53 *crc = crc_t10dif_generic(*crc, data, length); in crct10dif_update_pmull_p8()
62 u16 *crc = shash_desc_ctx(desc); in crct10dif_update_pmull_p64() local
72 *crc = crc_t10dif_pmull_p64(*crc, data, chunk); in crct10dif_update_pmull_p64()
78 *crc = crc_t10dif_generic(*crc, data, length); in crct10dif_update_pmull_p64()
86 u16 *crc = shash_desc_ctx(desc); in crct10dif_final() local
88 *(u16 *)out = *crc; in crct10dif_final()
/linux/fs/ocfs2/
A Dblockcheck.c352 u32 crc; in ocfs2_block_check_compute() local
385 u32 crc, ecc; in ocfs2_block_check_validate() local
396 if (crc == bc_crc32e) in ocfs2_block_check_validate()
410 if (crc == bc_crc32e) { in ocfs2_block_check_validate()
445 u32 crc, ecc; in ocfs2_block_check_compute_bhs() local
455 crc = crc32_le(crc, bhs[i]->b_data, bhs[i]->b_size); in ocfs2_block_check_compute_bhs()
492 u32 crc, ecc, fix; in ocfs2_block_check_validate_bhs() local
508 crc = crc32_le(crc, bhs[i]->b_data, bhs[i]->b_size); in ocfs2_block_check_validate_bhs()
509 if (crc == bc_crc32e) in ocfs2_block_check_validate_bhs()
540 crc = crc32_le(crc, bhs[i]->b_data, bhs[i]->b_size); in ocfs2_block_check_validate_bhs()
[all …]
/linux/drivers/ipack/
A Dipack.c271 crc = (crc << 1) ^ ((crc & 0x8000) ? 0x1021 : 0); in ipack_crc_byte()
272 return crc; in ipack_crc_byte()
282 u16 crc; in ipack_calc_crc1() local
285 crc = 0xffff; in ipack_calc_crc1()
288 crc = ipack_crc_byte(crc, c); in ipack_calc_crc1()
290 crc = ~crc; in ipack_calc_crc1()
297 u16 crc; in ipack_calc_crc2() local
303 crc = ipack_crc_byte(crc, c); in ipack_calc_crc2()
305 crc = ~crc; in ipack_calc_crc2()
306 return crc; in ipack_calc_crc2()
[all …]
/linux/include/linux/
A Dcrc-ccitt.h10 extern u16 crc_ccitt(u16 crc, const u8 *buffer, size_t len);
11 extern u16 crc_ccitt_false(u16 crc, const u8 *buffer, size_t len);
13 static inline u16 crc_ccitt_byte(u16 crc, const u8 c) in crc_ccitt_byte() argument
15 return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff]; in crc_ccitt_byte()
18 static inline u16 crc_ccitt_false_byte(u16 crc, const u8 c) in crc_ccitt_false_byte() argument
20 return (crc << 8) ^ crc_ccitt_false_table[(crc >> 8) ^ c]; in crc_ccitt_false_byte()
/linux/arch/x86/crypto/
A Dcrct10dif-pclmul_glue.c40 __u16 crc; member
47 ctx->crc = 0; in chksum_init()
59 ctx->crc = crc_t10dif_pcl(ctx->crc, data, length); in chksum_update()
62 ctx->crc = crc_t10dif_generic(ctx->crc, data, length); in chksum_update()
70 *(__u16 *)out = ctx->crc; in chksum_final()
74 static int __chksum_finup(__u16 crc, const u8 *data, unsigned int len, u8 *out) in __chksum_finup() argument
78 *(__u16 *)out = crc_t10dif_pcl(crc, data, len); in __chksum_finup()
81 *(__u16 *)out = crc_t10dif_generic(crc, data, len); in __chksum_finup()
90 return __chksum_finup(ctx->crc, data, len, out); in chksum_finup()
/linux/kernel/power/
A Dswap.c715 crc = kzalloc(sizeof(*crc), GFP_KERNEL); in save_image_lzo()
716 if (!crc) { in save_image_lzo()
850 wait_event(crc->done, atomic_read(&crc->stop)); in save_image_lzo()
864 if (crc) { in save_image_lzo()
867 kfree(crc); in save_image_lzo()
1205 crc = kzalloc(sizeof(*crc), GFP_KERNEL); in load_image_lzo()
1206 if (!crc) { in load_image_lzo()
1335 wait_event(crc->done, atomic_read(&crc->stop)); in load_image_lzo()
1435 wait_event(crc->done, atomic_read(&crc->stop)); in load_image_lzo()
1458 if (crc) { in load_image_lzo()
[all …]
/linux/drivers/nfc/nxp-nci/
A Dfirmware.c76 u16 crc = 0xffff; in nxp_nci_fw_crc() local
79 crc = ((crc >> 8) | (crc << 8)) ^ *buffer++; in nxp_nci_fw_crc()
80 crc ^= (crc & 0xff) >> 4; in nxp_nci_fw_crc()
81 crc ^= (crc & 0xff) << 12; in nxp_nci_fw_crc()
82 crc ^= (crc & 0xff) << 5; in nxp_nci_fw_crc()
85 return crc; in nxp_nci_fw_crc()
91 u16 header, crc; in nxp_nci_fw_send_chunk() local
117 put_unaligned_be16(crc, skb_put(skb, NXP_NCI_FW_CRC_LEN)); in nxp_nci_fw_send_chunk()
280 u16 crc, frame_crc; in nxp_nci_fw_check_crc() local
283 crc = nxp_nci_fw_crc(skb->data, len); in nxp_nci_fw_check_crc()
[all …]
/linux/scripts/genksyms/
A Dgenksyms.c122 return crctab32[(crc ^ c) & 0xff] ^ (crc >> 8); in partial_crc32_one()
128 crc = partial_crc32_one(*s++, crc); in partial_crc32()
561 crc = partial_crc32(cur->string, crc); in expand_and_crc_sym()
562 crc = partial_crc32_one(' ', crc); in expand_and_crc_sym()
572 crc = partial_crc32(cur->string, crc); in expand_and_crc_sym()
573 crc = partial_crc32_one(' ', crc); in expand_and_crc_sym()
577 crc = expand_and_crc_sym(subsym, crc); in expand_and_crc_sym()
609 crc = partial_crc32_one(' ', crc); in expand_and_crc_sym()
610 crc = partial_crc32(cur->string, crc); in expand_and_crc_sym()
611 crc = partial_crc32_one(' ', crc); in expand_and_crc_sym()
[all …]
/linux/drivers/acpi/
A Dacpi_dbg.c262 p = &crc->buf[crc->head]; in acpi_aml_write_kern()
263 n = min(len, circ_space_to_end(crc)); in acpi_aml_write_kern()
267 crc->head = (crc->head + n) & (ACPI_AML_BUF_SIZE - 1); in acpi_aml_write_kern()
283 p = &crc->buf[crc->tail]; in acpi_aml_readb_kern()
287 crc->tail = (crc->tail + 1) & (ACPI_AML_BUF_SIZE - 1); in acpi_aml_readb_kern()
584 p = &crc->buf[crc->tail]; in acpi_aml_read_user()
585 n = min(len, circ_count_to_end(crc)); in acpi_aml_read_user()
592 crc->tail = (crc->tail + n) & (ACPI_AML_BUF_SIZE - 1); in acpi_aml_read_user()
654 p = &crc->buf[crc->head]; in acpi_aml_write_user()
655 n = min(len, circ_space_to_end(crc)); in acpi_aml_write_user()
[all …]
/linux/drivers/staging/wlan-ng/
A Dp80211wep.c93 u32 i, j, k, crc, keylen; in wep_decrypt() local
141 crc = ~crc32_le(~0, buf, len); in wep_decrypt()
144 c_crc[0] = crc; in wep_decrypt()
145 c_crc[1] = crc >> 8; in wep_decrypt()
146 c_crc[2] = crc >> 16; in wep_decrypt()
147 c_crc[3] = crc >> 24; in wep_decrypt()
164 u32 i, j, k, crc, keylen; in wep_encrypt() local
215 icv[0] = crc; in wep_encrypt()
216 icv[1] = crc >> 8; in wep_encrypt()
217 icv[2] = crc >> 16; in wep_encrypt()
[all …]

Completed in 65 milliseconds

12345678910>>...22