From: Andi Kleen <ak@suse.de>
To: Tom Rini <trini@kernel.crashing.org>
Cc: Andi Kleen <ak@suse.de>,
akpm@osdl.org, linux-kernel@vger.kernel.org,
amitkale@linsyssoft.com
Subject: Re: [patch 07/15] Basic x86_64 support
Date: Thu, 4 Aug 2005 14:39:00 +0200 [thread overview]
Message-ID: <20050804123900.GR8266@wotan.suse.de> (raw)
In-Reply-To: <20050803133756.GA3337@smtp.west.cox.net>
> > That doesn't make much sense here. tasklet will only run when interrupts
> > are enabled, and that is much later. You could move it to there.
>
> Where? Keep in mind it's really only x86_64 that isn't able to break
> sooner.
The local_irq_enable() call in init/main.c:start_kernel()
If you want to run gdb earlier you need to do it without a tasklet.
> > > --- linux-2.6.13-rc3/include/asm-x86_64/hw_irq.h~x86_64-lite 2005-07-29 13:19:10.000000000 -0700
> > > +++ linux-2.6.13-rc3-trini/include/asm-x86_64/hw_irq.h 2005-07-29 13:19:10.000000000 -0700
> > > @@ -55,6 +55,7 @@ struct hw_interrupt_type;
> > > #define TASK_MIGRATION_VECTOR 0xfb
> > > #define CALL_FUNCTION_VECTOR 0xfa
> > > #define KDB_VECTOR 0xf9
> > > +#define KGDB_VECTOR 0xf8
> >
> > I already allocated these vectors for something else.
>
> Is there another we can use? Just following what looked to be the
> logical order.
How about you use KDB_VECTOR and rename it to DEBUG_VECTOR
and then just check if kgdb is currently active?
KDB can do the same.
I changed the assignment in my tree like this:
#define SPURIOUS_APIC_VECTOR 0xff
#define ERROR_APIC_VECTOR 0xfe
#define RESCHEDULE_VECTOR 0xfd
#define CALL_FUNCTION_VECTOR 0xfc
#define KDB_VECTOR 0xfb /* reserved for KDB */
#define THERMAL_APIC_VECTOR 0xfa
/* 0xf9 free */
#define INVALIDATE_TLB_VECTOR_END 0xf8
#define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f8 used for TLB flush */
but that can be merged later. THere will be probably more changes
with the per CPU IDT planned.
> > > cfg = __prepare_ICR(shortcut, vector, dest);
> > > + if (vector == KGDB_VECTOR) {
> > > + /*
> > > + * KGDB IPI is to be delivered as a NMI
> > > + */
> > > + cfg = (cfg&~APIC_VECTOR_MASK)|APIC_DM_NMI;
> > > + }
> >
> > No way adding another ugly special case like this. I wanted
> > to rip out the KDB version for a long time.
>
> I'd be happy to rework it in a cleaner manner, just point me at an
> example please.
The code is equivalent to passing shortcut|APIC_DM_NMI and vector == 0
> > > - asm volatile(SAVE_CONTEXT \
> > > + asm volatile(".globl __switch_to_begin\n\t" \
> > > + "__switch_to_begin:\n\t" \
> > > + SAVE_CONTEXT \
> >
> > Why is this needed?
>
> So that backtraces show they're in switch_to rather than somewhere else
> (since it's a #define we wouldn't know otherwise).
Ok.
-Andi
next prev parent reply other threads:[~2005-08-04 12:42 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-29 21:18 [patch 01/15] KGDB: Core files Tom Rini
[not found] ` <1.2972005.trini@kernel.crashing.org>
2005-07-29 21:18 ` [patch 02/15] KGDB: i386 core functionality Tom Rini
2005-07-29 21:19 ` [patch 03/15] Basic PowerPC32 support Tom Rini
2005-07-29 21:19 ` [patch 04/15] I/O driver for 8250-compatible UARTs Tom Rini
2005-07-29 21:19 ` [patch 05/15] Basic MIPS support Tom Rini
2005-07-29 21:19 ` [patch 06/15] Basic IA64 support Tom Rini
2005-07-29 21:20 ` [patch 07/15] Basic x86_64 support Tom Rini
2005-08-03 13:05 ` Andi Kleen
2005-08-03 13:37 ` Tom Rini
2005-08-04 12:39 ` Andi Kleen [this message]
2005-08-04 14:04 ` Tom Rini
2005-08-04 14:06 ` Andi Kleen
2005-08-04 14:14 ` Tom Rini
2005-08-04 14:28 ` Andi Kleen
2005-08-04 15:06 ` Tom Rini
2005-08-04 18:56 ` Andi Kleen
2005-08-04 19:08 ` Tom Rini
2005-08-07 0:48 ` Keith Owens
2005-08-08 17:56 ` Tom Rini
2005-07-29 21:20 ` [patch 08/15] Basic SuperH support Tom Rini
2005-07-29 21:20 ` [patch 09/15] KGDB: Basic ARM support Tom Rini
2005-07-29 21:20 ` [patch 10/15] Basic support for PowerPC64 Tom Rini
2005-07-29 21:20 ` [patch 11/15] KGDB: KGDBoE I/O driver Tom Rini
2005-08-04 0:55 ` Matt Mackall
2005-07-29 21:21 ` [patch 12/15] KGDB: Add CFI DWARF2 annotation support Tom Rini
2005-07-29 21:21 ` [patch 13/15] Minor SysRq keyboard bugfix for KGDB Tom Rini
2005-07-29 21:21 ` [patch 14/15] Allow KGDB to work well with loaded modules Tom Rini
2005-07-29 21:21 ` [patch 15/15] Add hardware breakpoint support for i386 Tom Rini
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=20050804123900.GR8266@wotan.suse.de \
--to=ak@suse.de \
--cc=akpm@osdl.org \
--cc=amitkale@linsyssoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trini@kernel.crashing.org \
/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
all inboxes | Powered by JetHome®