mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: "Andreas Kleen" <ak@suse.de>, <linux-kernel@vger.kernel.org>
Cc: <patches@x86-64.org>
Subject: [PATCH] fix x86 cpuid keys used in alternative_smp()
Date: Tue, 15 Aug 2006 18:03:08 +0200	[thread overview]
Message-ID: <44E20C5C.76E4.0078.0@novell.com> (raw)

By hard-coding the cpuid keys for alternative_smp() rather than using
the symbolic constant it turned out that incorrect values were used on
both i386 (0x68 instead of 0x69) and x86-64 (0x66 instead of 0x68).

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- linux-2.6.18-rc4/include/asm-i386/alternative.h	2006-08-15 11:29:59.000000000 +0200
+++ 2.6.18-rc4-x86-alternatives-key/include/asm-i386/alternative.h	2006-08-15 15:21:15.000000000 +0200
@@ -116,7 +116,7 @@ static inline void alternatives_smp_swit
 		      "  .align 4\n"					\
 		      "  .long 661b\n"            /* label */		\
 		      "  .long 663f\n"		  /* new instruction */	\
-		      "  .byte 0x68\n"            /* X86_FEATURE_UP */	\
+		      "  .byte " __stringify(X86_FEATURE_UP) "\n"	\
 		      "  .byte 662b-661b\n"       /* sourcelen */	\
 		      "  .byte 664f-663f\n"       /* replacementlen */	\
 		      ".previous\n"					\
--- linux-2.6.18-rc4/include/asm-x86_64/alternative.h	2006-08-15 11:30:02.000000000 +0200
+++ 2.6.18-rc4-x86-alternatives-key/include/asm-x86_64/alternative.h	2006-08-15 15:22:41.000000000 +0200
@@ -130,7 +130,7 @@ static inline void alternatives_smp_swit
 		      "  .align 8\n"					\
 		      "  .quad 661b\n"            /* label */		\
 		      "  .quad 663f\n"		  /* new instruction */	\
-		      "  .byte 0x66\n"            /* X86_FEATURE_UP */	\
+		      "  .byte " __stringify(X86_FEATURE_UP) "\n"	\
 		      "  .byte 662b-661b\n"       /* sourcelen */	\
 		      "  .byte 664f-663f\n"       /* replacementlen */	\
 		      ".previous\n"					\



             reply	other threads:[~2006-08-15 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-15 16:03 Jan Beulich [this message]
2006-08-15 16:21 ` Andi Kleen
2006-08-16  6:28   ` Jan Beulich

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=44E20C5C.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@x86-64.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

Powered by JetHome