]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 16 May 2016 22:15:17 +0000 (15:15 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 16 May 2016 22:15:17 +0000 (15:15 -0700)
Pull x86 asm updates from Ingo Molnar:
 "The main changes in this cycle were:

   - MSR access API fixes and enhancements (Andy Lutomirski)

   - early exception handling improvements (Andy Lutomirski)

   - user-space FS/GS prctl usage fixes and improvements (Andy
     Lutomirski)

   - Remove the cpu_has_*() APIs and replace them with equivalents
     (Borislav Petkov)

   - task switch micro-optimization (Brian Gerst)

   - 32-bit entry code simplification (Denys Vlasenko)

   - enhance PAT handling in enumated CPUs (Toshi Kani)

  ... and lots of other cleanups/fixlets"

* 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits)
  x86/arch_prctl/64: Restore accidentally removed put_cpu() in ARCH_SET_GS
  x86/entry/32: Remove asmlinkage_protect()
  x86/entry/32: Remove GET_THREAD_INFO() from entry code
  x86/entry, sched/x86: Don't save/restore EFLAGS on task switch
  x86/asm/entry/32: Simplify pushes of zeroed pt_regs->REGs
  selftests/x86/ldt_gdt: Test set_thread_area() deletion of an active segment
  x86/tls: Synchronize segment registers in set_thread_area()
  x86/asm/64: Rename thread_struct's fs and gs to fsbase and gsbase
  x86/arch_prctl/64: Remove FSBASE/GSBASE < 4G optimization
  x86/segments/64: When load_gs_index fails, clear the base
  x86/segments/64: When loadsegment(fs, ...) fails, clear the base
  x86/asm: Make asm/alternative.h safe from assembly
  x86/asm: Stop depending on ptrace.h in alternative.h
  x86/entry: Rename is_{ia32,x32}_task() to in_{ia32,x32}_syscall()
  x86/asm: Make sure verify_cpu() has a good stack
  x86/extable: Add a comment about early exception handlers
  x86/msr: Set the return value to zero when native_rdmsr_safe() fails
  x86/paravirt: Make "unsafe" MSR accesses unsafe even if PARAVIRT=y
  x86/paravirt: Add paravirt_{read,write}_msr()
  x86/msr: Carry on after a non-"safe" MSR access fails
  ...

12 files changed:
1  2 
arch/x86/events/core.c
arch/x86/events/intel/uncore.c
arch/x86/include/asm/cpufeature.h
arch/x86/include/asm/cpufeatures.h
arch/x86/include/asm/uaccess.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/signal.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/uprobes.c
arch/x86/kvm/mmu.c
arch/x86/mm/pageattr.c

