Changes in kernel/arch/ppc32/include/asm.h [da1bafb:7a0359b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/include/asm.h
rda1bafb r7a0359b 40 40 #include <arch/cpu.h> 41 41 #include <arch/mm/asid.h> 42 43 static inline uint32_t msr_read(void) 42 #include <trace.h> 43 44 NO_TRACE static inline uint32_t msr_read(void) 44 45 { 45 46 uint32_t msr; … … 53 54 } 54 55 55 static inline void msr_write(uint32_t msr)56 NO_TRACE static inline void msr_write(uint32_t msr) 56 57 { 57 58 asm volatile ( … … 61 62 } 62 63 63 static inline void sr_set(uint32_t flags, asid_t asid, uint32_t sr)64 NO_TRACE static inline void sr_set(uint32_t flags, asid_t asid, uint32_t sr) 64 65 { 65 66 asm volatile ( … … 70 71 } 71 72 72 static inline uint32_t sr_get(uint32_t vaddr)73 NO_TRACE static inline uint32_t sr_get(uint32_t vaddr) 73 74 { 74 75 uint32_t vsid; … … 83 84 } 84 85 85 static inline uint32_t sdr1_get(void)86 NO_TRACE static inline uint32_t sdr1_get(void) 86 87 { 87 88 uint32_t sdr1; … … 103 104 * 104 105 */ 105 static inline ipl_t interrupts_enable(void)106 NO_TRACE static inline ipl_t interrupts_enable(void) 106 107 { 107 108 ipl_t ipl = msr_read(); … … 118 119 * 119 120 */ 120 static inline ipl_t interrupts_disable(void)121 NO_TRACE static inline ipl_t interrupts_disable(void) 121 122 { 122 123 ipl_t ipl = msr_read(); … … 132 133 * 133 134 */ 134 static inline void interrupts_restore(ipl_t ipl)135 NO_TRACE static inline void interrupts_restore(ipl_t ipl) 135 136 { 136 137 msr_write((msr_read() & (~MSR_EE)) | (ipl & MSR_EE)); … … 144 145 * 145 146 */ 146 static inline ipl_t interrupts_read(void)147 NO_TRACE static inline ipl_t interrupts_read(void) 147 148 { 148 149 return msr_read(); … … 154 155 * 155 156 */ 156 static inline bool interrupts_disabled(void)157 NO_TRACE static inline bool interrupts_disabled(void) 157 158 { 158 159 return ((msr_read() & MSR_EE) == 0); … … 166 167 * 167 168 */ 168 static inline uintptr_t get_stack_base(void)169 NO_TRACE static inline uintptr_t get_stack_base(void) 169 170 { 170 171 uintptr_t base; … … 179 180 } 180 181 181 static inline void cpu_sleep(void) 182 { 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; 183 214 } 184 215 … … 187 218 extern void userspace_asm(uintptr_t uspace_uarg, uintptr_t stack, uintptr_t entry); 188 219 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 219 220 #endif 220 221
Note:
See TracChangeset
for help on using the changeset viewer.