Sorry for this for second time. Now compile tested for both cases ;)
authorRudolf Marek <r.marek@assembler.cz>
Sun, 16 May 2010 22:32:58 +0000 (22:32 +0000)
committerRudolf Marek <r.marek@assembler.cz>
Sun, 16 May 2010 22:32:58 +0000 (22:32 +0000)
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

src/include/cpu/x86/cache.h

index 858637cf2bd27d6580fdce0f45f9177496bc1e4e..ae61b55b3dbea6704293c5bf015c28aa09b79a55 100644 (file)
@@ -23,8 +23,6 @@
 /* the memory clobber prevents the GCC from reordering the read/write order
    of CR0 */
 
- */
-
 #if defined(__GNUC__)
 
 /*
@@ -46,6 +44,11 @@ static inline void write_cr0(unsigned long cr0)
        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)
@@ -60,19 +63,18 @@ static inline void write_cr0(unsigned long cr0)
        asm volatile ("movl %0, %%cr0" : : "r" (cr0));
 }
 
-#endif
+static inline void wbinvd(void)
+{
+       asm volatile ("wbinvd");
+}
 
+#endif
 
 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;