linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot for H. Peter Anvin" <hpa@linux.intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	tglx@linutronix.de, hpa@linux.intel.com
Subject: [tip:x86/nuke386] x86, 386 removal: Remove CONFIG_X86_POPAD_OK
Date: Fri, 30 Nov 2012 16:40:54 -0800	[thread overview]
Message-ID: <tip-e3228cf4544355f73437a2b9c6916be9cbafc201@git.kernel.org> (raw)
In-Reply-To: <1354132230-21854-8-git-send-email-hpa@linux.intel.com>

Commit-ID:  e3228cf4544355f73437a2b9c6916be9cbafc201
Gitweb:     http://git.kernel.org/tip/e3228cf4544355f73437a2b9c6916be9cbafc201
Author:     H. Peter Anvin <hpa@linux.intel.com>
AuthorDate: Wed, 28 Nov 2012 11:50:29 -0800
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 29 Nov 2012 13:23:03 -0800

x86, 386 removal: Remove CONFIG_X86_POPAD_OK

The check_popad() routine tested for a 386-specific bug, and never
actually did anything useful with it anyway other than print a
message.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1354132230-21854-8-git-send-email-hpa@linux.intel.com
---
 arch/x86/Kconfig.cpu       |  4 ----
 arch/x86/kernel/cpu/bugs.c | 28 ----------------------------
 2 files changed, 32 deletions(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 159ee9c..423db71 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -325,10 +325,6 @@ config X86_INVD_BUG
 	def_bool y
 	depends on M486
 
-config X86_POPAD_OK
-	def_bool y
-	depends on X86_32
-
 config X86_ALIGNMENT_16
 	def_bool y
 	depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 0cd07cc..92dfec9 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -107,33 +107,6 @@ static void __init check_hlt(void)
 }
 
 /*
- *	Most 386 processors have a bug where a POPAD can lock the
- *	machine even from user space.
- */
-
-static void __init check_popad(void)
-{
-#ifndef CONFIG_X86_POPAD_OK
-	int res, inp = (int) &res;
-
-	pr_info("Checking for popad bug... ");
-	__asm__ __volatile__(
-	  "movl $12345678,%%eax; movl $0,%%edi; pusha; popa; movl (%%edx,%%edi),%%ecx "
-	  : "=&a" (res)
-	  : "d" (inp)
-	  : "ecx", "edi");
-	/*
-	 * If this fails, it means that any user program may lock the
-	 * CPU hard. Too bad.
-	 */
-	if (res != 12345678)
-		pr_cont("Buggy\n");
-	else
-		pr_cont("OK\n");
-#endif
-}
-
-/*
  * Check whether we are able to run this kernel safely on SMP.
  *
  * - i386 is no longer supported.
@@ -157,7 +130,6 @@ void __init check_bugs(void)
 #endif
 	check_config();
 	check_hlt();
-	check_popad();
 	init_utsname()->machine[1] =
 		'0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86);
 	alternative_instructions();

  reply	other threads:[~2012-12-01  0:41 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28 19:50 [PATCH 0/8] RFC: Remove 386 support H. Peter Anvin
2012-11-28 19:50 ` [PATCH 1/8] x86, 386 removal: Remove CONFIG_M386 from Kconfig H. Peter Anvin
2012-12-01  0:34   ` [tip:x86/nuke386] " tip-bot for H. Peter Anvin
2012-11-28 19:50 ` [PATCH 2/8] x86, 386 removal: Remove CONFIG_CMPXCHG H. Peter Anvin
2012-12-01  0:35   ` [tip:x86/nuke386] " tip-bot for H. Peter Anvin
2012-11-28 19:50 ` [PATCH 3/8] x86, 386 removal: Remove CONFIG_XADD H. Peter Anvin
2012-11-28 20:30   ` Borislav Petkov
2012-12-01  0:36   ` [tip:x86/nuke386] " tip-bot for H. Peter Anvin
2012-11-28 19:50 ` [PATCH 4/8] x86, 386 removal: Remove CONFIG_BSWAP H. Peter Anvin
2012-12-01  0:37   ` [tip:x86/nuke386] " tip-bot for H. Peter Anvin
2012-11-28 19:50 ` [PATCH 5/8] x86, 386 removal: Remove CONFIG_INVLPG H. Peter Anvin
2012-12-01  0:38   ` [tip:x86/nuke386] " tip-bot for H. Peter Anvin
2012-11-28 19:50 ` [PATCH 6/8] x86, 386 removal: Remove CONFIG_X86_WP_WORKS_OK H. Peter Anvin
2012-11-28 20:52   ` Alan Cox
2012-11-28 23:11     ` H. Peter Anvin
2012-12-01  0:42     ` [tip:x86/nuke386] x86, 386 removal: Document Nx586 as a 386 and thus unsupported tip-bot for H. Peter Anvin
2012-12-01  0:39   ` [tip:x86/nuke386] x86, 386 removal: Remove CONFIG_X86_WP_WORKS_OK tip-bot for H. Peter Anvin
2012-11-28 19:50 ` [PATCH 7/8] x86, 386 removal: Remove CONFIG_X86_POPAD_OK H. Peter Anvin
2012-12-01  0:40   ` tip-bot for H. Peter Anvin [this message]
2012-11-28 19:50 ` [PATCH 8/8] x86, cleanups: Simplify sync_core() in the case of no CPUID H. Peter Anvin
2012-11-28 20:41   ` Borislav Petkov
2012-11-29  0:14     ` H. Peter Anvin
2012-11-29  9:13       ` Borislav Petkov
2012-11-29 21:06         ` H. Peter Anvin
2012-11-29 21:18           ` Borislav Petkov
2012-11-29 21:20             ` H. Peter Anvin
2012-11-29 21:31               ` Borislav Petkov
2012-11-29 21:24     ` H. Peter Anvin
2012-11-29 21:34       ` Borislav Petkov
2012-11-30 17:01       ` Linus Torvalds
2012-11-30 17:28         ` Borislav Petkov
2012-11-30 18:03         ` H. Peter Anvin
2012-11-30 18:10           ` Borislav Petkov
2012-11-30 18:40             ` H. Peter Anvin
2012-12-01  0:41   ` [tip:x86/nuke386] " tip-bot for 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=tip-e3228cf4544355f73437a2b9c6916be9cbafc201@git.kernel.org \
    --to=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).