Re: [PATCH] 2.6 workaround for Athlon/Opteron prefetch errata

Jamie Lokier
2003-09-16T11:46:59Z

richard.brunner@amd.com wrote:
> Andi's patch solves both the kernel space and the user space
> issues in a pretty small footprint.

Not really. Userspace still has a problem when run on older kernels,
so it will have to check for AMD and kernel version anyway before
deciding to use the prefetch instruction. That, or install SIGSEGV
and SIGBUS handlers to do the fixup in userspace.

> The user space problem worries me more, because the expectation
> is that if CPUID says the program can use perfetch, it could
> and should regardless of what the kernel decided to do here.

If the workaround isn't compiled in, "prefetch" should be removed from
/proc/cpuinfo on the buggy chips.

-- Jamie