]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2016 01:48:27 +0000 (18:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2016 01:48:27 +0000 (18:48 -0700)
Pull x86 fpu updates from Ingo Molnar:
 "The main x86 FPU changes in this cycle were:

   - a large series of cleanups, fixes and enhancements to re-enable the
     XSAVES instruction on Intel CPUs - which is the most advanced
     instruction to do FPU context switches (Yu-cheng Yu, Fenghua Yu)

   - Add FPU tracepoints for the FPU state machine (Dave Hansen)"

* 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/fpu: Do not BUG_ON() in early FPU code
  x86/fpu/xstate: Re-enable XSAVES
  x86/fpu/xstate: Fix fpstate_init() for XRSTORS
  x86/fpu/xstate: Return NULL for disabled xstate component address
  x86/fpu/xstate: Fix __fpu_restore_sig() for XSAVES
  x86/fpu/xstate: Fix xstate_offsets, xstate_sizes for non-extended xstates
  x86/fpu/xstate: Fix XSTATE component offset print out
  x86/fpu/xstate: Fix PTRACE frames for XSAVES
  x86/fpu/xstate: Fix supervisor xstate component offset
  x86/fpu/xstate: Align xstate components according to CPUID
  x86/fpu/xstate: Copy xstate registers directly to the signal frame when compacted format is in use
  x86/fpu/xstate: Keep init_fpstate.xsave.header.xfeatures as zero for init optimization
  x86/fpu/xstate: Rename 'xstate_size' to 'fpu_kernel_xstate_size', to distinguish it from 'fpu_user_xstate_size'
  x86/fpu/xstate: Define and use 'fpu_user_xstate_size'
  x86/fpu: Add tracepoints to dump FPU state at key points

1  2 
arch/x86/include/asm/processor.h

index 89314ed74fee3c795585c24630ddcbe83ea7d831,965c5d212c31a652104420c0a6b9e1b1be89ce55..63def9537a2d249f5814cf73fac20f7d8873e232
@@@ -367,14 -367,11 +367,15 @@@ DECLARE_PER_CPU(struct irq_stack *, har
  DECLARE_PER_CPU(struct irq_stack *, softirq_stack);
  #endif        /* X86_64 */
  
- extern unsigned int xstate_size;
+ extern unsigned int fpu_kernel_xstate_size;
+ extern unsigned int fpu_user_xstate_size;
  
  struct perf_event;
  
 +typedef struct {
 +      unsigned long           seg;
 +} mm_segment_t;
 +
  struct thread_struct {
        /* Cached TLS descriptors: */
        struct desc_struct      tls_array[GDT_ENTRY_TLS_ENTRIES];
        /* Max allowed port in the bitmap, in bytes: */
        unsigned                io_bitmap_max;
  
 +      mm_segment_t            addr_limit;
 +
 +      unsigned int            sig_on_uaccess_err:1;
 +      unsigned int            uaccess_err:1;  /* uaccess failed */
 +
        /* Floating point and extended processor state */
        struct fpu              fpu;
        /*
@@@ -499,6 -491,11 +500,6 @@@ static inline void load_sp0(struct tss_
  #define set_iopl_mask native_set_iopl_mask
  #endif /* CONFIG_PARAVIRT */
  
 -typedef struct {
 -      unsigned long           seg;
 -} mm_segment_t;
 -
 -
  /* Free all resources held by a thread. */
  extern void release_thread(struct task_struct *);
  
@@@ -720,7 -717,6 +721,7 @@@ static inline void spin_lock_prefetch(c
        .sp0                    = TOP_OF_INIT_STACK,                      \
        .sysenter_cs            = __KERNEL_CS,                            \
        .io_bitmap_ptr          = NULL,                                   \
 +      .addr_limit             = KERNEL_DS,                              \
  }
  
  extern unsigned long thread_saved_pc(struct task_struct *tsk);
  #define STACK_TOP             TASK_SIZE
  #define STACK_TOP_MAX         TASK_SIZE_MAX
  
 -#define INIT_THREAD  { \
 -      .sp0 = TOP_OF_INIT_STACK \
 +#define INIT_THREAD  {                                                \
 +      .sp0                    = TOP_OF_INIT_STACK,            \
 +      .addr_limit             = KERNEL_DS,                    \
  }
  
  /*