revert between 56095 -> 55830 in arch
[AROS.git] / arch / ppc-all / include / asm / cpu.h
blobf579362d980bf3e2335c708ee5133f626f29d486
1 #ifndef ASM_PPC_CPU_H
2 #define ASM_PPC_CPU_H
4 #include <inttypes.h>
6 static inline uint32_t rdmsr()
8 uint32_t msr; asm volatile("mfmsr %0":"=r"(msr)); return msr;
11 static inline void wrmsr(uint32_t msr)
13 asm volatile("mtmsr %0"::"r"(msr));
16 #define rdspr(reg) \
17 ({ unsigned long val; asm volatile("mfspr %0,%1":"=r"(val):"i"(reg)); val; })
19 #define wrspr(reg, val) \
20 do { asm volatile("mtspr %0,%1"::"i"(reg),"r"(val)); } while(0)
22 #endif