Merge commit 'v2.6.27-rc6' into x86/unify-cpu-detect
authorIngo Molnar <mingo@elte.hu>
Wed, 10 Sep 2008 12:00:45 +0000 (14:00 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 10 Sep 2008 12:00:45 +0000 (14:00 +0200)
Conflicts:
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/common_64.c
arch/x86/kernel/cpu/feature_names.c
include/asm-x86/cpufeature.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
1  2 
arch/x86/Kconfig.cpu
arch/x86/kernel/e820.c
arch/x86/xen/enlighten.c

diff --combined arch/x86/Kconfig.cpu
@@@ -382,14 -382,17 +382,17 @@@ config X86_OOSTOR
  # P6_NOPs are a relatively minor optimization that require a family >=
  # 6 processor, except that it is broken on certain VIA chips.
  # Furthermore, AMD chips prefer a totally different sequence of NOPs
- # (which work on all CPUs).  As a result, disallow these if we're
- # compiling X86_GENERIC but not X86_64 (these NOPs do work on all
- # x86-64 capable chips); the list of processors in the right-hand clause
- # are the cores that benefit from this optimization.
+ # (which work on all CPUs).  In addition, it looks like Virtual PC
+ # does not understand them.
+ #
+ # As a result, disallow these if we're not compiling for X86_64 (these
+ # NOPs do work on all x86-64 capable chips); the list of processors in
+ # the right-hand clause are the cores that benefit from this optimization.
  #
  config X86_P6_NOP
        def_bool y
-       depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || MPENTIUM4 || MPSC)
+       depends on X86_64
+       depends on (MCORE2 || MPENTIUM4 || MPSC)
  
  config X86_TSC
        def_bool y
@@@ -415,75 -418,3 +418,75 @@@ config X86_MINIMUM_CPU_FAMIL
  config X86_DEBUGCTLMSR
        def_bool y
        depends on !(MK6 || MWINCHIPC6 || MWINCHIP2 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386)
 +
 +menuconfig PROCESSOR_SELECT
 +      default y
 +      bool "Supported processor vendors" if EMBEDDED
 +      help
 +        This lets you choose what x86 vendor support code your kernel
 +        will include.
 +
 +config CPU_SUP_INTEL
 +      default y
 +      bool "Support Intel processors" if PROCESSOR_SELECT
 +      help
 +        This enables extended support for Intel processors
 +
 +config CPU_SUP_CYRIX_32
 +      default y
 +      bool "Support Cyrix processors" if PROCESSOR_SELECT
 +      depends on !64BIT
 +      help
 +        This enables extended support for Cyrix processors
 +
 +config CPU_SUP_AMD
 +      default y
 +      bool "Support AMD processors" if PROCESSOR_SELECT
 +      help
 +        This enables extended support for AMD processors
 +
 +config CPU_SUP_CENTAUR_32
 +      default y
 +      bool "Support Centaur processors" if PROCESSOR_SELECT
 +      depends on !64BIT
 +      help
 +        This enables extended support for Centaur processors
 +
 +config CPU_SUP_CENTAUR_64
 +      default y
 +      bool "Support Centaur processors" if PROCESSOR_SELECT
 +      depends on 64BIT
 +      help
 +        This enables extended support for Centaur processors
 +
 +config CPU_SUP_TRANSMETA_32
 +      default y
 +      bool "Support Transmeta processors" if PROCESSOR_SELECT
 +      depends on !64BIT
 +      help
 +        This enables extended support for Transmeta processors
 +
 +config CPU_SUP_UMC_32
 +      default y
 +      bool "Support UMC processors" if PROCESSOR_SELECT
 +      depends on !64BIT
 +      help
 +        This enables extended support for UMC processors
 +
 +config X86_DS
 +      bool "Debug Store support"
 +      default y
 +      help
 +        Add support for Debug Store.
 +        This allows the kernel to provide a memory buffer to the hardware
 +        to store various profiling and tracing events.
 +
 +config X86_PTRACE_BTS
 +      bool "ptrace interface to Branch Trace Store"
 +      default y
 +      depends on (X86_DS && X86_DEBUGCTLMSR)
 +      help
 +        Add a ptrace interface to allow collecting an execution trace
 +        of the traced task.
 +        This collects control flow changes in a (cyclic) buffer and allows
 +        debuggers to fill in the gaps and show an execution trace of the debuggee.
