Commit 5758d5dfef1c514200bda3f29ba700f1c3e3bc99
Committed by
Andi Kleen
1 parent
3b8d1fe0f2
Exists in
master
and in
4 other branches
[PATCH] i386: fix dubious segment register clear in cpu_init()
Fix a very dubious piece of code in arch/i386/kernel/cpu/common.c:cpu_init(). This clears out %fs and %gs, but clobbers %eax in the process without telling gcc. It turns out that gcc happens to be not using %eax at that point anyway so it doesn't matter much, but it looks like a bomb waiting to go off. This does end up saving an instruction, because gcc wants %eax==0 for the set_debugreg()s below. Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Andi Kleen <ak@suse.de>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
arch/i386/kernel/cpu/common.c