mktables.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) | mktables.c (b5dceda1f7ef66cba6f8d766502f242a27f96e6d) |
---|---|
1/* -*- linux-c -*- ------------------------------------------------------- * 2 * 3 * Copyright 2002-2007 H. Peter Anvin - All Rights Reserved 4 * 5 * This file is part of the Linux kernel, and is made available under 6 * the terms of the GNU General Public License version 2 or (at your 7 * option) any later version; incorporated herein by reference. 8 * --- 111 unchanged lines hidden (view full) --- 120 v = 0; /* For entry 255, not a real entry */ 121 } 122 } 123 printf("};\n"); 124 printf("#ifdef __KERNEL__\n"); 125 printf("EXPORT_SYMBOL(raid6_gfexp);\n"); 126 printf("#endif\n"); 127 | 1/* -*- linux-c -*- ------------------------------------------------------- * 2 * 3 * Copyright 2002-2007 H. Peter Anvin - All Rights Reserved 4 * 5 * This file is part of the Linux kernel, and is made available under 6 * the terms of the GNU General Public License version 2 or (at your 7 * option) any later version; incorporated herein by reference. 8 * --- 111 unchanged lines hidden (view full) --- 120 v = 0; /* For entry 255, not a real entry */ 121 } 122 } 123 printf("};\n"); 124 printf("#ifdef __KERNEL__\n"); 125 printf("EXPORT_SYMBOL(raid6_gfexp);\n"); 126 printf("#endif\n"); 127 |
128 /* Compute log-of-2 table */ 129 printf("\nconst u8 __attribute__((aligned(256)))\n" 130 "raid6_gflog[256] =\n" "{\n"); 131 for (i = 0; i < 256; i += 8) { 132 printf("\t"); 133 for (j = 0; j < 8; j++) { 134 v = 255; 135 for (k = 0; k < 256; k++) 136 if (exptbl[k] == (i + j)) { 137 v = k; 138 break; 139 } 140 printf("0x%02x,%c", v, (j == 7) ? '\n' : ' '); 141 } 142 } 143 printf("};\n"); 144 printf("#ifdef __KERNEL__\n"); 145 printf("EXPORT_SYMBOL(raid6_gflog);\n"); 146 printf("#endif\n"); 147 |
|
128 /* Compute inverse table x^-1 == x^254 */ 129 printf("\nconst u8 __attribute__((aligned(256)))\n" 130 "raid6_gfinv[256] =\n" "{\n"); 131 for (i = 0; i < 256; i += 8) { 132 printf("\t"); 133 for (j = 0; j < 8; j++) { 134 invtbl[i + j] = v = gfpow(i + j, 254); 135 printf("0x%02x,%c", v, (j == 7) ? '\n' : ' '); --- 23 unchanged lines hidden --- | 148 /* Compute inverse table x^-1 == x^254 */ 149 printf("\nconst u8 __attribute__((aligned(256)))\n" 150 "raid6_gfinv[256] =\n" "{\n"); 151 for (i = 0; i < 256; i += 8) { 152 printf("\t"); 153 for (j = 0; j < 8; j++) { 154 invtbl[i + j] = v = gfpow(i + j, 254); 155 printf("0x%02x,%c", v, (j == 7) ? '\n' : ' '); --- 23 unchanged lines hidden --- |