Simple merge
index 17734a6ef474c8e9090181ec4ffbcee4f11e538f,3f6d8b5672d5c6cbf497946d4e04ae1854e93db1..16c1789164122b70f6d2cd4ad16ae18b741236aa
@@@ -1299,108 -1376,14 +1299,108 @@@ static int __init uncore_cpumask_init(b
        return 0;
  }
  
 +#define X86_UNCORE_MODEL_MATCH(model, init)   \
 +      { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long)&init }
 +
 +struct intel_uncore_init_fun {
 +      void    (*cpu_init)(void);
 +      int     (*pci_init)(void);
 +};
 +
 +static const struct intel_uncore_init_fun nhm_uncore_init __initconst = {
 +      .cpu_init = nhm_uncore_cpu_init,
 +};
 +
 +static const struct intel_uncore_init_fun snb_uncore_init __initconst = {
 +      .cpu_init = snb_uncore_cpu_init,
 +      .pci_init = snb_uncore_pci_init,
 +};
 +
 +static const struct intel_uncore_init_fun ivb_uncore_init __initconst = {
 +      .cpu_init = snb_uncore_cpu_init,
 +      .pci_init = ivb_uncore_pci_init,
 +};
 +
 +static const struct intel_uncore_init_fun hsw_uncore_init __initconst = {
 +      .cpu_init = snb_uncore_cpu_init,
 +      .pci_init = hsw_uncore_pci_init,
 +};
 +
 +static const struct intel_uncore_init_fun bdw_uncore_init __initconst = {
 +      .cpu_init = snb_uncore_cpu_init,
 +      .pci_init = bdw_uncore_pci_init,
 +};
 +
 +static const struct intel_uncore_init_fun snbep_uncore_init __initconst = {
 +      .cpu_init = snbep_uncore_cpu_init,
 +      .pci_init = snbep_uncore_pci_init,
 +};
 +
 +static const struct intel_uncore_init_fun nhmex_uncore_init __initconst = {
 +      .cpu_init = nhmex_uncore_cpu_init,
 +};
 +
 +static const struct intel_uncore_init_fun ivbep_uncore_init __initconst = {
 +      .cpu_init = ivbep_uncore_cpu_init,
 +      .pci_init = ivbep_uncore_pci_init,
 +};
 +
 +static const struct intel_uncore_init_fun hswep_uncore_init __initconst = {
 +      .cpu_init = hswep_uncore_cpu_init,
 +      .pci_init = hswep_uncore_pci_init,
 +};
 +
 +static const struct intel_uncore_init_fun bdx_uncore_init __initconst = {
 +      .cpu_init = bdx_uncore_cpu_init,
 +      .pci_init = bdx_uncore_pci_init,
 +};
 +
 +static const struct intel_uncore_init_fun knl_uncore_init __initconst = {
 +      .cpu_init = knl_uncore_cpu_init,
 +      .pci_init = knl_uncore_pci_init,
 +};
 +
 +static const struct intel_uncore_init_fun skl_uncore_init __initconst = {
 +      .pci_init = skl_uncore_pci_init,
 +};
 +
 +static const struct x86_cpu_id intel_uncore_match[] __initconst = {
 +      X86_UNCORE_MODEL_MATCH(26, nhm_uncore_init),    /* Nehalem */
 +      X86_UNCORE_MODEL_MATCH(30, nhm_uncore_init),
 +      X86_UNCORE_MODEL_MATCH(37, nhm_uncore_init),    /* Westmere */
 +      X86_UNCORE_MODEL_MATCH(44, nhm_uncore_init),
 +      X86_UNCORE_MODEL_MATCH(42, snb_uncore_init),    /* Sandy Bridge */
 +      X86_UNCORE_MODEL_MATCH(58, ivb_uncore_init),    /* Ivy Bridge */
 +      X86_UNCORE_MODEL_MATCH(60, hsw_uncore_init),    /* Haswell */
 +      X86_UNCORE_MODEL_MATCH(69, hsw_uncore_init),    /* Haswell Celeron */
 +      X86_UNCORE_MODEL_MATCH(70, hsw_uncore_init),    /* Haswell */
 +      X86_UNCORE_MODEL_MATCH(61, bdw_uncore_init),    /* Broadwell */
 +      X86_UNCORE_MODEL_MATCH(71, bdw_uncore_init),    /* Broadwell */
 +      X86_UNCORE_MODEL_MATCH(45, snbep_uncore_init),  /* Sandy Bridge-EP */
 +      X86_UNCORE_MODEL_MATCH(46, nhmex_uncore_init),  /* Nehalem-EX */
 +      X86_UNCORE_MODEL_MATCH(47, nhmex_uncore_init),  /* Westmere-EX aka. Xeon E7 */
 +      X86_UNCORE_MODEL_MATCH(62, ivbep_uncore_init),  /* Ivy Bridge-EP */
 +      X86_UNCORE_MODEL_MATCH(63, hswep_uncore_init),  /* Haswell-EP */
 +      X86_UNCORE_MODEL_MATCH(79, bdx_uncore_init),    /* BDX-EP */
 +      X86_UNCORE_MODEL_MATCH(86, bdx_uncore_init),    /* BDX-DE */
 +      X86_UNCORE_MODEL_MATCH(87, knl_uncore_init),    /* Knights Landing */
 +      X86_UNCORE_MODEL_MATCH(94, skl_uncore_init),    /* SkyLake */
 +      {},
 +};
 +
 +MODULE_DEVICE_TABLE(x86cpu, intel_uncore_match);
 +
  static int __init intel_uncore_init(void)
  {
 -      int pret, cret, ret;
 +      const struct x86_cpu_id *id;
 +      struct intel_uncore_init_fun *uncore_init;
 +      int pret = 0, cret = 0, ret;
  
 -      if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
 +      id = x86_match_cpu(intel_uncore_match);
 +      if (!id)
                return -ENODEV;
  
-       if (cpu_has_hypervisor)
+       if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
                return -ENODEV;
  
        max_packages = topology_max_packages();
Simple merge
Simple merge
index 2e7513d1f1f45eb3bb7ec4ebe459aec2fa76b46d,d794fd1f582f127d07fb3c03a2c705496520af3d..12f9653bde8d968c3374e6f13a2fbc2abacccda0
@@@ -108,17 -108,9 +108,17 @@@ struct exception_table_entry 
  
  #define ARCH_HAS_RELATIVE_EXTABLE
  
 +#define swap_ex_entry_fixup(a, b, tmp, delta)                 \
 +      do {                                                    \
 +              (a)->fixup = (b)->fixup + (delta);              \
 +              (b)->fixup = (tmp).fixup - (delta);             \
 +              (a)->handler = (b)->handler + (delta);          \
 +              (b)->handler = (tmp).handler - (delta);         \
 +      } while (0)
 +
  extern int fixup_exception(struct pt_regs *regs, int trapnr);
  extern bool ex_has_fault_handler(unsigned long ip);
- extern int early_fixup_exception(unsigned long *ip);
+ extern void early_fixup_exception(struct pt_regs *regs, int trapnr);
  
  /*
   * These are the main single-value transfer routines.  They automatically
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge