aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/mktables.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/mktables.c')
-rw-r--r--drivers/md/mktables.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/md/mktables.c b/drivers/md/mktables.c
index b61d5767aae7..3b1500843bba 100644
--- a/drivers/md/mktables.c
+++ b/drivers/md/mktables.c
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
59 uint8_t v; 59 uint8_t v;
60 uint8_t exptbl[256], invtbl[256]; 60 uint8_t exptbl[256], invtbl[256];
61 61
62 printf("#include \"raid6.h\"\n"); 62 printf("#include <linux/raid/pq.h>\n");
63 63
64 /* Compute multiplication table */ 64 /* Compute multiplication table */
65 printf("\nconst u8 __attribute__((aligned(256)))\n" 65 printf("\nconst u8 __attribute__((aligned(256)))\n"
@@ -76,6 +76,9 @@ int main(int argc, char *argv[])
76 printf("\t},\n"); 76 printf("\t},\n");
77 } 77 }
78 printf("};\n"); 78 printf("};\n");
79 printf("#ifdef __KERNEL__\n");
80 printf("EXPORT_SYMBOL(raid6_gfmul);\n");
81 printf("#endif\n");
79 82
80 /* Compute power-of-2 table (exponent) */ 83 /* Compute power-of-2 table (exponent) */
81 v = 1; 84 v = 1;
@@ -92,6 +95,9 @@ int main(int argc, char *argv[])
92 } 95 }
93 } 96 }
94 printf("};\n"); 97 printf("};\n");
98 printf("#ifdef __KERNEL__\n");
99 printf("EXPORT_SYMBOL(raid6_gfexp);\n");
100 printf("#endif\n");
95 101
96 /* Compute inverse table x^-1 == x^254 */ 102 /* Compute inverse table x^-1 == x^254 */
97 printf("\nconst u8 __attribute__((aligned(256)))\n" 103 printf("\nconst u8 __attribute__((aligned(256)))\n"
@@ -104,6 +110,9 @@ int main(int argc, char *argv[])
104 } 110 }
105 } 111 }
106 printf("};\n"); 112 printf("};\n");
113 printf("#ifdef __KERNEL__\n");
114 printf("EXPORT_SYMBOL(raid6_gfinv);\n");
115 printf("#endif\n");
107 116
108 /* Compute inv(2^x + 1) (exponent-xor-inverse) table */ 117 /* Compute inv(2^x + 1) (exponent-xor-inverse) table */
109 printf("\nconst u8 __attribute__((aligned(256)))\n" 118 printf("\nconst u8 __attribute__((aligned(256)))\n"
@@ -115,6 +124,9 @@ int main(int argc, char *argv[])
115 (j == 7) ? '\n' : ' '); 124 (j == 7) ? '\n' : ' ');
116 } 125 }
117 printf("};\n"); 126 printf("};\n");
127 printf("#ifdef __KERNEL__\n");
128 printf("EXPORT_SYMBOL(raid6_gfexi);\n");
129 printf("#endif\n");
118 130
119 return 0; 131 return 0;
120} 132}