public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Roland McGrath <roland@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86_64 early_idt_handler improvements
Date: Fri, 11 Jan 2008 07:27:07 +0100	[thread overview]
Message-ID: <p73k5mgnah0.fsf@bingen.suse.de> (raw)
In-Reply-To: <20080111060705.9EAF126F9A9@magilla.localdomain> (Roland McGrath's message of "Thu\, 10 Jan 2008 22\:07\:05 -0800 \(PST\)")

Roland McGrath <roland@redhat.com> 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@redhat.com>
> ---
>  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

  reply	other threads:[~2008-01-11  6:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-11  6:07 [PATCH] x86_64 early_idt_handler improvements Roland McGrath
2008-01-11  6:27 ` Andi Kleen [this message]
2008-01-11  7:07   ` Roland McGrath
2008-01-11  7:38 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=p73k5mgnah0.fsf@bingen.suse.de \
    --to=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox