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

From: Jamie Lokier
Date: Tue Sep 16 2003 - 06:56:20 EST


Mikael Pettersson wrote:
> extern inline void prefetch(const void *x)
> {
> if (cpu_data[0].x86_vendor == X86_VENDOR_AMD)
> return; /* Some athlons fault if the address is bad */
> alternative_input(ASM_NOP4,
> "prefetchnta (%1)",
> X86_FEATURE_XMM,
> "r" (x));
> }
>
> A dynamic test at each occurrence. That's truly horrible.

Is there any reason why alternative_input() cannot be used by itself?
Another synthetic feature bit would sort this out, making a kernel
that always works on AMD, and is optimised for AMD if the fixup is
configured in: X86_FEATURE_XMM_PREFETCH.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/