1. 16 Jul, 2013 1 commit
    • H. Peter Anvin's avatar
      x86, bitops: Change bitops to be native operand size · 9b710506
      H. Peter Anvin authored
      Change the bitops operation to be naturally "long", i.e. 63 bits on
      the 64-bit kernel.  Additional bugs are likely to crop up in the
      future.
      
      We already have bugs which machines with > 16 TiB of memory in a
      single node, as can happen if memory is interleaved.  The x86 bitop
      operations take a signed index, so using an unsigned type is not an
      option.
      
      Jim Kukunas measured the effect of this patch on kernel size: it adds
      2779 bytes to the allyesconfig kernel.  Some of that probably could be
      elided by replacing the inline functions with macros which select the
      32-bit type if the index is a 32-bit value, something like:
      
      In that case we could also use "Jr" constraints for the 64-bit
      version.
      
      However, this would more than double the amount of code for a
      relatively small gain.
      
      Note that we can't use ilog2() for _BITOPS_LONG_SHIFT, as that causes
      a recursive header inclusion problem.
      
      The change to constant_test_bit() should both generate better code and
      give correct result for negative bit indicies.  As previously written
      the compiler had to generate extra code to create the proper wrong
      result for negative values.
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Cc: Jim Kukunas <james.t.kukunas@intel.com>
      Link: http://lkml.kernel.org/n/tip-z61ofiwe90xeyb461o72h8ya@git.kernel.org
      9b710506
  2. 28 Jun, 2013 1 commit
    • Wedson Almeida Filho's avatar
      x86: Use asm-goto to implement mutex fast path on x86-64 · 00e55a79
      Wedson Almeida Filho authored
      The new implementation allows the compiler to better optimize the code; the
      original implementation is still used when the kernel is compiled with older
      versions of gcc that don't support asm-goto.
      
      Compiling with gcc 4.7.3, the original mutex_lock() is 60 bytes with the fast
      path taking 16 instructions; the new mutex_lock() is 42 bytes, with the fast
      path taking 12 instructions.
      
      The original mutex_unlock() is 24 bytes with the fast path taking 7
      instructions; the new mutex_unlock() is 25 bytes (because the compiler used
      a 2-byte ret) with the fast path taking 4 instructions.
      
      The two versions of the functions are included below for reference.
      
      Old:
      ffffffff817742a0 <mutex_lock>:
      ffffffff817742a0:       55                      push   %rbp
      ffffffff817742a1:       48 89 e5                mov    %rsp,%rbp
      ffffffff817742a4:       48 83 ec 10             sub    $0x10,%rsp
      ffffffff817742a8:       48 89 5d f0             mov    %rbx,-0x10(%rbp)
      ffffffff817742ac:       48 89 fb                mov    %rdi,%rbx
      ffffffff817742af:       4c 89 65 f8             mov    %r12,-0x8(%rbp)
      ffffffff817742b3:       e8 28 15 00 00          callq  ffffffff817757e0 <_cond_resched>
      ffffffff817742b8:       48 89 df                mov    %rbx,%rdi
      ffffffff817742bb:       f0 ff 0f                lock decl (%rdi)
      ffffffff817742be:       79 05                   jns    ffffffff817742c5 <mutex_lock+0x25>
      ffffffff817742c0:       e8 cb 04 00 00          callq  ffffffff81774790 <__mutex_lock_slowpath>
      ffffffff817742c5:       65 48 8b 04 25 c0 b7    mov    %gs:0xb7c0,%rax
      ffffffff817742cc:       00 00
      ffffffff817742ce:       4c 8b 65 f8             mov    -0x8(%rbp),%r12
      ffffffff817742d2:       48 89 43 18             mov    %rax,0x18(%rbx)
      ffffffff817742d6:       48 8b 5d f0             mov    -0x10(%rbp),%rbx
      ffffffff817742da:       c9                      leaveq
      ffffffff817742db:       c3                      retq
      
      ffffffff81774250 <mutex_unlock>:
      ffffffff81774250:       55                      push   %rbp
      ffffffff81774251:       48 c7 47 18 00 00 00    movq   $0x0,0x18(%rdi)
      ffffffff81774258:       00
      ffffffff81774259:       48 89 e5                mov    %rsp,%rbp
      ffffffff8177425c:       f0 ff 07                lock incl (%rdi)
      ffffffff8177425f:       7f 05                   jg     ffffffff81774266 <mutex_unlock+0x16>
      ffffffff81774261:       e8 ea 04 00 00          callq  ffffffff81774750 <__mutex_unlock_slowpath>
      ffffffff81774266:       5d                      pop    %rbp
      ffffffff81774267:       c3                      retq
      
      New:
      ffffffff81774920 <mutex_lock>:
      ffffffff81774920:       55                      push   %rbp
      ffffffff81774921:       48 89 e5                mov    %rsp,%rbp
      ffffffff81774924:       53                      push   %rbx
      ffffffff81774925:       48 89 fb                mov    %rdi,%rbx
      ffffffff81774928:       e8 a3 0e 00 00          callq  ffffffff817757d0 <_cond_resched>
      ffffffff8177492d:       f0 ff 0b                lock decl (%rbx)
      ffffffff81774930:       79 08                   jns    ffffffff8177493a <mutex_lock+0x1a>
      ffffffff81774932:       48 89 df                mov    %rbx,%rdi
      ffffffff81774935:       e8 16 fe ff ff          callq  ffffffff81774750 <__mutex_lock_slowpath>
      ffffffff8177493a:       65 48 8b 04 25 c0 b7    mov    %gs:0xb7c0,%rax
      ffffffff81774941:       00 00
      ffffffff81774943:       48 89 43 18             mov    %rax,0x18(%rbx)
      ffffffff81774947:       5b                      pop    %rbx
      ffffffff81774948:       5d                      pop    %rbp
      ffffffff81774949:       c3                      retq
      
      ffffffff81774730 <mutex_unlock>:
      ffffffff81774730:       48 c7 47 18 00 00 00    movq   $0x0,0x18(%rdi)
      ffffffff81774737:       00
      ffffffff81774738:       f0 ff 07                lock incl (%rdi)
      ffffffff8177473b:       7f 0a                   jg     ffffffff81774747 <mutex_unlock+0x17>
      ffffffff8177473d:       55                      push   %rbp
      ffffffff8177473e:       48 89 e5                mov    %rsp,%rbp
      ffffffff81774741:       e8 aa ff ff ff          callq  ffffffff817746f0 <__mutex_unlock_slowpath>
      ffffffff81774746:       5d                      pop    %rbp
      ffffffff81774747:       f3 c3                   repz retq
      Signed-off-by: default avatarWedson Almeida Filho <wedsonaf@gmail.com>
      Link: http://lkml.kernel.org/r/1372420245-60021-1-git-send-email-wedsonaf@gmail.comSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      00e55a79
  3. 25 Jun, 2013 5 commits
  4. 19 Jun, 2013 1 commit
  5. 31 May, 2013 1 commit
  6. 30 May, 2013 5 commits
  7. 29 May, 2013 3 commits
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-fixes-v3.10-3' of... · 7b55eab8
      Linus Torvalds authored
      Merge tag 'pinctrl-fixes-v3.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
      
      Pull pin-control fixes from Linus Walleij:
       - Six patches fixing up the suspend/resume and wakeup handling of the
         Samsung and Exynos drivers.
       - Errorpath fixes for four different drivers.  All on the probe()
         errorpath.
       - Make the debugfs code for pin config take the right mutex.
      
      * tag 'pinctrl-fixes-v3.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: pinconf: take the right mutex
        pinctrl: sunxi: fix error return code in sunxi_pinctrl_probe()
        pinctrl: exynos: Handle suspend/resume of GPIO EINT registers
        pinctrl: samsung: Allow per-bank SoC-specific private data
        pinctrl: samsung: Add support for SoC-specific suspend/resume callbacks
        pinctrl: Don't override the error code in probe error handling
        ARM: EXYNOS: Fix EINT wake-up mask configuration when pinctrl is used
        pinctrl: exynos: Add support for set_irq_wake of wake-up EINTs
        pinctrl: samsung: fix suspend/resume functionality
      7b55eab8
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · c4763215
      Linus Torvalds authored
      Pull ARM Exynos fixes from Olof Johansson:
       "Here's a shorter set of fixes for 3.10, all for Samsung Exynos
        platforms.
      
        It also includes a defconfig update so that exynos_defconfig provides
        a meaningful set of drivers to boot an unmodified kernel on the
        Samsung ARM-based Chromebooks."
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: exynos: defconfig update
        ARM: SAMSUNG: Add names to fimd0 IRQ resources
        ARM: EXYNOS: fix software reset logic for EXYNOS5440 SOC
        ARM: EXYNOS: Fix support of Exynos4210 rev0 SoC
        ARM: dts: Enabling samsung-usb2phy driver for exynos5250
      c4763215
    • Olof Johansson's avatar
      ARM: exynos: defconfig update · da9d0fbf
      Olof Johansson authored
      This turns on a number of configs that are useful on the Chromebook, but also
      good to have on in general:
      
      * USB host and MMC drivers(!)
      * I2C GPIO arbitration driver
      * CYAPA trackpad driver
      * simplefb
      * CROS EC and keyboard drivers
      * S5M8767 driver
      * MAX77686 drivers
      * MAX8997 driver
      * DEVTMPFS + mount
      * DM_CRYPT (as module)
      * CRYPTOLOOP
      * HIGHMEM
      * PRINTK timestamps
      
      This also turns off DEBUG_LL, and switches the hardcoded Samsung lowlevel
      uart to uart 3 (which is only used to show the "uncompressing kernel"
      message at boot, it seems).
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      Reviewed-by: default avatarDoug Anderson <dianders@chromium.org>
      Tested-by: default avatarTushar Behera <tushar.behera@linaro.org>
      Acked-by: default avatarKukjin Kim <kgene.kim@samsung.com>
      da9d0fbf
  8. 28 May, 2013 11 commits
  9. 27 May, 2013 10 commits
  10. 26 May, 2013 2 commits
    • Linus Torvalds's avatar
      Linux 3.10-rc3 · e4aa937e
      Linus Torvalds authored
      e4aa937e
    • Manfred Spraul's avatar
      ipc/sem.c: Fix missing wakeups in do_smart_update_queue() · ab465df9
      Manfred Spraul authored
      do_smart_update_queue() is called when an operation (semop,
      semctl(SETVAL), semctl(SETALL), ...) modified the array.  It must check
      which of the sleeping tasks can proceed.
      
      do_smart_update_queue() missed a few wakeups:
       - if a sleeping complex op was completed, then all per-semaphore queues
         must be scanned - not only those that were modified by *sops
       - if a sleeping simple op proceeded, then the global queue must be
         scanned again
      
      And:
       - the test for "|sops == NULL) before scanning the global queue is not
         required: If the global queue is empty, then it doesn't need to be
         scanned - regardless of the reason for calling do_smart_update_queue()
      
      The patch is not optimized, i.e.  even completing a wait-for-zero
      operation causes a rescan.  This is done to keep the patch as simple as
      possible.
      Signed-off-by: default avatarManfred Spraul <manfred@colorfullife.com>
      Acked-by: default avatarDavidlohr Bueso <davidlohr.bueso@hp.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ab465df9