Changeset da1bafb in mainline for kernel/arch/mips32/src/exception.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/mips32/src/exception.c

    r666f492 rda1bafb  
    2727 */
    2828
    29 /** @addtogroup mips32 
     29/** @addtogroup mips32
    3030 * @{
    3131 */
     
    6767        "Floating Point",
    6868        NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    69         "WatchHi/WatchLo", /* 23 */
     69        "WatchHi/WatchLo",  /* 23 */
    7070        NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    7171        "Virtual Coherency - data",
     
    7474static void print_regdump(istate_t *istate)
    7575{
    76         const char *pcsymbol = symtab_fmt_name_lookup(istate->epc);
    77         const char *rasymbol = symtab_fmt_name_lookup(istate->ra);
    78        
    79         printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol,
    80             istate->ra, rasymbol, istate->sp);
     76        printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc,
     77            symtab_fmt_name_lookup(istate->epc), istate->ra,
     78            symtab_fmt_name_lookup(istate->ra), istate->sp);
    8179}
    8280
     
    135133static void interrupt_exception(int n, istate_t *istate)
    136134{
    137         uint32_t cause;
    138         int i;
     135        /* Decode interrupt number and process the interrupt */
     136        uint32_t cause = (cp0_cause_read() >> 8) & 0xff;
    139137       
    140         /* decode interrupt number and process the interrupt */
    141         cause = (cp0_cause_read() >> 8) & 0xff;
    142        
     138        unsigned int i;
    143139        for (i = 0; i < 8; i++) {
    144140                if (cause & (1 << i)) {
     
    149145                                 */
    150146                                irq->handler(irq);
    151                                 spinlock_unlock(&irq->lock);
     147                                irq_spinlock_unlock(&irq->lock, false);
    152148                        } else {
    153149                                /*
     
    172168{
    173169        int i;
    174 
     170       
    175171        /* Clear exception table */
    176172        for (i = 0; i < IVT_ITEMS; i++)
Note: See TracChangeset for help on using the changeset viewer.