From: Andi Kleen <ak@muc.de>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix prefetch patching in 2.5-bk
Date: Thu, 1 May 2003 02:15:12 +0200 [thread overview]
Message-ID: <20030501001511.GA2890@averell> (raw)
Brown paperbag time. I forgot to take the modrm byte in account
with the prefetch patch replacement. With 3.2 it worked because
it used the right registers in my configuration.
But gcc 2.96 uses a different register in __dpath and the prefetch becomes
4 bytes with modrm and the original nop needs to be as long as that too.
If your machine BUG()s in apply_alternatives at booting
or module loading you need this patch.
Linus please apply.
-Andi
Index: linux/include/asm-i386/processor.h
===================================================================
RCS file: /home/cvs/linux-2.5/include/asm-i386/processor.h,v
retrieving revision 1.48
diff -u -u -r1.48 processor.h
--- linux/include/asm-i386/processor.h 30 Apr 2003 14:32:05 -0000 1.48
+++ linux/include/asm-i386/processor.h 30 Apr 2003 22:48:26 -0000
@@ -564,7 +564,7 @@
#define ARCH_HAS_PREFETCH
extern inline void prefetch(const void *x)
{
- alternative_input(ASM_NOP3,
+ alternative_input(ASM_NOP4,
"prefetchnta (%1)",
X86_FEATURE_XMM,
"r" (x));
@@ -578,7 +578,7 @@
spinlocks to avoid one state transition in the cache coherency protocol. */
extern inline void prefetchw(const void *x)
{
- alternative_input(ASM_NOP3,
+ alternative_input(ASM_NOP4,
"prefetchw (%1)",
X86_FEATURE_3DNOW,
"r" (x));
next reply other threads:[~2003-05-01 0:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-01 0:15 Andi Kleen [this message]
2003-05-01 1:21 ` [PATCH] Fix prefetch patching in 2.5-bk Linus Torvalds
2003-05-01 1:51 ` Andi Kleen
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=20030501001511.GA2890@averell \
--to=ak@muc.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.