All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sanders <linux@sandersweb.net>
To: "the arch/x86 maintainers" <x86@kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] x86: Don't use NOPL on 32-bit cpu's because not all systems support it.
Date: Tue, 16 Sep 2008 11:59:15 -0400	[thread overview]
Message-ID: <200809161159.15870.linux@sandersweb.net> (raw)

From: David Sanders <linux@sandersweb.net>

Currently in alternative.c NOPLs are introduced based on the synthetic
cpu feature X86_FEATURE_NOPL.  However, some systems (like Virtual PC 2007)
appear to support it but then will not boot 50% of the time because of
the NOPLs (when paravirtualization support is built into kernel).
This patch standardizes the treatment of NOPL to be like
include/asm-x86/nops.h which only uses NOPLs on 64-bit processors.

Applies to 2.6.27-rc6.

Signed-off-by: David Sanders <linux@sandersweb.net>
---
 arch/x86/kernel/alternative.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 65a0c1b..dceb843 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -160,8 +160,12 @@ const unsigned char *const *find_nop_table(void)
 		return k8_nops;
 	else if (boot_cpu_has(X86_FEATURE_K7))
 		return k7_nops;
-	else if (boot_cpu_has(X86_FEATURE_NOPL))
-		return p6_nops;
+	/*
+	 * Don't use NOPL in 32-bit mode because some Emulators
+	 * do not support it.
+	 */
+	/* else if (boot_cpu_has(X86_FEATURE_NOPL))
+		return p6_nops; */
 	else
 		return intel_nops;
 }
--
1.6.0.2.229.g1293c

             reply	other threads:[~2008-09-16 15:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16 15:59 David Sanders [this message]
2008-09-16 16:32 ` [PATCH] x86: Don't use NOPL on 32-bit cpu's because not all systems support it H. Peter Anvin
2008-09-16 17:00   ` Alan Cox
2008-09-16 17:28     ` H. Peter Anvin
2008-09-16 17:50     ` David Sanders
2008-09-16 17:48   ` David Sanders
2008-09-16 18:03     ` H. Peter Anvin

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=200809161159.15870.linux@sandersweb.net \
    --to=linux@sandersweb.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=x86@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 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.