aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/processor.h')
-rw-r--r--include/asm-x86/processor.h86
1 files changed, 1 insertions, 85 deletions
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
index 72740c6f1109..41c002440de7 100644
--- a/include/asm-x86/processor.h
+++ b/include/asm-x86/processor.h
@@ -20,6 +20,7 @@ struct mm_struct;
20#include <asm/percpu.h> 20#include <asm/percpu.h>
21#include <asm/msr.h> 21#include <asm/msr.h>
22#include <asm/desc_defs.h> 22#include <asm/desc_defs.h>
23#include <asm/nops.h>
23#include <linux/personality.h> 24#include <linux/personality.h>
24#include <linux/cpumask.h> 25#include <linux/cpumask.h>
25#include <linux/cache.h> 26#include <linux/cache.h>
@@ -674,91 +675,6 @@ extern int bootloader_type;
674extern char ignore_fpu_irq; 675extern char ignore_fpu_irq;
675#define cache_line_size() (boot_cpu_data.x86_cache_alignment) 676#define cache_line_size() (boot_cpu_data.x86_cache_alignment)
676 677
677/* generic versions from gas */
678#define GENERIC_NOP1 ".byte 0x90\n"
679#define GENERIC_NOP2 ".byte 0x89,0xf6\n"
680#define GENERIC_NOP3 ".byte 0x8d,0x76,0x00\n"
681#define GENERIC_NOP4 ".byte 0x8d,0x74,0x26,0x00\n"
682#define GENERIC_NOP5 GENERIC_NOP1 GENERIC_NOP4
683#define GENERIC_NOP6 ".byte 0x8d,0xb6,0x00,0x00,0x00,0x00\n"
684#define GENERIC_NOP7 ".byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00\n"
685#define GENERIC_NOP8 GENERIC_NOP1 GENERIC_NOP7
686
687/* Opteron nops */
688#define K8_NOP1 GENERIC_NOP1
689#define K8_NOP2 ".byte 0x66,0x90\n"
690#define K8_NOP3 ".byte 0x66,0x66,0x90\n"
691#define K8_NOP4 ".byte 0x66,0x66,0x66,0x90\n"
692#define K8_NOP5 K8_NOP3 K8_NOP2
693#define K8_NOP6 K8_NOP3 K8_NOP3
694#define K8_NOP7 K8_NOP4 K8_NOP3
695#define K8_NOP8 K8_NOP4 K8_NOP4
696
697/* K7 nops */
698/* uses eax dependencies (arbitary choice) */
699#define K7_NOP1 GENERIC_NOP1
700#define K7_NOP2 ".byte 0x8b,0xc0\n"
701#define K7_NOP3 ".byte 0x8d,0x04,0x20\n"
702#define K7_NOP4 ".byte 0x8d,0x44,0x20,0x00\n"
703#define K7_NOP5 K7_NOP4 ASM_NOP1
704#define K7_NOP6 ".byte 0x8d,0x80,0,0,0,0\n"
705#define K7_NOP7 ".byte 0x8D,0x04,0x05,0,0,0,0\n"
706#define K7_NOP8 K7_NOP7 ASM_NOP1
707
708/* P6 nops */
709/* uses eax dependencies (Intel-recommended choice) */
710#define P6_NOP1 GENERIC_NOP1
711#define P6_NOP2 ".byte 0x66,0x90\n"
712#define P6_NOP3 ".byte 0x0f,0x1f,0x00\n"
713#define P6_NOP4 ".byte 0x0f,0x1f,0x40,0\n"
714#define P6_NOP5 ".byte 0x0f,0x1f,0x44,0x00,0\n"
715#define P6_NOP6 ".byte 0x66,0x0f,0x1f,0x44,0x00,0\n"
716#define P6_NOP7 ".byte 0x0f,0x1f,0x80,0,0,0,0\n"
717#define P6_NOP8 ".byte 0x0f,0x1f,0x84,0x00,0,0,0,0\n"
718
719#ifdef CONFIG_MK7
720#define ASM_NOP1 K7_NOP1
721#define ASM_NOP2 K7_NOP2
722#define ASM_NOP3 K7_NOP3
723#define ASM_NOP4 K7_NOP4
724#define ASM_NOP5 K7_NOP5
725#define ASM_NOP6 K7_NOP6
726#define ASM_NOP7 K7_NOP7
727#define ASM_NOP8 K7_NOP8
728#elif defined(CONFIG_M686) || defined(CONFIG_MPENTIUMII) || \
729 defined(CONFIG_MPENTIUMIII) || defined(CONFIG_MPENTIUMM) || \
730 defined(CONFIG_MCORE2) || defined(CONFIG_PENTIUM4) || \
731 defined(CONFIG_MPSC)
732#define ASM_NOP1 P6_NOP1
733#define ASM_NOP2 P6_NOP2
734#define ASM_NOP3 P6_NOP3
735#define ASM_NOP4 P6_NOP4
736#define ASM_NOP5 P6_NOP5
737#define ASM_NOP6 P6_NOP6
738#define ASM_NOP7 P6_NOP7
739#define ASM_NOP8 P6_NOP8
740#elif defined(CONFIG_MK8) || defined(CONFIG_X86_64)
741#define ASM_NOP1 K8_NOP1
742#define ASM_NOP2 K8_NOP2
743#define ASM_NOP3 K8_NOP3
744#define ASM_NOP4 K8_NOP4
745#define ASM_NOP5 K8_NOP5
746#define ASM_NOP6 K8_NOP6
747#define ASM_NOP7 K8_NOP7
748#define ASM_NOP8 K8_NOP8
749#else
750#define ASM_NOP1 GENERIC_NOP1
751#define ASM_NOP2 GENERIC_NOP2
752#define ASM_NOP3 GENERIC_NOP3
753#define ASM_NOP4 GENERIC_NOP4
754#define ASM_NOP5 GENERIC_NOP5
755#define ASM_NOP6 GENERIC_NOP6
756#define ASM_NOP7 GENERIC_NOP7
757#define ASM_NOP8 GENERIC_NOP8
758#endif
759
760#define ASM_NOP_MAX 8
761
762#define HAVE_ARCH_PICK_MMAP_LAYOUT 1 678#define HAVE_ARCH_PICK_MMAP_LAYOUT 1
763#define ARCH_HAS_PREFETCHW 679#define ARCH_HAS_PREFETCHW
764#define ARCH_HAS_SPINLOCK_PREFETCH 680#define ARCH_HAS_SPINLOCK_PREFETCH