Changeset View
Changeset View
Standalone View
Standalone View
head/sys/powerpc/include/cpufunc.h
Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | |||||
mttb(u_quad_t time) | mttb(u_quad_t time) | ||||
{ | { | ||||
mtspr(TBR_TBWL, 0); | mtspr(TBR_TBWL, 0); | ||||
mtspr(TBR_TBWU, (uint32_t)(time >> 32)); | mtspr(TBR_TBWU, (uint32_t)(time >> 32)); | ||||
mtspr(TBR_TBWL, (uint32_t)(time & 0xffffffff)); | mtspr(TBR_TBWL, (uint32_t)(time & 0xffffffff)); | ||||
} | } | ||||
static __inline register_t | |||||
mffs(void) | |||||
{ | |||||
register_t value; | |||||
__asm __volatile ("mffs 0; stfd 0,0(%0)" | |||||
:: "b"(&value)); | |||||
return (value); | |||||
} | |||||
static __inline void | |||||
mtfsf(register_t value) | |||||
{ | |||||
__asm __volatile ("lfd 0,0(%0); mtfsf 0xff,0" | |||||
:: "b"(&value)); | |||||
} | |||||
static __inline void | static __inline void | ||||
eieio(void) | eieio(void) | ||||
{ | { | ||||
__asm __volatile ("eieio" : : : "memory"); | __asm __volatile ("eieio" : : : "memory"); | ||||
} | } | ||||
static __inline void | static __inline void | ||||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |