[PATCH] Prefetch workaround for Athlon/Opteron
This is the latest iteration of the workaround for the Athlon/Opteron prefetch erratum. Sometimes the CPU would incorrectly report an exception on prefetch. This supercedes the previous dumb workaround of checking for AMD CPUs in prefetch(). That one bloated the kernel by several KB and lead to lots of unnecessary checks in hot paths. Also this one handles user space faults too, so the kernel can effectively isolte the user space from caring about this errata. Instead it handles it in the slow path of the exception handler (the check is only done when the kernel would normally trigger seg fault or crash anyways) All the serious criticisms to the previous patches have been addressed. It checks segment bases now, handles vm86 mode and avoids deadlocks when the prefetch exception happened inside mmap_sem. This includes review and fixes from Jamie Lokier and Andrew Morton. Opcode decoder based on code from Richard Brunner.
Showing
Please register or sign in to comment