Changes in kernel/arch/ppc32/include/asm.h [7a0359b:da1bafb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/include/asm.h
r7a0359b rda1bafb 40 40 #include <arch/cpu.h> 41 41 #include <arch/mm/asid.h> 42 #include <trace.h> 43 44 NO_TRACE static inline uint32_t msr_read(void) 42 43 static inline uint32_t msr_read(void) 45 44 { 46 45 uint32_t msr; … … 54 53 } 55 54 56 NO_TRACEstatic inline void msr_write(uint32_t msr)55 static inline void msr_write(uint32_t msr) 57 56 { 58 57 asm volatile ( … … 62 61 } 63 62 64 NO_TRACEstatic inline void sr_set(uint32_t flags, asid_t asid, uint32_t sr)63 static inline void sr_set(uint32_t flags, asid_t asid, uint32_t sr) 65 64 { 66 65 asm volatile ( … … 71 70 } 72 71 73 NO_TRACEstatic inline uint32_t sr_get(uint32_t vaddr)72 static inline uint32_t sr_get(uint32_t vaddr) 74 73 { 75 74 uint32_t vsid; … … 84 83 } 85 84 86 NO_TRACEstatic inline uint32_t sdr1_get(void)85 static inline uint32_t sdr1_get(void) 87 86 { 88 87 uint32_t sdr1; … … 104 103 * 105 104 */ 106 NO_TRACEstatic inline ipl_t interrupts_enable(void)105 static inline ipl_t interrupts_enable(void) 107 106 { 108 107 ipl_t ipl = msr_read(); … … 119 118 * 120 119 */ 121 NO_TRACEstatic inline ipl_t interrupts_disable(void)120 static inline ipl_t interrupts_disable(void) 122 121 { 123 122 ipl_t ipl = msr_read(); … … 133 132 * 134 133 */ 135 NO_TRACEstatic inline void interrupts_restore(ipl_t ipl)134 static inline void interrupts_restore(ipl_t ipl) 136 135 { 137 136 msr_write((msr_read() & (~MSR_EE)) | (ipl & MSR_EE)); … … 145 144 * 146 145 */ 147 NO_TRACEstatic inline ipl_t interrupts_read(void)146 static inline ipl_t interrupts_read(void) 148 147 { 149 148 return msr_read(); … … 155 154 * 156 155 */ 157 NO_TRACEstatic inline bool interrupts_disabled(void)156 static inline bool interrupts_disabled(void) 158 157 { 159 158 return ((msr_read() & MSR_EE) == 0); … … 167 166 * 168 167 */ 169 NO_TRACEstatic inline uintptr_t get_stack_base(void)168 static inline uintptr_t get_stack_base(void) 170 169 { 171 170 uintptr_t base; … … 180 179 } 181 180 182 NO_TRACE static inline void cpu_sleep(void) 183 { 184 } 185 186 NO_TRACE static inline void pio_write_8(ioport8_t *port, uint8_t v) 187 { 188 *port = v; 189 } 190 191 NO_TRACE static inline void pio_write_16(ioport16_t *port, uint16_t v) 192 { 193 *port = v; 194 } 195 196 NO_TRACE static inline void pio_write_32(ioport32_t *port, uint32_t v) 197 { 198 *port = v; 199 } 200 201 NO_TRACE static inline uint8_t pio_read_8(ioport8_t *port) 202 { 203 return *port; 204 } 205 206 NO_TRACE static inline uint16_t pio_read_16(ioport16_t *port) 207 { 208 return *port; 209 } 210 211 NO_TRACE static inline uint32_t pio_read_32(ioport32_t *port) 212 { 213 return *port; 181 static inline void cpu_sleep(void) 182 { 214 183 } 215 184 … … 218 187 extern void userspace_asm(uintptr_t uspace_uarg, uintptr_t stack, uintptr_t entry); 219 188 189 static inline void pio_write_8(ioport8_t *port, uint8_t v) 190 { 191 *port = v; 192 } 193 194 static inline void pio_write_16(ioport16_t *port, uint16_t v) 195 { 196 *port = v; 197 } 198 199 static inline void pio_write_32(ioport32_t *port, uint32_t v) 200 { 201 *port = v; 202 } 203 204 static inline uint8_t pio_read_8(ioport8_t *port) 205 { 206 return *port; 207 } 208 209 static inline uint16_t pio_read_16(ioport16_t *port) 210 { 211 return *port; 212 } 213 214 static inline uint32_t pio_read_32(ioport32_t *port) 215 { 216 return *port; 217 } 218 220 219 #endif 221 220
Note:
See TracChangeset
for help on using the changeset viewer.