Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3228cf4 authored by H. Peter Anvin's avatar H. Peter Anvin
Browse files

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: default avatarH. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1354132230-21854-8-git-send-email-hpa@linux.intel.com
parent a5c2a893
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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
+0 −28
Original line number Diff line number Diff line
@@ -106,33 +106,6 @@ static void __init check_hlt(void)
	pr_cont("OK\n");
}

/*
 *	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.
 *
@@ -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();