Athlon/3DNow write prefetch?

From: Andreas Franck (afranck@gmx.de)
Date: Thu Aug 23 2001 - 13:13:00 EST


Hello people,

in looking at the prefetch code from include/asm-i386/processor.h on
2.4.9-ac9, I have noticed that prefetchw seems not to be implemented right:

The Athlon/3DNow prefetchw() implementation uses the `prefetch' assembler
instruction, which is in fact a read prefetch, while it should use the
`prefetchw' instruction, which is for write prefetch.

Any comments on this?

Greetings,
Andreas

(Here the excerpt from the code...)

[...]

/* Prefetch instructions for Pentium III and AMD Athlon */
#ifdef CONFIG_MPENTIUMIII
 
#define ARCH_HAS_PREFETCH
extern inline void prefetch(const void *x)
{
        __asm__ __volatile__ ("prefetchnta (%0)" : : "r"(x));
}
 
#elif CONFIG_X86_USE_3DNOW
 
#define ARCH_HAS_PREFETCH
#define ARCH_HAS_PREFETCHW
#define ARCH_HAS_SPINLOCK_PREFETCH
 
extern inline void prefetch(const void *x)
{
         __asm__ __volatile__ ("prefetch (%0)" : : "r"(x));
}
 
extern inline void prefetchw(const void *x)
{
         __asm__ __volatile__ ("prefetch (%0)" : : "r"(x));
                                ^^^^^^^^ <- Shouldn't this be prefetchw ???
}
#define spin_lock_prefetch(x) prefetchw(x)
 
#endif

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



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:01:00 EST