Changeset da1bafb in mainline for kernel/arch/mips32/include/asm.h


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/include/asm.h

    r666f492 rda1bafb  
    3939#include <config.h>
    4040
    41 
    4241static inline void cpu_sleep(void)
    4342{
     
    4746
    4847/** Return base address of current stack
    49  * 
     48 *
    5049 * Return the base address of the current stack.
    5150 * The stack is assumed to be STACK_SIZE bytes long.
    5251 * The stack must start on page boundary.
     52 *
    5353 */
    5454static inline uintptr_t get_stack_base(void)
    5555{
    56         uintptr_t v;
     56        uintptr_t base;
    5757       
    5858        asm volatile (
    59                 "and %0, $29, %1\n"
    60                 : "=r" (v)
    61                 : "r" (~(STACK_SIZE-1))
     59                "and %[base], $29, %[mask]\n"
     60                : [base] "=r" (base)
     61                : [mask] "r" (~(STACK_SIZE - 1))
    6262        );
    6363       
    64         return v;
     64        return base;
    6565}
    6666
     
    7878static inline void pio_write_8(ioport8_t *port, uint8_t v)
    7979{
    80         *port = v;     
     80        *port = v;
    8181}
    8282
    8383static inline void pio_write_16(ioport16_t *port, uint16_t v)
    8484{
    85         *port = v;     
     85        *port = v;
    8686}
    8787
    8888static inline void pio_write_32(ioport32_t *port, uint32_t v)
    8989{
    90         *port = v;     
     90        *port = v;
    9191}
    9292
Note: See TracChangeset for help on using the changeset viewer.