Re: [patch 07/15] Basic x86_64 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 03, 2005 at 03:05:31PM +0200, Andi Kleen wrote:
> 
> Only reading the changes outside kgdb.c....
> 
> > +
> > +#ifdef CONFIG_KGDB
> > +	/*
> > +	 * Has KGDB been told to break as soon as possible?
> > +	 */
> > +	if (kgdb_initialized == -1)
> > +		tasklet_schedule(&kgdb_tasklet_breakpoint);
> 
> 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.

> > diff -puN include/asm-x86_64/hw_irq.h~x86_64-lite include/asm-x86_64/hw_irq.h
> > --- 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.

> >  #define THERMAL_APIC_VECTOR	0xf0
> >  
> > diff -puN include/asm-x86_64/ipi.h~x86_64-lite include/asm-x86_64/ipi.h
> > --- linux-2.6.13-rc3/include/asm-x86_64/ipi.h~x86_64-lite	2005-07-29 13:19:10.000000000 -0700
> > +++ linux-2.6.13-rc3-trini/include/asm-x86_64/ipi.h	2005-07-29 13:19:10.000000000 -0700
> > @@ -62,6 +62,12 @@ static inline void __send_IPI_shortcut(u
> >  	 * No need to touch the target chip field
> >  	 */
> >  	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.

> If anything pass a flag.

In __send_IPI_shortcut?  OK.

> >  	,"rcx","rbx","rdx","r8","r9","r10","r11","r12","r13","r14","r15"
> >  
> >  #define switch_to(prev,next,last) \
> > -	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).

-- 
Tom Rini
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux