lkml.org 
[lkml]   [2001]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectAthlon/3DNow write prefetch?
Date
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/

\
 
 \ /
  Last update: 2005-03-22 12:58    [W:0.023 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site