Skip to content
  1. Sep 17, 2015
    • Martin Schwidefsky's avatar
      s390/vtime: correct scaled cputime for SMT · 61cc3790
      Martin Schwidefsky authored
      
      
      The scaled cputime is supposed to be derived from the normal per-thread
      cputime by dividing it with the average thread density in the last interval.
      
      The calculation of the scaling values for the average thread density is
      incorrect. The current, incorrect calculation:
      
          Ci = cycle count with i active threads
          T = unscaled cputime, sT = scaled cputime
          sT = T * (C1 + C2 + ... + Cn) / (1*C1 + 2*C2 + ... + n*Cn)
      
      The calculation happens to yield the correct numbers for the simple cases
      with only one Ci value not zero. But for cases with multiple Ci values not
      zero it fails. E.g. on a SMT-2 system with one thread active half the time
      and two threads active for the other half of the time it fails, the scaling
      factor should be 3/4 but the formula gives 2/3.
      
      The correct formula is
      
          sT = T * (C1/1 + C2/2 + ... + Cn/n) / (C1 + C2 + ... + Cn)
      
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      61cc3790
    • Hendrik Brueckner's avatar
      s390/cpum_cf: Corrected return code for unauthorized counter sets · 58f8e9da
      Hendrik Brueckner authored
      
      
      Previously, the cpum_cf PMU returned -EPERM if a counter is requested and
      the counter set to which the counter belongs is not authorized.  According
      to the perf_event_open() system call manual, an error code of EPERM indicates
      an unsupported exclude setting or CAP_SYS_ADMIN is missing.
      
      Use ENOENT to indicate that particular counters are not available when the
      counter set which contains the counter is not authorized.  For generic events,
      this might trigger a fall back, for example, to a software event.
      
      Signed-off-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      58f8e9da
    • Martin Schwidefsky's avatar
      s390/compat: correct uc_sigmask of the compat signal frame · 8d4bd0ed
      Martin Schwidefsky authored
      
      
      The uc_sigmask in the ucontext structure is an array of words to keep
      the 64 signal bits (or 1024 if you ask glibc but the kernel sigset_t
      only has 64 bits).
      
      For 64 bit the sigset_t contains a single 8 byte word, but for 31 bit
      there are two 4 byte words. The compat signal handler code uses a
      simple copy of the 64 bit sigset_t to the 31 bit compat_sigset_t.
      As s390 is a big-endian architecture this is incorrect, the two words
      in the 31 bit sigset_t array need to be swapped.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: default avatarStefan Liebler <stli@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      8d4bd0ed
    • Heiko Carstens's avatar
      s390: fix floating point register corruption · 9380cf5a
      Heiko Carstens authored
      The critical section cleanup code misses to add the offset of the
      thread_struct to the task address.
      Therefore, if the critical section code gets executed, it may corrupt
      the task struct or restore the contents of the floating point registers
      from the wrong memory location.
      Fixes d0164ee2
      
       "s390/kernel: remove save_fpu_regs() parameter and use
      __LC_CURRENT instead".
      
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Reviewed-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      9380cf5a
    • Martin Schwidefsky's avatar
      s390/hibernate: fix save and restore of vector registers · 88d64253
      Martin Schwidefsky authored
      
      
      The swsusp_arch_suspend()/swsusp_arch_resume() functions currently only
      save and restore the floating point registers. If the task that started
      the hibernation process is using vector registers they can get lost.
      To fix this just call save_fpu_regs in swsusp_arch_suspend(), the restore
      will happen automatically on return to user space.
      
      Reported-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      88d64253
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 72714841
      Linus Torvalds authored
      Pull rdma driver move from Doug Ledford:
       "This is a move only, no functional changes.
      
        I tried to get it in prior to the rc1 release, but we were waiting on
        IBM to get back to us that they were OK with the deprecation and
        eventual removal of this driver.  That OK didn't materialize until
        last week, so integration and testing time pushed us beyond the rc1
        release.
      
        Summary:
      
         - Move ehca driver to staging/rdma and schedule for deletion"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        IB/ehca: Deprecate driver, move to staging, schedule deletion
      72714841
  2. Sep 16, 2015
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.3-rc2' of... · 30255100
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
       "Two patches for the nct6775 driver: add support for NCT6793D, and fix
        swapped registers"
      
      * tag 'hwmon-for-linus-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (nct6775) Add support for NCT6793D
        hwmon: (nct6775) Swap STEP_UP_TIME and STEP_DOWN_TIME registers for most chips
      30255100
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 9efeaaf9
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "This is a first set of pin control fixes for the v4.3 series.  Nothing
        special to say, business as usual.
      
         - Some IS_ERR() fixes from Julia Lawall.  I always wanted the
           compiler to catch these but error pointers by nailing them as an
           err pointer intrinsic type or something seem to be a "no can do".
           In any case, cocinelle is obviously up to the task, better than
           bugs staying around.
      
         - Better error handling for NULL GPIO chips.
      
         - Fix a compile error from the big irq desc refactoring.  I'm
           surprised the fallout wasn't bigger than this"
      
      * tag 'pinctrl-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: samsung: s3c24xx: fix syntax error
        pinctrl: core: Warn about NULL gpio_chip in pinctrl_ready_for_gpio_range()
        pinctrl: join lines that can be a single line within 80 columns
        pinctrl: digicolor: convert null test to IS_ERR test
        pinctrl: qcom: ssbi: convert null test to IS_ERR test
      9efeaaf9
    • Linus Torvalds's avatar
      Merge tag 'gpio-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · d1291ebd
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "This is the first round of GPIO fixes for v4.3.  Quite a lot of
        patches, but the influx of new stuff in the merge window was equally
        big, so I'm not surprised.
      
         - Return value checks and thus nicer errorpath for two drivers.
      
         - Make GPIO_RCAR arch neutral.
      
         - Propagate errors from GPIO chip ->get() vtable call.  It turned out
           these can actually fail sometimes, especially on slowpath
           controllers doing I2C traffic and similar.
      
         - Update documentation to be in sync with the massive changes in the
           v4.3 merge window, phew.
      
         - Handle deferred probe properly in the OMAP driver.
      
         - Get rid of surplus MODULE_ALIAS() from sx150x"
      
      * tag 'gpio-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: omap: Fix GPIO numbering for deferred probe
        Documentation: gpio: Explain that <function>-gpio is also supported
        gpio: omap: Fix gpiochip_add() handling for deferred probe
        gpio: sx150x: Remove unnecessary MODULE_ALIAS()
        Documentation: gpio: board: describe the con_id parameter
        Documentation: gpio: board: add flags parameter to gpiod_get*() functions
        gpio: Propagate errors from chip->get()
        gpio: rcar: GPIO_RCAR doesn't relate to ARM
        gpio: mxs: need to check return value of irq_alloc_generic_chip
        gpio: mxc: need to check return value of irq_alloc_generic_chip
      d1291ebd
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · aa57e0b2
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "This fixes the following issues:
      
         - The selftest overreads the IV test vector.
      
        - Fix potential infinite loop in sunxi-ss driver.
      
         - Fix powerpc build failure when VMX is set without VSX"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: testmgr - don't copy from source IV too much
        crypto: sunxi-ss - Fix a possible driver hang with ciphers
        crypto: vmx - VMX crypto should depend on CONFIG_VSX
      aa57e0b2
    • Tony Luck's avatar
    • David Woodhouse's avatar
      modsign: Fix GPL/OpenSSL licence incompatibility · 09a77a88
      David Woodhouse authored
      
      
      The GPL does not permit us to link against the OpenSSL library. Use
      LGPL for sign-file and extract-file instead.
      
      [ The whole "openssl isn't compatible with gpl" is really just
        fear-mongering, but there's no reason not to make modsign LGPL, so
        nobody cares.  - Linus ]
      
      Reported-by: default avatarJulian Andres Klode <jak@jak-linux.org>
      Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJulian Andres Klode <jak@jak-linux.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      09a77a88
  3. Sep 15, 2015
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · d25ed277
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "A couple build fixes for drivers introduced in the merge window and a
        handful of patches to add more critical clocks on rockchip SoCs that
        are affected by newly introduced gpio clock handling"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: rockchip: Add pclk_peri to critical clocks on RK3066/RK3188
        clk: rockchip: add pclk_cpu to the list of rk3188 critical clocks
        clk: rockchip: handle critical clocks after registering all clocks
        clk: Hi6220: separately build stub clock driver
        clk: h8s2678: Fix compile error
      d25ed277
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · 9c488de2
      Linus Torvalds authored
      Pull CIFS fixes from Steve French:
       "Two small cifs fixes"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
        [CIFS] mount option sec=none not displayed properly in /proc/mounts
        CIFS: fix type confusion in copy offload ioctl
      9c488de2
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 57e6bbcb
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A number of fixes for the merge window, fixing a number of cases
        missed when testing the uaccess code, particularly cases which only
        show up with certain compiler versions"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8431/1: fix alignement of __bug_table section entries
        arm/xen: Enable user access to the kernel before issuing a privcmd call
        ARM: domains: add memory dependencies to get_domain/set_domain
        ARM: domains: thread_info.h no longer needs asm/domains.h
        ARM: uaccess: fix undefined instruction on ARMv7M/noMMU
        ARM: uaccess: remove unneeded uaccess_save_and_disable macro
        ARM: swpan: fix nwfpe for uaccess changes
        ARM: 8429/1: disable GCC SRA optimization
      57e6bbcb
  4. Sep 14, 2015
  5. Sep 13, 2015
    • Guenter Roeck's avatar
      hwmon: (nct6775) Add support for NCT6793D · cd1faefa
      Guenter Roeck authored
      
      
      NCT6793D is register compatible with NCT6792D.
      
      Also move nct6775_sio_names[] closer to enum kinds to simplify
      adding new chips.
      
      Tested-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
      Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      cd1faefa
    • Guenter Roeck's avatar
      hwmon: (nct6775) Swap STEP_UP_TIME and STEP_DOWN_TIME registers for most chips · 728d2940
      Guenter Roeck authored
      
      
      The STEP_UP_TIME and STEP_DOWN_TIME registers are swapped for all chips but
      NCT6775.
      
      Reported-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
      Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
      Cc: stable@vger.kernel.org # v3.10+
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      728d2940
    • Linus Torvalds's avatar
      Linux 4.3-rc1 · 6ff33f39
      Linus Torvalds authored
      6ff33f39
    • Linus Torvalds's avatar
      Merge tag 'cris-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris · 6917b51d
      Linus Torvalds authored
      Pull CRIS updates from Jesper Nilsson:
       "Mostly removal of old cruft of which we can use a generic version, or
        fixes for code not commonly run in the cris port, but also additions
        to enable some good debug"
      
      * tag 'cris-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris: (25 commits)
        CRISv10: delete unused lib/dmacopy.c
        CRISv10: delete unused lib/old_checksum.c
        CRIS: fix switch_mm() lockdep splat
        CRISv32: enable LOCKDEP_SUPPORT
        CRIS: add STACKTRACE_SUPPORT
        CRISv32: annotate irq enable in idle loop
        CRISv32: add support for irqflags tracing
        CRIS: UAPI: use generic types.h
        CRIS: UAPI: use generic shmbuf.h
        CRIS: UAPI: use generic msgbuf.h
        CRIS: UAPI: use generic socket.h
        CRIS: UAPI: use generic sembuf.h
        CRIS: UAPI: use generic sockios.h
        CRIS: UAPI: use generic auxvec.h
        CRIS: UAPI: use generic headers via Kbuild
        CRIS: UAPI: fix elf.h export
        CRIS: don't make asm/elf.h depend on asm/user.h
        CRIS: UAPI: fix ptrace.h
        CRISv32: Squash compile warnings for axisflashmap
        CRISv32: Add GPIO driver to the default configs
        ...
      6917b51d
    • Linus Torvalds's avatar
      blk: rq_data_dir() should not return a boolean · 10fbd36e
      Linus Torvalds authored
      rq_data_dir() returns either READ or WRITE (0 == READ, 1 == WRITE), not
      a boolean value.
      
      Now, admittedly the "!= 0" doesn't really change the value (0 stays as
      zero, 1 stays as one), but it's not only redundant, it confuses gcc, and
      causes gcc to warn about the construct
      
          switch (rq_data_dir(req)) {
              case READ:
                  ...
              case WRITE:
                  ...
      
      that we have in a few drivers.
      
      Now, the gcc warning is silly and stupid (it seems to warn not about the
      switch value having a different type from the case statements, but about
      _any_ boolean switch value), but in this case the code itself is silly
      and stupid too, so let's just change it, and get rid of warnings like
      this:
      
        drivers/block/hd.c: In function ‘hd_request’:
        drivers/block/hd.c:630:11: warning: switch condition has boolean value [-Wswitch-bool]
           switch (rq_data_dir(req)) {
      
      The odd '!= 0' came in when "cmd_flags" got turned into a "u64" in
      commit 5953316d
      
       ("block: make rq->cmd_flags be 64-bit") and is
      presumably because the old code (that just did a logical 'and' with 1)
      would then end up making the type of rq_data_dir() be u64 too.
      
      But if we want to retain the old regular integer type, let's just cast
      the result to 'int' rather than use that rather odd '!= 0'.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      10fbd36e
    • Linus Torvalds's avatar
      Merge branch 'writeback-plugging' · e1df8b0a
      Linus Torvalds authored
      Fix up the writeback plugging introduced in commit d353d758
      ("writeback: plug writeback at a high level") that then caused problems
      due to the unplug happening with a spinlock held.
      
      * writeback-plugging:
        writeback: plug writeback in wb_writeback() and writeback_inodes_wb()
        Revert "writeback: plug writeback at a high level"
      e1df8b0a
    • Linus Torvalds's avatar
      writeback: plug writeback in wb_writeback() and writeback_inodes_wb() · 505a666e
      Linus Torvalds authored
      
      
      We had to revert the pluggin in writeback_sb_inodes() because the
      wb->list_lock is held, but we could easily plug at a higher level before
      taking that lock, and unplug after releasing it.  This does that.
      
      Chris will run performance numbers, just to verify that this approach is
      comparable to the alternative (we could just drop and re-take the lock
      around the blk_finish_plug() rather than these two commits.
      
      I'd have preferred waiting for actual performance numbers before picking
      one approach over the other, but I don't want to release rc1 with the
      known "sleeping function called from invalid context" issue, so I'll
      pick this cleanup version for now.  But if the numbers show that we
      really want to plug just at the writeback_sb_inodes() level, and we
      should just play ugly games with the spinlock, we'll switch to that.
      
      Cc: Chris Mason <clm@fb.com>
      Cc: Josef Bacik <jbacik@fb.com>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      505a666e
  6. Sep 12, 2015
    • Linus Torvalds's avatar
      thermal: fix intel PCH thermal driver mismerge · dfb22fc5
      Linus Torvalds authored
      I didn't notice this when merging the thermal code from Zhang, but his
      merge (commit 5a924a07: "Merge branches 'thermal-core' and
      'thermal-intel' of .git into next") of the thermal-core and
      thermal-intel branches was wrong.
      
      In thermal-core, commit 17e8351a ("thermal: consistently use int for
      temperatures") converted the thermal layer to use "int" for
      temperatures.
      
      But in parallel, in the thermal-intel branch commit d0a12625
      
      
      ("thermal: Add Intel PCH thermal driver") added support for the intel
      PCH thermal sensor using the old interfaces that used "unsigned long"
      pointers.
      
      This resulted in warnings like this:
      
        drivers/thermal/intel_pch_thermal.c:184:14: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
          .get_temp = pch_thermal_get_temp,
                      ^
        drivers/thermal/intel_pch_thermal.c:184:14: note: (near initialization for ‘tzd_ops.get_temp’)
        drivers/thermal/intel_pch_thermal.c:186:19: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
          .get_trip_temp = pch_get_trip_temp,
                           ^
        drivers/thermal/intel_pch_thermal.c:186:19: note: (near initialization for ‘tzd_ops.get_trip_temp’)
      
      This fixes it.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dfb22fc5
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 01b0c014
      Linus Torvalds authored
      Merge fourth patch-bomb from Andrew Morton:
      
       - sys_membarier syscall
      
       - seq_file interface changes
      
       - a few misc fixups
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        revert "ocfs2/dlm: use list_for_each_entry instead of list_for_each"
        mm/early_ioremap: add explicit #include of asm/early_ioremap.h
        fs/seq_file: convert int seq_vprint/seq_printf/etc... returns to void
        selftests: enhance membarrier syscall test
        selftests: add membarrier syscall test
        sys_membarrier(): system-wide memory barrier (generic, x86)
        MODSIGN: fix a compilation warning in extract-cert
      01b0c014
    • Vineet Gupta's avatar
      ARCv2: [axs103_smp] Reduce clk for SMP FPGA configs · 3ebb0540
      Vineet Gupta authored
      
      
      Newer bitfiles needs the reduced clk even for SMP builds
      
      Cc: <stable@vger.kernel.org>  #4.2
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3ebb0540