Re: [PATCH 06/12] i386: Minimum cpu detection cleanups.
- From: "H. Peter Anvin" <hpa@xxxxxxxxx>
- Date: Mon, 30 Apr 2007 09:13:46 -0700
Eric W. Biederman wrote:
^^^^^^^
diff --git a/arch/i386/kernel/verify_cpu.S b/arch/i386/kernel/verify_cpu.S
index ba9e03e..e51a869 100644
--- a/arch/i386/kernel/verify_cpu.S
+++ b/arch/i386/kernel/verify_cpu.S
@@ -4,10 +4,6 @@
#include <asm/cpufeature.h>
verify_cpu:
-#if REQUIRED_MASK1 == 0
- xorl %eax,%eax
- ret
-#endif
pushfl # Save caller passed flags
pushl $0 # Kill any dangerous flags
popfl
@@ -21,7 +17,7 @@ verify_cpu:
testl $(1<<18),%eax
jz bad
While you're in there can you change references to the flags to use the
<asm/cpuflags.h> constants?
-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH 0/12] Early USB debug port and i386 boot cleanups
- From: Eric W. Biederman
- [PATCH 01/12] x86_64: Allow fixmaps to be used with the initial page table.
- From: Eric W. Biederman
- [PATCH 02/12] i386 head.S: Remove unnecessary use of %ebx as the boot cpu flag
- From: Eric W. Biederman
- [PATCH 03/12] i386 head.S: Always run the full set of paging state
- From: Eric W. Biederman
- [PATCH 04/12] i386 voyager: Use modern techniques to setup and teardown low identiy mappings.
- From: Eric W. Biederman
- [PATCH 05/12] i386: During page table initialization always set the leaf page table entries.
- From: Eric W. Biederman
- [PATCH 06/12] i386: Minimum cpu detection cleanups.
- From: Eric W. Biederman
- [PATCH 0/12] Early USB debug port and i386 boot cleanups
- Prev by Date: [PATCH 07/12] i386: Add missing !X86_PAE dependincy to the 2G/2G split.
- Next by Date: Re: [PATCH] 9p: create separate 9p client interface
- Previous by thread: Re: [PATCH 09/12] i386/x86_64: EHCI usb debug port early printk support.
- Next by thread: Re: [PATCH 06/12] i386: Minimum cpu detection cleanups.
- Index(es):
Relevant Pages
- Re: [rfc patch] i386: dont save eflags on task switch
... The "popfl" is the expensive part, and that's the thing that can't really ...
It's the pushfl that will be slow on any OoO CPU, ... all of the memory ordering dependancies
into play. ... flags to some known value is much less expensive. ... (Linux-Kernel) - Re: [rfc patch] i386: dont save eflags on task switch
... The "popfl" is the expensive part, and that's the thing that can't really even be removed.
... It's the pushfl that will be slow on any OoO CPU, as it has dependancies on any previous
instructions that modified the flags, which ends up bringing all of the memory ordering dependancies
into play. ... There is no popfl $IMM instruction, so setting flags never can avoid the
memory read and must make some more expensive assumptions about effects on further instruction stream.
... (Linux-Kernel)