aboutsummaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Expand)AuthorAge
* [PATCH] kprobes/ia64: refuse kprobe on ivt codeKeshavamurthy Anil S2005-06-27
* [PATCH] kprobes/ia64: refuse inserting kprobe on slot 1Rusty Lynch2005-06-27
* [PATCH] Return probe redesign: ppc64 specific implementationRusty Lynch2005-06-27
* [PATCH] Return probe redesign: ia64 specific implementationRusty Lynch2005-06-27
* [PATCH] Return probe redesign: x86_64 specific changesRusty Lynch2005-06-27
* [PATCH] Return probe redesign: i386 specific changesRusty Lynch2005-06-27
* [PATCH] kprobes: fix single-step out of line - take2Ananth N Mavinakayanahalli2005-06-27
* Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds2005-06-27
|\
| * [PATCH] USB: omap_udc updates (mostly cleanups)David Brownell2005-06-27
* | [PATCH] seccomp: tsc disableAndrea Arcangeli2005-06-27
* | [PATCH] ppc64: Add missing exportsBenjamin Herrenschmidt2005-06-27
* | [PATCH] ppc32: Remove CONFIG_PMAC_PBOOKBenjamin Herrenschmidt2005-06-27
* | [PATCH] ppc32: Bump PMU interrupt priorityBenjamin Herrenschmidt2005-06-27
* | [PATCH] 8xx: avoid "dcbst" misbehaviour with unpopulated TLBMarcelo Tosatti2005-06-27
* | [PATCH] mips: fixed try_to_freeze build errorYoichi Yuasa2005-06-27
* | [PATCH] ppc32: Fix compiling of sandpoint platformKumar Gala2005-06-27
* | Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2005-06-27
|\ \
| * | [PATCH] ARM: Update mach-typesRussell King2005-06-27
| * | [PATCH] ARM: Move memmap freeing into init.cRussell King2005-06-27
| * | [PATCH] ARM: Move PGD kernel page table initialisationRussell King2005-06-27
| * | [PATCH] ARM: Add VST idle loop callRussell King2005-06-27
| * | [PATCH] ARM: Add missed AAEC2000 fileRussell King2005-06-27
| |/
* / [PATCH] Update cfq io scheduler to time sliced designJens Axboe2005-06-27
|/
* Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2005-06-26
|\
| * [PATCH] ARM: 2757/1: remove ixdp2400_init_irq from ixdp2800 codeLennert Buytenhek2005-06-26
| * [PATCH] ARM: 2756/1: add ixp2000 msf mappingLennert Buytenhek2005-06-26
| * [PATCH] ARM: Add SA_TIMER flag to timer interruptsRussell King2005-06-26
* | [PATCH] ppc32: Fix MPC83xx IPIC external interrupt pending register offsetKumar Gala2005-06-26
* | [PATCH] arm: swsusp build fixAndrew Morton2005-06-26
|/
* Fix up try_to_freeze() usage in arch/i386/kernel/signal.cLinus Torvalds2005-06-25
* Merge Christoph's freeze cleanup patchLinus Torvalds2005-06-25
|\
| * [PATCH] Cleanup patch for process freezingChristoph Lameter2005-06-25
* | [PATCH] printk: arch/i386/mm/pgtable.cChristophe Lucas2005-06-25
* | [PATCH] printk: arch/i386/mm/ioremap.cChristophe Lucas2005-06-25
* | [PATCH] update comment about gzip scratch sizeOlaf Hering2005-06-25
* | [PATCH] i386: cleanup boot_cpu_logical_apicid variablesAdrian Bunk2005-06-25
* | [PATCH] x86_64: coding style and whitespace fixupsDomen Puncer2005-06-25
* | [PATCH] get rid of redundant NULL checks before kfree() in arch/i386/Jesper Juhl2005-06-25
* | [PATCH] arch/i386/crypto/aes.c: fix sparse warningsDomen Puncer2005-06-25
* | [PATCH] arch/i386/mm/fault.c: fix sparse warningsDomen Puncer2005-06-25
* | [PATCH] arch/i386/kernel/apm.c: fix sparse warningsDomen Puncer2005-06-25
* | [PATCH] arch/i386/kernel/traps.c: fix sparse warningsDomen Puncer2005-06-25
* | [PATCH] x86-64: add memcpy/memset prototypesrandy_dunlap2005-06-25
* | [PATCH] kexec code cleanupManeesh Soni2005-06-25
* | [PATCH] kdump: Save trap information for later analysisAlexander Nyberg2005-06-25
* | [PATCH] kdump: Use real pt_regs from exceptionAlexander Nyberg2005-06-25
* | [PATCH] Retrieve elfcorehdr address from command lineVivek Goyal2005-06-25
* | [PATCH] kdump: Routines for copying dump pagesVivek Goyal2005-06-25
* | [PATCH] kdump: KconfigVivek Goyal2005-06-25
* | [PATCH] kdump: Retrieve saved max pfnVivek Goyal2005-06-25
ss="hl opt">; i++) b[i] = index_of[lambda[i]]; /* * Begin Berlekamp-Massey algorithm to determine error+erasure * locator polynomial */ r = no_eras; el = no_eras; while (++r <= nroots) { /* r is the step number */ /* Compute discrepancy at the r-th step in poly-form */ discr_r = 0; for (i = 0; i < r; i++) { if ((lambda[i] != 0) && (s[r - i - 1] != nn)) { discr_r ^= alpha_to[rs_modnn(rs, index_of[lambda[i]] + s[r - i - 1])]; } } discr_r = index_of[discr_r]; /* Index form */ if (discr_r == nn) { /* 2 lines below: B(x) <-- x*B(x) */ memmove (&b[1], b, nroots * sizeof (b[0])); b[0] = nn; } else { /* 7 lines below: T(x) <-- lambda(x)-discr_r*x*b(x) */ t[0] = lambda[0]; for (i = 0; i < nroots; i++) { if (b[i] != nn) { t[i + 1] = lambda[i + 1] ^ alpha_to[rs_modnn(rs, discr_r + b[i])]; } else t[i + 1] = lambda[i + 1]; } if (2 * el <= r + no_eras - 1) { el = r + no_eras - el; /* * 2 lines below: B(x) <-- inv(discr_r) * * lambda(x) */ for (i = 0; i <= nroots; i++) { b[i] = (lambda[i] == 0) ? nn : rs_modnn(rs, index_of[lambda[i]] - discr_r + nn); } } else { /* 2 lines below: B(x) <-- x*B(x) */ memmove(&b[1], b, nroots * sizeof(b[0])); b[0] = nn; } memcpy(lambda, t, (nroots + 1) * sizeof(t[0])); } } /* Convert lambda to index form and compute deg(lambda(x)) */ deg_lambda = 0; for (i = 0; i < nroots + 1; i++) { lambda[i] = index_of[lambda[i]]; if (lambda[i] != nn) deg_lambda = i; } /* Find roots of error+erasure locator polynomial by Chien search */ memcpy(&reg[1], &lambda[1], nroots * sizeof(reg[0])); count = 0; /* Number of roots of lambda(x) */ for (i = 1, k = iprim - 1; i <= nn; i++, k = rs_modnn(rs, k + iprim)) { q = 1; /* lambda[0] is always 0 */ for (j = deg_lambda; j > 0; j--) { if (reg[j] != nn) { reg[j] = rs_modnn(rs, reg[j] + j); q ^= alpha_to[reg[j]]; } } if (q != 0) continue; /* Not a root */ /* store root (index-form) and error location number */ root[count] = i; loc[count] = k; /* If we've already found max possible roots, * abort the search to save time */ if (++count == deg_lambda) break; } if (deg_lambda != count) { /* * deg(lambda) unequal to number of roots => uncorrectable * error detected */ count = -EBADMSG; goto finish; } /* * Compute err+eras evaluator poly omega(x) = s(x)*lambda(x) (modulo * x**nroots). in index form. Also find deg(omega). */ deg_omega = deg_lambda - 1; for (i = 0; i <= deg_omega; i++) { tmp = 0; for (j = i; j >= 0; j--) { if ((s[i - j] != nn) && (lambda[j] != nn)) tmp ^= alpha_to[rs_modnn(rs, s[i - j] + lambda[j])]; } omega[i] = index_of[tmp]; } /* * Compute error values in poly-form. num1 = omega(inv(X(l))), num2 = * inv(X(l))**(fcr-1) and den = lambda_pr(inv(X(l))) all in poly-form */ for (j = count - 1; j >= 0; j--) { num1 = 0; for (i = deg_omega; i >= 0; i--) { if (omega[i] != nn) num1 ^= alpha_to[rs_modnn(rs, omega[i] + i * root[j])]; } num2 = alpha_to[rs_modnn(rs, root[j] * (fcr - 1) + nn)]; den = 0; /* lambda[i+1] for i even is the formal derivative * lambda_pr of lambda[i] */ for (i = min(deg_lambda, nroots - 1) & ~1; i >= 0; i -= 2) { if (lambda[i + 1] != nn) { den ^= alpha_to[rs_modnn(rs, lambda[i + 1] + i * root[j])]; } } /* Apply error to data */ if (num1 != 0 && loc[j] >= pad) { uint16_t cor = alpha_to[rs_modnn(rs,index_of[num1] + index_of[num2] + nn - index_of[den])]; /* Store the error correction pattern, if a * correction buffer is available */ if (corr) { corr[j] = cor; } else { /* If a data buffer is given and the * error is inside the message, * correct it */ if (data && (loc[j] < (nn - nroots))) data[loc[j] - pad] ^= cor; } } } finish: if (eras_pos != NULL) { for (i = 0; i < count; i++) eras_pos[i] = loc[i] - pad; } return count; }