On 07/13/2009 03:16 PM, Matt Turner forwarded:
The problem is that the memchr() function on alpha uses prefetch, which
can cause a page boundary to be crossed, while the standards (POSIX and
C99) says it should stop when a match is found.
That's not supposed to matter -- faults from prefetch are supposed to be
ignored; see do_page_fault:
/* As of EV6, a load into $31/$f31 is a prefetch, and never faults
(or is suppressed by the PALcode). Support that for older CPUs
by ignoring such an instruction. */
if (cause == 0) {
unsigned int insn;
__get_user(insn, (unsigned int __user *)regs->pc);
if ((insn >> 21 & 0x1f) == 0x1f &&
/* ldq ldl ldt lds ldg ldf ldwu ldbu */
(1ul << (insn >> 26) & 0x30f00001400ul)) {
regs->pc += 4;
return;
}
}
Can you figure out why that kernel code isn't working? I no longer have
working alpha hw...
r~
--
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html