Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Rudolf Marek <r.marek@assembler.cz>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5564
2b7e53f0-3cfb-0310-b3e9-
8179ed1497e1
/* the memory clobber prevents the GCC from reordering the read/write order
of CR0 */
/* the memory clobber prevents the GCC from reordering the read/write order
of CR0 */
asm volatile ("movl %0, %%cr0" : : "r" (cr0) : "memory");
}
asm volatile ("movl %0, %%cr0" : : "r" (cr0) : "memory");
}
+static inline void wbinvd(void)
+{
+ asm volatile ("wbinvd" ::: "memory");
+}
+
#else
static inline unsigned long read_cr0(void)
#else
static inline unsigned long read_cr0(void)
asm volatile ("movl %0, %%cr0" : : "r" (cr0));
}
asm volatile ("movl %0, %%cr0" : : "r" (cr0));
}
+static inline void wbinvd(void)
+{
+ asm volatile ("wbinvd");
+}
static inline void invd(void)
{
asm volatile("invd" ::: "memory");
}
static inline void invd(void)
{
asm volatile("invd" ::: "memory");
}
-static inline void wbinvd(void)
-{
- asm volatile ("wbinvd" ::: "memory");
-}
-
static inline void enable_cache(void)
{
unsigned long cr0;
static inline void enable_cache(void)
{
unsigned long cr0;