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
));
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)