]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 12 Dec 2016 22:20:14 +0000 (14:20 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 12 Dec 2016 22:20:14 +0000 (14:20 -0800)
Pull x86 cleanups from Ingo Molnar:
 "Two cleanups in the LDT handling code, by Dan Carpenter and Thomas
  Gleixner"

* 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/ldt: Make all size computations unsigned
  x86/ldt: Make a size argument unsigned

1  2 
arch/x86/events/core.c

diff --combined arch/x86/events/core.c
index 7fe88bb57e366cbae38a68307e094b3c48ed2e65,55e6c8a397c25b110f32f6daff33baca659c22f0..f1c22584a46f50342d56a642ca83db1504983b0e
@@@ -365,11 -365,7 +365,11 @@@ int x86_add_exclusive(unsigned int what
  {
        int i;
  
 -      if (x86_pmu.lbr_pt_coexist)
 +      /*
 +       * When lbr_pt_coexist we allow PT to coexist with either LBR or BTS.
 +       * LBR and BTS are still mutually exclusive.
 +       */
 +      if (x86_pmu.lbr_pt_coexist && what == x86_lbr_exclusive_pt)
                return 0;
  
        if (!atomic_inc_not_zero(&x86_pmu.lbr_exclusive[what])) {
@@@ -392,7 -388,7 +392,7 @@@ fail_unlock
  
  void x86_del_exclusive(unsigned int what)
  {
 -      if (x86_pmu.lbr_pt_coexist)
 +      if (x86_pmu.lbr_pt_coexist && what == x86_lbr_exclusive_pt)
                return;
  
        atomic_dec(&x86_pmu.lbr_exclusive[what]);
@@@ -2303,7 -2299,7 +2303,7 @@@ valid_user_frame(const void __user *fp
  static unsigned long get_segment_base(unsigned int segment)
  {
        struct desc_struct *desc;
-       int idx = segment >> 3;
+       unsigned int idx = segment >> 3;
  
        if ((segment & SEGMENT_TI_MASK) == SEGMENT_LDT) {
  #ifdef CONFIG_MODIFY_LDT_SYSCALL