]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Make grub_cpu_is_tsc_supported generally available.
authorVladimir Serbinenko <phcoder@gmail.com>
Fri, 12 Feb 2016 10:38:51 +0000 (11:38 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Fri, 12 Feb 2016 10:38:51 +0000 (11:38 +0100)
grub-core/kern/i386/tsc.c
include/grub/i386/tsc.h

index 82cdea49116b3a7ac4458268695de968b36bb687..2e85289d848946da8260b826ed36114557299278 100644 (file)
@@ -43,22 +43,6 @@ grub_tsc_get_time_ms (void)
   return ((al * grub_tsc_rate) >> 32) + ah * grub_tsc_rate;
 }
 
-static __inline int
-grub_cpu_is_tsc_supported (void)
-{
-#ifndef GRUB_MACHINE_XEN
-  grub_uint32_t a,b,c,d;
-  if (! grub_cpu_is_cpuid_supported ())
-    return 0;
-
-  grub_cpuid(1,a,b,c,d);
-
-  return (d & (1 << 4)) != 0;
-#else
-  return 1;
-#endif
-}
-
 static int
 calibrate_tsc_hardcode (void)
 {
index 71fa7ca2f0235cffa5d39da6084b55cfc4f2a439..a0aa2c573dbd93bd513339e6d4f7bc36d563f21d 100644 (file)
@@ -51,4 +51,20 @@ grub_get_tsc (void)
   return (((grub_uint64_t) hi) << 32) | lo;
 }
 
+static __inline int
+grub_cpu_is_tsc_supported (void)
+{
+#ifndef GRUB_MACHINE_XEN
+  grub_uint32_t a,b,c,d;
+  if (! grub_cpu_is_cpuid_supported ())
+    return 0;
+
+  grub_cpuid(1,a,b,c,d);
+
+  return (d & (1 << 4)) != 0;
+#else
+  return 1;
+#endif
+}
+
 #endif /* ! KERNEL_CPU_TSC_HEADER */