diff options
Diffstat (limited to 'lib/raid6/mktables.c')
-rw-r--r-- | lib/raid6/mktables.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/raid6/mktables.c b/lib/raid6/mktables.c index 8a3780902cec..39787db588b0 100644 --- a/lib/raid6/mktables.c +++ b/lib/raid6/mktables.c | |||
@@ -81,6 +81,31 @@ int main(int argc, char *argv[]) | |||
81 | printf("EXPORT_SYMBOL(raid6_gfmul);\n"); | 81 | printf("EXPORT_SYMBOL(raid6_gfmul);\n"); |
82 | printf("#endif\n"); | 82 | printf("#endif\n"); |
83 | 83 | ||
84 | /* Compute vector multiplication table */ | ||
85 | printf("\nconst u8 __attribute__((aligned(256)))\n" | ||
86 | "raid6_vgfmul[256][32] =\n" | ||
87 | "{\n"); | ||
88 | for (i = 0; i < 256; i++) { | ||
89 | printf("\t{\n"); | ||
90 | for (j = 0; j < 16; j += 8) { | ||
91 | printf("\t\t"); | ||
92 | for (k = 0; k < 8; k++) | ||
93 | printf("0x%02x,%c", gfmul(i, j + k), | ||
94 | (k == 7) ? '\n' : ' '); | ||
95 | } | ||
96 | for (j = 0; j < 16; j += 8) { | ||
97 | printf("\t\t"); | ||
98 | for (k = 0; k < 8; k++) | ||
99 | printf("0x%02x,%c", gfmul(i, (j + k) << 4), | ||
100 | (k == 7) ? '\n' : ' '); | ||
101 | } | ||
102 | printf("\t},\n"); | ||
103 | } | ||
104 | printf("};\n"); | ||
105 | printf("#ifdef __KERNEL__\n"); | ||
106 | printf("EXPORT_SYMBOL(raid6_vgfmul);\n"); | ||
107 | printf("#endif\n"); | ||
108 | |||
84 | /* Compute power-of-2 table (exponent) */ | 109 | /* Compute power-of-2 table (exponent) */ |
85 | v = 1; | 110 | v = 1; |
86 | printf("\nconst u8 __attribute__((aligned(256)))\n" | 111 | printf("\nconst u8 __attribute__((aligned(256)))\n" |