Linux 3.8-rc6
[deliverable/linux.git] / arch / x86 / include / asm / processor.h
index ad1fc85116743d677ff5b050e7226c2988a5e559..888184b2fc85c7987a63d365e9bfd1d334eb9372 100644 (file)
@@ -178,8 +178,6 @@ static inline int hlt_works(int cpu)
 
 extern void cpu_detect(struct cpuinfo_x86 *c);
 
-extern struct pt_regs *idle_regs(struct pt_regs *);
-
 extern void early_cpu_init(void);
 extern void identify_boot_cpu(void);
 extern void identify_secondary_cpu(struct cpuinfo_x86 *);
@@ -187,7 +185,7 @@ extern void print_cpu_info(struct cpuinfo_x86 *);
 void print_cpu_msr(struct cpuinfo_x86 *);
 extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c);
 extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c);
-extern unsigned short num_cache_leaves;
+extern void init_amd_cacheinfo(struct cpuinfo_x86 *c);
 
 extern void detect_extended_topology(struct cpuinfo_x86 *c);
 extern void detect_ht(struct cpuinfo_x86 *c);
@@ -672,18 +670,29 @@ static inline void sync_core(void)
 {
        int tmp;
 
-#if defined(CONFIG_M386) || defined(CONFIG_M486)
-       if (boot_cpu_data.x86 < 5)
-               /* There is no speculative execution.
-                * jmp is a barrier to prefetching. */
-               asm volatile("jmp 1f\n1:\n" ::: "memory");
-       else
+#ifdef CONFIG_M486
+       /*
+        * Do a CPUID if available, otherwise do a jump.  The jump
+        * can conveniently enough be the jump around CPUID.
+        */
+       asm volatile("cmpl %2,%1\n\t"
+                    "jl 1f\n\t"
+                    "cpuid\n"
+                    "1:"
+                    : "=a" (tmp)
+                    : "rm" (boot_cpu_data.cpuid_level), "ri" (0), "0" (1)
+                    : "ebx", "ecx", "edx", "memory");
+#else
+       /*
+        * CPUID is a barrier to speculative execution.
+        * Prefetched instructions are automatically
+        * invalidated when modified.
+        */
+       asm volatile("cpuid"
+                    : "=a" (tmp)
+                    : "0" (1)
+                    : "ebx", "ecx", "edx", "memory");
 #endif
-               /* cpuid is a barrier to speculative execution.
-                * Prefetched instructions are automatically
-                * invalidated when modified. */
-               asm volatile("cpuid" : "=a" (tmp) : "0" (1)
-                            : "ebx", "ecx", "edx", "memory");
 }
 
 static inline void __monitor(const void *eax, unsigned long ecx,
This page took 0.025731 seconds and 5 git commands to generate.