Changes in kernel/arch/mips32/include/asm.h [d99c1d2:da1bafb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/include/asm.h
rd99c1d2 rda1bafb 27 27 */ 28 28 29 /** @addtogroup mips32 29 /** @addtogroup mips32 30 30 * @{ 31 31 */ … … 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 … … 74 74 extern void interrupts_restore(ipl_t ipl); 75 75 extern ipl_t interrupts_read(void); 76 extern void asm_delay_loop(uint32_t t);76 extern bool interrupts_disabled(void); 77 77 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.