lkml.org 
[lkml]   [2005]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 07/15] Basic x86_64 support
    > > 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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-08-04 14:47    [W:0.021 / U:4.916 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site