| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
struct crc_clmul_consts { |
| 11 |
unsigned long fold_across_2_longs_const_hi; |
| 12 |
unsigned long fold_across_2_longs_const_lo; |
| 13 |
unsigned long barrett_reduction_const_1; |
| 14 |
unsigned long barrett_reduction_const_2; |
| 15 |
}; |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
static const struct crc_clmul_consts crc16_msb_0x8bb7_consts __maybe_unused = { |
| 22 |
#ifdef CONFIG_64BIT |
| 23 |
.fold_across_2_longs_const_hi = 0x0000000000001faa, |
| 24 |
.fold_across_2_longs_const_lo = 0x000000000000a010, |
| 25 |
.barrett_reduction_const_1 = 0xfb2d2bfc0e99d245, |
| 26 |
.barrett_reduction_const_2 = 0x0000000000008bb7, |
| 27 |
#else |
| 28 |
.fold_across_2_longs_const_hi = 0x00005890, |
| 29 |
.fold_across_2_longs_const_lo = 0x0000f249, |
| 30 |
.barrett_reduction_const_1 = 0xfb2d2bfc, |
| 31 |
.barrett_reduction_const_2 = 0x00008bb7, |
| 32 |
#endif |
| 33 |
}; |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
static const struct crc_clmul_consts crc32_msb_0x04c11db7_consts __maybe_unused = { |
| 41 |
#ifdef CONFIG_64BIT |
| 42 |
.fold_across_2_longs_const_hi = 0x00000000c5b9cd4c, |
| 43 |
.fold_across_2_longs_const_lo = 0x00000000e8a45605, |
| 44 |
.barrett_reduction_const_1 = 0x826880efa40da72d, |
| 45 |
.barrett_reduction_const_2 = 0x0000000004c11db7, |
| 46 |
#else |
| 47 |
.fold_across_2_longs_const_hi = 0xf200aa66, |
| 48 |
.fold_across_2_longs_const_lo = 0x490d678d, |
| 49 |
.barrett_reduction_const_1 = 0x826880ef, |
| 50 |
.barrett_reduction_const_2 = 0x04c11db7, |
| 51 |
#endif |
| 52 |
}; |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
static const struct crc_clmul_consts crc32_lsb_0xedb88320_consts __maybe_unused = { |
| 60 |
#ifdef CONFIG_64BIT |
| 61 |
.fold_across_2_longs_const_hi = 0x65673b4600000000, |
| 62 |
.fold_across_2_longs_const_lo = 0x9ba54c6f00000000, |
| 63 |
.barrett_reduction_const_1 = 0xb4e5b025f7011641, |
| 64 |
.barrett_reduction_const_2 = 0x00000000edb88320, |
| 65 |
#else |
| 66 |
.fold_across_2_longs_const_hi = 0xccaa009e, |
| 67 |
.fold_across_2_longs_const_lo = 0xb8bc6765, |
| 68 |
.barrett_reduction_const_1 = 0xf7011641, |
| 69 |
.barrett_reduction_const_2 = 0xedb88320, |
| 70 |
#endif |
| 71 |
}; |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
static const struct crc_clmul_consts crc32_lsb_0x82f63b78_consts __maybe_unused = { |
| 79 |
#ifdef CONFIG_64BIT |
| 80 |
.fold_across_2_longs_const_hi = 0x3743f7bd00000000, |
| 81 |
.fold_across_2_longs_const_lo = 0x3171d43000000000, |
| 82 |
.barrett_reduction_const_1 = 0x4869ec38dea713f1, |
| 83 |
.barrett_reduction_const_2 = 0x0000000082f63b78, |
| 84 |
#else |
| 85 |
.fold_across_2_longs_const_hi = 0x493c7d27, |
| 86 |
.fold_across_2_longs_const_lo = 0xdd45aab8, |
| 87 |
.barrett_reduction_const_1 = 0xdea713f1, |
| 88 |
.barrett_reduction_const_2 = 0x82f63b78, |
| 89 |
#endif |
| 90 |
}; |
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
#ifdef CONFIG_64BIT |
| 100 |
static const struct crc_clmul_consts crc64_msb_0x42f0e1eba9ea3693_consts __maybe_unused = { |
| 101 |
.fold_across_2_longs_const_hi = 0x4eb938a7d257740e, |
| 102 |
.fold_across_2_longs_const_lo = 0x05f5c3c7eb52fab6, |
| 103 |
.barrett_reduction_const_1 = 0xabc694e836627c39, |
| 104 |
.barrett_reduction_const_2 = 0x42f0e1eba9ea3693, |
| 105 |
}; |
| 106 |
#endif |
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
#ifdef CONFIG_64BIT |
| 116 |
static const struct crc_clmul_consts crc64_lsb_0x9a6c9329ac4bc9b5_consts __maybe_unused = { |
| 117 |
.fold_across_2_longs_const_hi = 0xeadc41fd2ba3d420, |
| 118 |
.fold_across_2_longs_const_lo = 0x21e9761e252621ac, |
| 119 |
.barrett_reduction_const_1 = 0x27ecfa329aef9f77, |
| 120 |
.barrett_reduction_const_2 = 0x9a6c9329ac4bc9b5, |
| 121 |
}; |
| 122 |
#endif |