Re: [git pull] x86 fixes

Ingo Molnar
2008-03-27T20:55:51Z

* Harvey Harrison <harvey.harrison@gmail.com> wrote:

> -#ifdef CONFIG_X86_32
> /* Catch an obscure case of prefetch inside an NX page: */
> - if ((__supported_pte_mask & _PAGE_NX) && (error_code & 16))
> - return 0;
> -#endif
> -
> - /* If it was a exec fault on NX page, ignore */
> - if (error_code & PF_INSTR)
> + if ((__supported_pte_mask & _PAGE_NX) && (error_code & PF_INSTR))
> return 0;

heh, did the exact same cleanup :)

i suspect we would be fine with a simple:

if (error_code & PF_INSTR)
return 0;

because if we get a fault on an instruction fetch then it clearly cannot
be a prefetch erratum ... The NX condition simply comes from a cautious
32-bit workaround. (on 64-bit we always have NX - at least on AMD which
has this erratum.)

and thus the currently pulled code is not incorrect, just ugly and
nonsensical.

Ingo