Re: [PATCH] x86_64 early_idt_handler improvements
From: Andi Kleen
Date: Fri Jan 11 2008 - 01:27:20 EST
Roland McGrath <roland@xxxxxxxxxx> writes:
> It's not too pretty, but I found this made the "PANIC: early exception"
> messages become much more reliably useful: 1. print the vector number,
> 2. print the %cs value, 3. handle error-code-pushing vs non-pushing vectors.
For what do you need cs? It should be always the same for early boot.
>
> Signed-off-by: Roland McGrath <roland@xxxxxxxxxx>
> ---
> arch/x86/kernel/head64.c | 6 ++++--
> arch/x86/kernel/head_64.S | 34 ++++++++++++++++++++++++++++++----
> 2 files changed, 34 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
> index 4a1c135..0000000 100644
> --- a/arch/x86/kernel/head64.c
> +++ b/arch/x86/kernel/head64.c
> @@ -48,6 +48,8 @@ static void __init copy_bootdata(char *r
> }
> }
>
> +extern const char early_idt_handlers[IDT_ENTRIES][10];
I don't think that minor improvement is worth that much memory
(several KB for the array and some more for all the handlers)
Also in my experience it is not that difficult to work out from
which vector the exception came from. There are not that many variants
anyways; it's near always #GP or #PF.
-Andi
--
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/