mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Brian Gerst <brgerst@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	penberg@cs.helsinki.fi, brgerst@gmail.com, tglx@linutronix.de
Subject: [tip:x86/asm] x86: Use symbolic MSR names
Date: Thu, 22 Jul 2010 05:01:05 GMT	[thread overview]
Message-ID: <tip-cfaa71ee9794472598d3966c3315cd6bd8f953d3@git.kernel.org> (raw)
In-Reply-To: <1279371808-24804-2-git-send-email-brgerst@gmail.com>

Commit-ID:  cfaa71ee9794472598d3966c3315cd6bd8f953d3
Gitweb:     http://git.kernel.org/tip/cfaa71ee9794472598d3966c3315cd6bd8f953d3
Author:     Brian Gerst <brgerst@gmail.com>
AuthorDate: Sat, 17 Jul 2010 09:03:27 -0400
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Wed, 21 Jul 2010 21:23:40 -0700

x86: Use symbolic MSR names

Use symbolic MSR names instead of hardcoding the MSR index.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
LKML-Reference: <1279371808-24804-2-git-send-email-brgerst@gmail.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/kernel/acpi/realmode/wakeup.S |    2 +-
 arch/x86/kernel/verify_cpu_64.S        |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/acpi/realmode/wakeup.S b/arch/x86/kernel/acpi/realmode/wakeup.S
index 580b4e2..28595d6 100644
--- a/arch/x86/kernel/acpi/realmode/wakeup.S
+++ b/arch/x86/kernel/acpi/realmode/wakeup.S
@@ -104,7 +104,7 @@ _start:
 	movl	%eax, %ecx
 	orl	%edx, %ecx
 	jz	1f
-	movl	$0xc0000080, %ecx
+	movl	$MSR_EFER, %ecx
 	wrmsr
 1:
 
diff --git a/arch/x86/kernel/verify_cpu_64.S b/arch/x86/kernel/verify_cpu_64.S
index 45b6f8a..56a8c2a 100644
--- a/arch/x86/kernel/verify_cpu_64.S
+++ b/arch/x86/kernel/verify_cpu_64.S
@@ -31,6 +31,7 @@
  */
 
 #include <asm/cpufeature.h>
+#include <asm/msr-index.h>
 
 verify_cpu:
 	pushfl				# Save caller passed flags
@@ -88,7 +89,7 @@ verify_cpu_sse_test:
 	je	verify_cpu_sse_ok
 	test	%di,%di
 	jz	verify_cpu_no_longmode	# only try to force SSE on AMD
-	movl	$0xc0010015,%ecx	# HWCR
+	movl	$MSR_K7_HWCR,%ecx
 	rdmsr
 	btr	$15,%eax		# enable SSE
 	wrmsr

  parent reply	other threads:[~2010-07-22  5:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-17 13:03 [PATCH 1/3] x86: Remove redundant K6 MSRs Brian Gerst
2010-07-17 13:03 ` [PATCH 2/3] x86: Use symbolic MSR names Brian Gerst
2010-07-17 16:04   ` Pekka Enberg
2010-07-22  5:01   ` tip-bot for Brian Gerst [this message]
2010-07-17 13:03 ` [PATCH 3/3] x86-64: Simplify loading initial_gs Brian Gerst
2010-07-17 16:14   ` Pekka Enberg
2010-07-22  5:01   ` [tip:x86/asm] " tip-bot for Brian Gerst
2010-07-17 16:02 ` [PATCH 1/3] x86: Remove redundant K6 MSRs Pekka Enberg
2010-07-22  5:00 ` [tip:x86/asm] " tip-bot for Brian Gerst

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=tip-cfaa71ee9794472598d3966c3315cd6bd8f953d3@git.kernel.org \
    --to=brgerst@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=penberg@cs.helsinki.fi \
    --cc=tglx@linutronix.de \
    /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