]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-x86/processor_64.h
libertas: make some more functions static
[linux-2.6-omap-h63xx.git] / include / asm-x86 / processor_64.h
index 31f579b828f232de4789f515b3aa5c1d633e46a1..e4f19970a82b8bd9ac6de525dccbe8b662c7d3ab 100644 (file)
@@ -74,6 +74,7 @@ struct cpuinfo_x86 {
        __u8    booted_cores;   /* number of cores as seen by OS */
        __u8    phys_proc_id;   /* Physical Processor id. */
        __u8    cpu_core_id;    /* Core id. */
+       __u8    cpu_index;      /* index into per_cpu list */
 #endif
 } ____cacheline_aligned;
 
@@ -88,11 +89,12 @@ struct cpuinfo_x86 {
 #define X86_VENDOR_UNKNOWN 0xff
 
 #ifdef CONFIG_SMP
-extern struct cpuinfo_x86 cpu_data[];
-#define current_cpu_data cpu_data[smp_processor_id()]
+DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
+#define cpu_data(cpu)          per_cpu(cpu_info, cpu)
+#define current_cpu_data       cpu_data(smp_processor_id())
 #else
-#define cpu_data (&boot_cpu_data)
-#define current_cpu_data boot_cpu_data
+#define cpu_data(cpu)          boot_cpu_data
+#define current_cpu_data       boot_cpu_data
 #endif
 
 extern char ignore_irq13;
@@ -334,6 +336,16 @@ struct extended_sigtable {
 };
 
 
+#if defined(CONFIG_MPSC) || defined(CONFIG_MCORE2)
+#define ASM_NOP1 P6_NOP1
+#define ASM_NOP2 P6_NOP2
+#define ASM_NOP3 P6_NOP3
+#define ASM_NOP4 P6_NOP4
+#define ASM_NOP5 P6_NOP5
+#define ASM_NOP6 P6_NOP6
+#define ASM_NOP7 P6_NOP7
+#define ASM_NOP8 P6_NOP8
+#else
 #define ASM_NOP1 K8_NOP1
 #define ASM_NOP2 K8_NOP2
 #define ASM_NOP3 K8_NOP3
@@ -342,6 +354,7 @@ struct extended_sigtable {
 #define ASM_NOP6 K8_NOP6
 #define ASM_NOP7 K8_NOP7
 #define ASM_NOP8 K8_NOP8
+#endif
 
 /* Opteron nops */
 #define K8_NOP1 ".byte 0x90\n"
@@ -353,6 +366,17 @@ struct extended_sigtable {
 #define K8_NOP7        K8_NOP4 K8_NOP3
 #define K8_NOP8        K8_NOP4 K8_NOP4
 
+/* P6 nops */
+/* uses eax dependencies (Intel-recommended choice) */
+#define P6_NOP1        ".byte 0x90\n"
+#define P6_NOP2        ".byte 0x66,0x90\n"
+#define P6_NOP3        ".byte 0x0f,0x1f,0x00\n"
+#define P6_NOP4        ".byte 0x0f,0x1f,0x40,0\n"
+#define P6_NOP5        ".byte 0x0f,0x1f,0x44,0x00,0\n"
+#define P6_NOP6        ".byte 0x66,0x0f,0x1f,0x44,0x00,0\n"
+#define P6_NOP7        ".byte 0x0f,0x1f,0x80,0,0,0,0\n"
+#define P6_NOP8        ".byte 0x0f,0x1f,0x84,0x00,0,0,0,0\n"
+
 #define ASM_NOP_MAX 8
 
 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
@@ -368,12 +392,6 @@ static inline void sync_core(void)
        asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory");
 } 
 
-#define ARCH_HAS_PREFETCH
-static inline void prefetch(void *x) 
-{ 
-       asm volatile("prefetcht0 (%0)" :: "r" (x));
-} 
-
 #define ARCH_HAS_PREFETCHW 1
 static inline void prefetchw(void *x) 
 { 
@@ -389,11 +407,6 @@ static inline void prefetchw(void *x)
 
 #define cpu_relax()   rep_nop()
 
-static inline void serialize_cpu(void)
-{
-       __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
-}
-
 static inline void __monitor(const void *eax, unsigned long ecx,
                unsigned long edx)
 {