fio: Eliminate compilation warning in ppc
[fio.git] / arch / arch-ppc.h
index 0cc0cbda7d69890e10ff41816d836b4189684963..d4a080c4e91f31050404cab8c61b6d23bbe7f371 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef ARCH_PPC_H
-#define ARCH_PPH_H
+#define ARCH_PPC_H
 
 #include <unistd.h>
 #include <stdlib.h>
@@ -72,9 +72,9 @@ static inline unsigned long long get_cpu_clock(void)
                        tbl = mfspr(SPRN_ATBL);
                        tbu1 = mfspr(SPRN_ATBU);
                } else {
-                       __asm__ __volatile__("mftbu %0" : "=r"(tbu0));
-                       __asm__ __volatile__("mftb %0"  : "=r"(tbl) );
-                       __asm__ __volatile__("mftbu %0" : "=r"(tbu1));
+                       tbu0 = mfspr(SPRN_TBRU);
+                       tbl = mfspr(SPRN_TBRL);
+                       tbu1 = mfspr(SPRN_TBRU);
                }
        } while (tbu0 != tbu1);
 
@@ -82,6 +82,7 @@ static inline unsigned long long get_cpu_clock(void)
        return ret;
 }
 
+#if 0
 static void atb_child(void)
 {
        arch_flags |= ARCH_FLAG_1;
@@ -106,18 +107,27 @@ static void atb_clocktest(void)
                        arch_flags |= ARCH_FLAG_1;
        }
 }
+#endif
 
 #define ARCH_HAVE_INIT
 extern int tsc_reliable;
 
 static inline int arch_init(char *envp[])
 {
+#if 0
        tsc_reliable = 1;
        atb_clocktest();
+#endif
        return 0;
 }
 
 #define ARCH_HAVE_FFZ
-#define ARCH_HAVE_CPU_CLOCK
+
+/*
+ * We don't have it on all platforms, lets comment this out until we
+ * can handle it more intelligently.
+ *
+ * #define ARCH_HAVE_CPU_CLOCK
+ */
 
 #endif