Skip to content

Commit e3228cf

Browse files
author
H. Peter Anvin
committed
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
1 parent a5c2a89 commit e3228cf

2 files changed

Lines changed: 0 additions & 32 deletions

File tree

‎arch/x86/Kconfig.cpu‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,6 @@ config X86_INVD_BUG
325325
def_bool y
326326
depends on M486
327327

328-
config X86_POPAD_OK
329-
def_bool y
330-
depends on X86_32
331-
332328
config X86_ALIGNMENT_16
333329
def_bool y
334330
depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1

‎arch/x86/kernel/cpu/bugs.c‎

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -106,33 +106,6 @@ static void __init check_hlt(void)
106106
pr_cont("OK\n");
107107
}
108108

109-
/*
110-
* Most 386 processors have a bug where a POPAD can lock the
111-
* machine even from user space.
112-
*/
113-
114-
static 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-
136109
/*
137110
* Check whether we are able to run this kernel safely on SMP.
138111
*
@@ -157,7 +130,6 @@ void __init check_bugs(void)
157130
#endif
158131
check_config();
159132
check_hlt();
160-
check_popad();
161133
init_utsname()->machine[1] =
162134
'0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86);
163135
alternative_instructions();

0 commit comments

Comments
 (0)