]> git.baikalelectronics.ru Git - kernel.git/commit
x86-64: don't set the early IDT to point directly to 'early_idt_handler'
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 Feb 2013 21:09:51 +0000 (13:09 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 Feb 2013 21:09:51 +0000 (13:09 -0800)
commitf6361f0765f0e16dfd558abf9a34408106b864d5
tree55e8d5f26c99523c6ebaa8e5059cf678c848fb25
parent895e27056c098699f7f256ac25268548efe191de
x86-64: don't set the early IDT to point directly to 'early_idt_handler'

The code requires the use of the proper per-exception-vector stub
functions (set up as the early_idt_handlers[] array - note the 's') that
make sure to set up the error vector number.  This is true regardless of
whether CONFIG_EARLY_PRINTK is set or not.

Why? The stack offset for the comparison of __KERNEL_CS won't be right
otherwise, nor will the new check (from commit 0611e2b693a4: "x86,
64bit: Use a #PF handler to materialize early mappings on demand") for
the page fault exception vector.

Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/include/asm/proto.h
arch/x86/kernel/head64.c
arch/x86/kernel/head_64.S