summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2012-11-28 14:50:29 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2012-11-29 16:23:03 -0500
commite3228cf4544355f73437a2b9c6916be9cbafc201 (patch)
tree7632f9ad5c3db45c9668ea18ad447cb719acea37 /arch
parenta5c2a893dbd4956a72fb261e8790d19f67b52c99 (diff)
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
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/Kconfig.cpu4
-rw-r--r--arch/x86/kernel/cpu/bugs.c28
2 files changed, 0 insertions, 32 deletions
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 159ee9c824c9..423db7189eb9 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -325,10 +325,6 @@ config X86_INVD_BUG
325 def_bool y 325 def_bool y
326 depends on M486 326 depends on M486
327 327
328config X86_POPAD_OK
329 def_bool y
330 depends on X86_32
331
332config X86_ALIGNMENT_16 328config X86_ALIGNMENT_16
333 def_bool y 329 def_bool y
334 depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1 330 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 0cd07ccdf380..92dfec986a48 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)
107} 107}
108 108
109/* 109/*
110 * Most 386 processors have a bug where a POPAD can lock the
111 * machine even from user space.
112 */
113
114static void __init check_popad(void)
115{
116#ifndef CONFIG_X86_POPAD_OK
117 int res, inp = (int) &res;
118
119 pr_info("Checking for popad bug... ");
120 __asm__ __volatile__(
121 "movl $12345678,%%eax; movl $0,%%edi; pusha; popa; movl (%%edx,%%edi),%%ecx "
122 : "=&a" (res)
123 : "d" (inp)
124 : "ecx", "edi");
125 /*
126 * If this fails, it means that any user program may lock the
127 * CPU hard. Too bad.
128 */
129 if (res != 12345678)
130 pr_cont("Buggy\n");
131 else
132 pr_cont("OK\n");
133#endif
134}
135
136/*
137 * Check whether we are able to run this kernel safely on SMP. 110 * Check whether we are able to run this kernel safely on SMP.
138 * 111 *
139 * - i386 is no longer supported. 112 * - i386 is no longer supported.
@@ -157,7 +130,6 @@ void __init check_bugs(void)
157#endif 130#endif
158 check_config(); 131 check_config();
159 check_hlt(); 132 check_hlt();
160 check_popad();
161 init_utsname()->machine[1] = 133 init_utsname()->machine[1] =
162 '0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86); 134 '0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86);
163 alternative_instructions(); 135 alternative_instructions();