Changeset da1bafb in mainline for kernel/arch/ia64/src/interrupt.c


Ignore:
Timestamp:
2010-05-24T18:57:31Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0095368
Parents:
666f492
Message:

major code revision

  • replace spinlocks taken with interrupts disabled with irq_spinlocks
  • change spacing (not indendation) to be tab-size independent
  • use unsigned integer types where appropriate (especially bit flags)
  • visual separation
  • remove argument names in function prototypes
  • string changes
  • correct some formating directives
  • replace various cryptic single-character variables (t, a, m, c, b, etc.) with proper identifiers (thread, task, timeout, as, itm, itc, etc.)
  • unify some assembler constructs
  • unused page table levels are now optimized out in compile time
  • replace several ints (with boolean semantics) with bools
  • use specifically sized types instead of generic types where appropriate (size_t, uint32_t, btree_key_t)
  • improve comments
  • split asserts with conjuction into multiple independent asserts
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/src/interrupt.c

    r666f492 rda1bafb  
    5757#include <putchar.h>
    5858
    59 #define VECTORS_64_BUNDLE       20
    60 #define VECTORS_16_BUNDLE       48
    61 #define VECTORS_16_BUNDLE_START 0x5000
    62 #define VECTOR_MAX              0x7f00
    63 
    64 #define BUNDLE_SIZE             16
     59#define VECTORS_64_BUNDLE        20
     60#define VECTORS_16_BUNDLE        48
     61#define VECTORS_16_BUNDLE_START  0x5000
     62
     63#define VECTOR_MAX  0x7f00
     64
     65#define BUNDLE_SIZE  16
    6566
    6667static const char *vector_names_64_bundle[VECTORS_64_BUNDLE] = {
     
    134135static void dump_interrupted_context(istate_t *istate)
    135136{
    136         const char *ifa = symtab_fmt_name_lookup(istate->cr_ifa);
    137         const char *iipa = symtab_fmt_name_lookup(istate->cr_iipa);
    138         const char *iip = symtab_fmt_name_lookup(istate->cr_iip);
    139        
    140137        putchar('\n');
    141138        printf("Interrupted context dump:\n");
     
    149146            istate->cr_ipsr);
    150147       
    151         printf("cr.iip=%#018llx, #%d\t(%s)\n", istate->cr_iip,
    152             istate->cr_isr.ei, iip);
    153         printf("cr.iipa=%#018llx\t(%s)\n", istate->cr_iipa, iipa);
    154         printf("cr.ifa=%#018llx\t(%s)\n", istate->cr_ifa, ifa);
     148        printf("cr.iip=%#018llx, #%d\t(%s)\n", istate->cr_iip, istate->cr_isr.ei,
     149            symtab_fmt_name_lookup(istate->cr_iip));
     150        printf("cr.iipa=%#018llx\t(%s)\n", istate->cr_iipa,
     151            symtab_fmt_name_lookup(istate->cr_iipa));
     152        printf("cr.ifa=%#018llx\t(%s)\n", istate->cr_ifa,
     153            symtab_fmt_name_lookup(istate->cr_ifa));
    155154}
    156155
     
    218217                istate->cr_ipsr.ri++;
    219218        }
    220 
     219       
    221220        return syscall_handler(istate->in0, istate->in1, istate->in2,
    222221            istate->in3, istate->in4, istate->in5, istate->in6);
     
    234233static void end_of_local_irq(void)
    235234{
    236         asm volatile ("mov cr.eoi=r0;;");
    237 }
    238 
     235        asm volatile (
     236                "mov cr.eoi=r0;;"
     237        );
     238}
    239239
    240240void external_interrupt(uint64_t vector, istate_t *istate)
    241241{
    242242        cr_ivr_t ivr;
    243         irq_t *irq;
    244243       
    245244        ivr.value = ivr_read();
    246245        srlz_d();
    247 
     246       
     247        irq_t *irq;
     248       
    248249        switch (ivr.vector) {
    249250        case INTERRUPT_SPURIOUS:
     
    252253#endif
    253254                break;
    254 
     255       
    255256#ifdef CONFIG_SMP
    256257        case VECTOR_TLB_SHOOTDOWN_IPI:
     
    259260                break;
    260261#endif
    261 
     262       
    262263        case INTERRUPT_TIMER:
    263264                irq = irq_dispatch_and_lock(ivr.vector);
    264265                if (irq) {
    265266                        irq->handler(irq);
    266                         spinlock_unlock(&irq->lock);
     267                        irq_spinlock_unlock(&irq->lock, false);
    267268                } else {
    268269                        panic("Unhandled Internal Timer Interrupt (%d).",
     
    283284                        if (!irq->preack)
    284285                                end_of_local_irq();
    285                         spinlock_unlock(&irq->lock);
     286                        irq_spinlock_unlock(&irq->lock, false);
    286287                } else {
    287288                        /*
Note: See TracChangeset for help on using the changeset viewer.