]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'x86/urgent' into x86/cpu
authorH. Peter Anvin <hpa@zytor.com>
Thu, 28 Aug 2008 02:17:07 +0000 (19:17 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 28 Aug 2008 02:17:07 +0000 (19:17 -0700)
Conflicts:

arch/x86/kernel/cpu/cyrix.c

1  2 
arch/x86/boot/cpucheck.c
arch/x86/kernel/cpu/cyrix.c
include/asm-x86/cpufeature.h

diff --combined arch/x86/boot/cpucheck.c
index 19b14f7ef9f1c3945845ca9423e00ba2ba5851d8,4b9ae7c567480658ff1e83333a2f8137c887579b..4d3ff037201ffbee0bb468e04d069b02909d094d
  
  #ifdef _SETUP
  # include "boot.h"
- # include "bitops.h"
  #endif
  #include <linux/types.h>
- #include <asm/cpufeature.h>
  #include <asm/processor-flags.h>
  #include <asm/required-features.h>
  #include <asm/msr-index.h>
  
- struct cpu_features {
-       int level;              /* Family, or 64 for x86-64 */
-       int model;
-       u32 flags[NCAPINTS];
- };
- static struct cpu_features cpu;
+ struct cpu_features cpu;
  static u32 cpu_vendor[3];
  static u32 err_flags[NCAPINTS];
  
@@@ -46,12 -38,12 +38,12 @@@ static const u32 req_flags[NCAPINTS] 
  {
        REQUIRED_MASK0,
        REQUIRED_MASK1,
 -      REQUIRED_MASK2,
 -      REQUIRED_MASK3,
 +      0, /* REQUIRED_MASK2 not implemented in this file */
 +      0, /* REQUIRED_MASK3 not implemented in this file */
        REQUIRED_MASK4,
 -      REQUIRED_MASK5,
 +      0, /* REQUIRED_MASK5 not implemented in this file */
        REQUIRED_MASK6,
 -      REQUIRED_MASK7,
 +      0, /* REQUIRED_MASK7 not implemented in this file */
  };
  
  #define A32(a, b, c, d) (((d) << 24)+((c) << 16)+((b) << 8)+(a))
index db5868cd24431d592bd0ac1b3922947c98841511,e710a21bb6e8dc0dd9d83a7bd49df69135cbcf7b..ada50505a5c85c153a3c005cda94400078ad1ed2
@@@ -116,7 -116,7 +116,7 @@@ static void __cpuinit set_cx86_reorder(
        setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
  
        /* Load/Store Serialize to mem access disable (=reorder it) */
 -      setCx86(CX86_PCR0, getCx86(CX86_PCR0) & ~0x80);
 +      setCx86_old(CX86_PCR0, getCx86_old(CX86_PCR0) & ~0x80);
        /* set load/store serialize from 1GB to 4GB */
        ccr3 |= 0xe0;
        setCx86(CX86_CCR3, ccr3);
@@@ -127,30 -127,13 +127,13 @@@ static void __cpuinit set_cx86_memwb(vo
        printk(KERN_INFO "Enable Memory-Write-back mode on Cyrix/NSC processor.\n");
  
        /* CCR2 bit 2: unlock NW bit */
 -      setCx86(CX86_CCR2, getCx86(CX86_CCR2) & ~0x04);
 +      setCx86_old(CX86_CCR2, getCx86_old(CX86_CCR2) & ~0x04);
        /* set 'Not Write-through' */
        write_cr0(read_cr0() | X86_CR0_NW);
        /* CCR2 bit 2: lock NW bit and set WT1 */
 -      setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14);
 +      setCx86_old(CX86_CCR2, getCx86_old(CX86_CCR2) | 0x14);
  }
  
- static void __cpuinit set_cx86_inc(void)
- {
-       unsigned char ccr3;
-       printk(KERN_INFO "Enable Incrementor on Cyrix/NSC processor.\n");
-       ccr3 = getCx86(CX86_CCR3);
-       setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
-       /* PCR1 -- Performance Control */
-       /* Incrementor on, whatever that is */
-       setCx86_old(CX86_PCR1, getCx86_old(CX86_PCR1) | 0x02);
-       /* PCR0 -- Performance Control */
-       /* Incrementor Margin 10 */
-       setCx86_old(CX86_PCR0, getCx86_old(CX86_PCR0) | 0x04);
-       setCx86(CX86_CCR3, ccr3);       /* disable MAPEN */
- }
  /*
   *    Configure later MediaGX and/or Geode processor.
   */
@@@ -162,19 -145,18 +145,18 @@@ static void __cpuinit geode_configure(v
        local_irq_save(flags);
  
        /* Suspend on halt power saving and enable #SUSP pin */
 -      setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
 +      setCx86_old(CX86_CCR2, getCx86_old(CX86_CCR2) | 0x88);
  
        ccr3 = getCx86(CX86_CCR3);
        setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10);       /* enable MAPEN */
  
  
        /* FPU fast, DTE cache, Mem bypass */
 -      setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x38);
 +      setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x38);
        setCx86(CX86_CCR3, ccr3);                       /* disable MAPEN */
  
        set_cx86_memwb();
        set_cx86_reorder();