diff --combined arch/x86/kernel/e820.c
@@@ -148,9 -148,6 +148,9 @@@ void __init e820_print_map(char *who
                case E820_NVS:
                        printk(KERN_CONT "(ACPI NVS)\n");
                        break;
 +              case E820_UNUSABLE:
 +                      printk("(unusable)\n");
 +                      break;
                default:
                        printk(KERN_CONT "type %u\n", e820.map[i].type);
                        break;
@@@ -1206,7 -1203,7 +1206,7 @@@ static int __init parse_memmap_opt(cha
        if (!p)
                return -EINVAL;
  
-       if (!strcmp(p, "exactmap")) {
+       if (!strncmp(p, "exactmap", 8)) {
  #ifdef CONFIG_CRASH_DUMP
                /*
                 * If we are doing a crash dump, we still need to know
@@@ -1263,7 -1260,6 +1263,7 @@@ static inline const char *e820_type_to_
        case E820_RAM:  return "System RAM";
        case E820_ACPI: return "ACPI Tables";
        case E820_NVS:  return "ACPI Non-volatile Storage";
 +      case E820_UNUSABLE:     return "Unusable memory";
        default:        return "reserved";
        }
  }
  /*
   * Mark e820 reserved areas as busy for the resource manager.
   */
 +static struct resource __initdata *e820_res;
  void __init e820_reserve_resources(void)
  {
        int i;
        u64 end;
  
        res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map);
 +      e820_res = res;
        for (i = 0; i < e820.nr_map; i++) {
                end = e820.map[i].addr + e820.map[i].size - 1;
  #ifndef CONFIG_RESOURCES_64BIT
                res->end = end;
  
                res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 -              insert_resource(&iomem_resource, res);
 +
 +              /*
 +               * don't register the region that could be conflicted with
 +               * pci device BAR resource and insert them later in
 +               * pcibios_resource_survey()
 +               */
 +              if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20))
 +                      insert_resource(&iomem_resource, res);
                res++;
        }
  
        }
  }
  
 +void __init e820_reserve_resources_late(void)
 +{
 +      int i;
 +      struct resource *res;
 +
 +      res = e820_res;
 +      for (i = 0; i < e820.nr_map; i++) {
 +              if (!res->parent && res->end)
 +                      reserve_region_with_split(&iomem_resource, res->start, res->end, res->name);
 +              res++;
 +      }
 +}
 +
  char *__init default_machine_specific_memory_setup(void)
  {
        char *who = "BIOS-e820";
diff --combined arch/x86/xen/enlighten.c
@@@ -36,7 -36,6 +36,7 @@@
  #include <xen/hvc-console.h>
  
  #include <asm/paravirt.h>
 +#include <asm/apic.h>
  #include <asm/page.h>
  #include <asm/xen/hypercall.h>
  #include <asm/xen/hypervisor.h>
@@@ -581,47 -580,16 +581,47 @@@ static void xen_io_delay(void
  }
  
  #ifdef CONFIG_X86_LOCAL_APIC
 -static u32 xen_apic_read(unsigned long reg)
 +static u32 xen_apic_read(u32 reg)
  {
        return 0;
  }
  
 -static void xen_apic_write(unsigned long reg, u32 val)
 +static void xen_apic_write(u32 reg, u32 val)
  {
        /* Warn to see if there's any stray references */
        WARN_ON(1);
  }
 +
 +static u64 xen_apic_icr_read(void)
 +{
 +      return 0;
 +}
 +
 +static void xen_apic_icr_write(u32 low, u32 id)
 +{
 +      /* Warn to see if there's any stray references */
 +      WARN_ON(1);
 +}
 +
 +static void xen_apic_wait_icr_idle(void)
 +{
 +        return;
 +}
 +
 +static u32 xen_safe_apic_wait_icr_idle(void)
 +{
 +        return 0;
 +}
 +
 +static struct apic_ops xen_basic_apic_ops = {
 +      .read = xen_apic_read,
 +      .write = xen_apic_write,
 +      .icr_read = xen_apic_icr_read,
 +      .icr_write = xen_apic_icr_write,
 +      .wait_icr_idle = xen_apic_wait_icr_idle,
 +      .safe_wait_icr_idle = xen_safe_apic_wait_icr_idle,
 +};
 +
  #endif
  
  static void xen_flush_tlb(void)
@@@ -1305,6 -1273,8 +1305,6 @@@ static const struct pv_irq_ops xen_irq_
  
  static const struct pv_apic_ops xen_apic_ops __initdata = {
  #ifdef CONFIG_X86_LOCAL_APIC
 -      .apic_write = xen_apic_write,
 -      .apic_read = xen_apic_read,
        .setup_boot_clock = paravirt_nop,
        .setup_secondary_clock = paravirt_nop,
        .startup_ipi_hook = paravirt_nop,
@@@ -1354,7 -1324,7 +1354,7 @@@ static const struct pv_mmu_ops xen_mmu_
        .ptep_modify_prot_commit = __ptep_modify_prot_commit,
  
        .pte_val = xen_pte_val,
-       .pte_flags = native_pte_val,
+       .pte_flags = native_pte_flags,
        .pgd_val = xen_pgd_val,
  
        .make_pte = xen_make_pte,
@@@ -1707,13 -1677,6 +1707,13 @@@ asmlinkage void __init xen_start_kernel
        pv_apic_ops = xen_apic_ops;
        pv_mmu_ops = xen_mmu_ops;
  
 +#ifdef CONFIG_X86_LOCAL_APIC
 +      /*
 +       * set up the basic apic ops.
 +       */
 +      apic_ops = &xen_basic_apic_ops;
 +#endif
 +
        if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) {
                pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start;
                pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit;