* Athlon/3DNow write prefetch?
@ 2001-08-23 18:13 Andreas Franck
2001-08-23 18:18 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Franck @ 2001-08-23 18:13 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-08-23 18:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-23 18:13 Athlon/3DNow write prefetch? Andreas Franck
2001-08-23 18:18 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®