-       set_cx86_inc();
  
        local_irq_restore(flags);
  }
@@@ -286,7 -268,7 +268,7 @@@ static void __cpuinit init_cyrix(struc
                /* GXm supports extended cpuid levels 'ala' AMD */
                if (c->cpuid_level == 2) {
                        /* Enable cxMMX extensions (GX1 Datasheet 54) */
 -                      setCx86(CX86_CCR7, getCx86(CX86_CCR7) | 1);
 +                      setCx86_old(CX86_CCR7, getCx86_old(CX86_CCR7) | 1);
  
                        /*
                         * GXm : 0x30 ... 0x5f GXm  datasheet 51
                if (dir1 > 7) {
                        dir0_msn++;  /* M II */
                        /* Enable MMX extensions (App note 108) */
 -                      setCx86(CX86_CCR7, getCx86(CX86_CCR7)|1);
 +                      setCx86_old(CX86_CCR7, getCx86_old(CX86_CCR7)|1);
                } else {
                        c->coma_bug = 1;      /* 6x86MX, it has the bug. */
                }
@@@ -424,7 -406,7 +406,7 @@@ static void __cpuinit cyrix_identify(st
                        local_irq_save(flags);
                        ccr3 = getCx86(CX86_CCR3);
                        setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10);       /* enable MAPEN  */
 -                      setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x80);  /* enable cpuid  */
 +                      setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80);  /* enable cpuid  */
                        setCx86(CX86_CCR3, ccr3);                       /* disable MAPEN */
                        local_irq_restore(flags);
                }
index be8b2ad5d411addee3e436ad0043800ef2d37515,762f6a6bc707cedfcabc15db59a2977a54decab2..9489283a4bcfbc6bbb4f9e8fd5c25dbb8ed547f8
  #define X86_FEATURE_UP                (3*32+ 9) /* smp kernel running on up */
  #define X86_FEATURE_FXSAVE_LEAK (3*32+10) /* FXSAVE leaks FOP/FIP/FOP */
  #define X86_FEATURE_ARCH_PERFMON (3*32+11) /* Intel Architectural PerfMon */
 -#define X86_FEATURE_PEBS      (3*32+12)  /* Precise-Event Based Sampling */
 -#define X86_FEATURE_BTS               (3*32+13)  /* Branch Trace Store */
 -#define X86_FEATURE_SYSCALL32 (3*32+14)  /* syscall in ia32 userspace */
 -#define X86_FEATURE_SYSENTER32        (3*32+15)  /* sysenter in ia32 userspace */
 +#define X86_FEATURE_PEBS      (3*32+12) /* Precise-Event Based Sampling */
 +#define X86_FEATURE_BTS               (3*32+13) /* Branch Trace Store */
 +#define X86_FEATURE_SYSCALL32 (3*32+14) /* syscall in ia32 userspace */
 +#define X86_FEATURE_SYSENTER32        (3*32+15) /* sysenter in ia32 userspace */
  #define X86_FEATURE_REP_GOOD  (3*32+16) /* rep microcode works well on this CPU */
  #define X86_FEATURE_MFENCE_RDTSC (3*32+17) /* Mfence synchronizes RDTSC */
  #define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */
 -#define X86_FEATURE_11AP      (3*32+19)  /* Bad local APIC aka 11AP */
 +#define X86_FEATURE_11AP      (3*32+19) /* Bad local APIC aka 11AP */
 +#define X86_FEATURE_NOPL      (3*32+20) /* The NOPL (0F 1F) instructions */
  
  /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
  #define X86_FEATURE_XMM3      (4*32+ 0) /* Streaming SIMD Extensions-3 */
@@@ -92,6 -91,7 +92,7 @@@
  #define X86_FEATURE_CX16      (4*32+13) /* CMPXCHG16B */
  #define X86_FEATURE_XTPR      (4*32+14) /* Send Task Priority Messages */
  #define X86_FEATURE_DCA               (4*32+18) /* Direct Cache Access */
+ #define X86_FEATURE_XMM4_2    (4*32+20) /* Streaming SIMD Extensions-4.2 */
  
  /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
  #define X86_FEATURE_XSTORE    (5*32+ 2) /* on-CPU RNG present (xstore insn) */
@@@ -190,6 -190,7 +191,7 @@@ extern const char * const x86_power_fla
  #define cpu_has_gbpages               boot_cpu_has(X86_FEATURE_GBPAGES)
  #define cpu_has_arch_perfmon  boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
  #define cpu_has_pat           boot_cpu_has(X86_FEATURE_PAT)
+ #define cpu_has_xmm4_2                boot_cpu_has(X86_FEATURE_XMM4_2)
  
  #if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
  # define cpu_has_invlpg               1