diff options
author | Joerg Roedel <jroedel@suse.de> | 2020-09-07 15:15:36 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-09-07 22:49:18 +0200 |
commit | 4b47cdbda6f1ad73b08dc7d497bac12b8f26ae0d (patch) | |
tree | 2be0b466d6a1c850b221fac50f2658b2afc8b16a /arch/x86/kernel/head_64.S | |
parent | 097ee5b778b8970e1c2ed3ca1631b297d90acd61 (diff) | |
download | linux-stable-4b47cdbda6f1ad73b08dc7d497bac12b8f26ae0d.tar.gz linux-stable-4b47cdbda6f1ad73b08dc7d497bac12b8f26ae0d.tar.bz2 linux-stable-4b47cdbda6f1ad73b08dc7d497bac12b8f26ae0d.zip |
x86/head/64: Move early exception dispatch to C code
Move the assembly coded dispatch between page-faults and all other
exceptions to C code to make it easier to maintain and extend.
Also change the return-type of early_make_pgtable() to bool and make it
static.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200907131613.12703-36-joro@8bytes.org
Diffstat (limited to 'arch/x86/kernel/head_64.S')
-rw-r--r-- | arch/x86/kernel/head_64.S | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 1de09b58e578..3b40ec44a67d 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -341,18 +341,9 @@ SYM_CODE_START_LOCAL(early_idt_handler_common) pushq %r15 /* pt_regs->r15 */ UNWIND_HINT_REGS - cmpq $14,%rsi /* Page fault? */ - jnz 10f - GET_CR2_INTO(%rdi) /* can clobber %rax if pv */ - call early_make_pgtable - andl %eax,%eax - jz 20f /* All good */ - -10: movq %rsp,%rdi /* RDI = pt_regs; RSI is already trapnr */ - call early_fixup_exception + call do_early_exception -20: decl early_recursion_flag(%rip) jmp restore_regs_and_return_to_kernel SYM_CODE_END(early_idt_handler_common) |