]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
x86: Drop unnecessary kernel_eflags variable on 64-bit
authorIan Campbell <ian.campbell@citrix.com>
Fri, 24 Aug 2012 19:58:47 +0000 (23:58 +0400)
committerIngo Molnar <mingo@kernel.org>
Thu, 13 Sep 2012 15:32:47 +0000 (17:32 +0200)
commit6eebdda35e6b18d0dddb2a44e34211bd94f0cad6
tree16bde5b8ac1386699c4f9d5aef6b3fc68c834551
parent816afe4ff98ee10b1d30fd66361be132a0a5cee6
x86: Drop unnecessary kernel_eflags variable on 64-bit

On 64 bit x86 we save the current eflags in cpu_init for use in
ret_from_fork. Strictly speaking reserved bits in EFLAGS should
be read as written but in practise it is unlikely that EFLAGS
could ever be extended in this way and the kernel alread clears
any undefined flags early on.

The equivalent 32 bit code simply hard codes 0x0202 as the new
EFLAGS.

This change makes 64 bit use the same mechanism to setup the
initial EFLAGS on fork. Note that 64 bit resets EFLAGS before
calling schedule_tail() as opposed to 32 bit which calls
schedule_tail() first. Therefore the correct value for EFLAGS
has opposite IF bit.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/20120824195847.GA31628@moon
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/entry_64.S