From: Andreas Franck <afranck@gmx.de>
To: linux-kernel@vger.kernel.org
Subject: Athlon/3DNow write prefetch?
Date: Thu, 23 Aug 2001 20:13:00 +0200 [thread overview]
Message-ID: <01082320130001.21357@dg1kfa> (raw)
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
next reply other threads:[~2001-08-23 18:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-23 18:13 Andreas Franck [this message]
2001-08-23 18:18 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01082320130001.21357@dg1kfa \
--to=afranck@gmx.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®