Changeset da1bafb in mainline for kernel/arch/mips32/include/asm.h
- Timestamp:
- 2010-05-24T18:57:31Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0095368
- Parents:
- 666f492
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/include/asm.h
r666f492 rda1bafb 39 39 #include <config.h> 40 40 41 42 41 static inline void cpu_sleep(void) 43 42 { … … 47 46 48 47 /** Return base address of current stack 49 * 48 * 50 49 * Return the base address of the current stack. 51 50 * The stack is assumed to be STACK_SIZE bytes long. 52 51 * The stack must start on page boundary. 52 * 53 53 */ 54 54 static inline uintptr_t get_stack_base(void) 55 55 { 56 uintptr_t v;56 uintptr_t base; 57 57 58 58 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)) 62 62 ); 63 63 64 return v;64 return base; 65 65 } 66 66 … … 78 78 static inline void pio_write_8(ioport8_t *port, uint8_t v) 79 79 { 80 *port = v; 80 *port = v; 81 81 } 82 82 83 83 static inline void pio_write_16(ioport16_t *port, uint16_t v) 84 84 { 85 *port = v; 85 *port = v; 86 86 } 87 87 88 88 static inline void pio_write_32(ioport32_t *port, uint32_t v) 89 89 { 90 *port = v; 90 *port = v; 91 91 } 92 92
Note:
See TracChangeset
for help on using the changeset viewer.