1. 16 Dec, 2015 15 commits
    • Ryo Kodama's avatar
      pwm: rcar: Improve accuracy of frequency division setting · 72c16a9f
      Ryo Kodama authored
      From: Ryo Kodama <ryo.kodama.vz@renesas.com>
      
      When period_ns is set to the same value of RCAR_PWM_MAX_CYCLE in
      rcar_pwm_get_clock_division(), this function should allow such value
      for improving accuracy of frequency division setting.
      Signed-off-by: default avatarRyo Kodama <ryo.kodama.vz@renesas.com>
      Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      72c16a9f
    • Vladimir Zapolskiy's avatar
      pwm: lpc32xx: return ERANGE, if requested period is not supported · d6dbdf0d
      Vladimir Zapolskiy authored
      Instead of silent acceptance of unsupported requested configuration
      for PWM period and setting the boundary supported value, return
      -ERANGE to a caller.
      
      Duty period value equal to 0 or period is still accepted to allow
      configuration by PWM sysfs interface, when it is set to 0 by default.
      
      For reference this is a list of restrictions on period_ns == 1/freq:
      
        | PWM parent clock | parent clock divisor | max freq | min freq |
        +------------------+----------------------+----------+----------+
        |   HCLK == 13 MHz |      1 (min)         | 50.7 KHz | 198.3 Hz |
        |   HCLK == 13 MHz |     15 (max)         | 3.38 KHz | 13.22 Hz |
        |  RTC == 32.7 KHz |      1 (min)         |   128 Hz |   0.5 Hz |
        |  RTC == 32.7 KHz |     15 (max)         | 8.533 Hz | 0.033 Hz |
      
      Note that PWM sysfs interface does not support setting of period more
      than NSEC_PER_SEC / MAX_INT32 ~ 2 seconds, however this PWM controller
      supports a period up to 30 seconds.
      Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      d6dbdf0d
    • Vladimir Zapolskiy's avatar
      pwm: lpc32xx: fix and simplify duty cycle and period calculations · 5a9fc9c6
      Vladimir Zapolskiy authored
      The change fixes a problem, if duty_ns is too small in comparison
      to period_ns (as a valid corner case duty_ns is 0 ns), then due to
      PWM_DUTY() macro applied on a value the result is overflowed over 8
      bits, and instead of the highest bitfield duty cycle value 0xff the
      invalid duty cycle bitfield value 0x00 is written.
      
      For reference the LPC32xx spec defines PWMx_DUTY bitfield description
      is this way and it seems to be correct:
      
       [Low]/[High] = [PWM_DUTY]/[256-PWM_DUTY], where 0 < PWM_DUTY <= 255.
      
      In addition according to my oscilloscope measurements LPC32xx PWM is
      "tristate" in sense that it produces a wave with floating min/max
      voltage levels for different duty cycle values, for corner cases:
      
        PWM_DUTY == 0x01 => signal is in range from -1.05v to 0v
        ....
        PWM_DUTY == 0x80 => signal is in range from -0.75v to +0.75v
        ....
        PWM_DUTY == 0xff => signal is in range from 0v to +1.05v
      
        PWM_DUTY == 0x00 => signal is around 0v, PWM is off
      
      Due to this peculiarity on very long period ranges (less than 1KHz)
      and odd pre-divider values PWM generated wave does not remind a
      clock shape signal, but rather a heartbit shape signal with positive
      and negative peaks, so I would recommend to use high-speed HCLK clock
      as a PWM parent clock and avoid using RTC clock as a parent.
      
      The change corrects PWM output in corner cases and prevents any
      possible overflows in calculation of values for PWM_DUTY and
      PWM_RELOADV bitfields, thus helper macro definitions may be removed.
      Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      5a9fc9c6
    • Vladimir Zapolskiy's avatar
      pwm: lpc32xx: make device usable with common clock framework · 82aff048
      Vladimir Zapolskiy authored
      As a preparatory change for switching LPC32xx mach support to common
      clock framework fix clk_enable/clk_disable calls without matching
      clk_prepare/clk_unprepare.
      
      The driver can not be used on a platform with common clock framework
      until clk_prepare/clk_unprepare calls are added, otherwise clk_enable
      calls will fail and a WARN is generated:
      
          # echo 1 > /sys/bus/platform/drivers/lpc32xx-pwm/4005c000.pwm/pwm/pwmchip0/pwm0/enable
          ------------[ cut here ]------------
          WARNING: CPU: 0 PID: 701 at drivers/clk/clk.c:727 clk_core_enable+0x2c/0xa4()
          Modules linked in: sc16is7xx
          CPU: 0 PID: 701 Comm: sh Tainted: G        W       4.3.0-rc2+ #171
          Hardware name: LPC32XX SoC (Flattened Device Tree)
          Backtrace:
          [<>] (dump_backtrace) from [<>] (show_stack+0x18/0x1c)
          [<>] (show_stack) from [<>] (dump_stack+0x20/0x28)
          [<>] (dump_stack) from [<>] (warn_slowpath_common+0x90/0xb8)
          [<>] (warn_slowpath_common) from [<>] (warn_slowpath_null+0x24/0x2c)
          [<>] (warn_slowpath_null) from [<>] (clk_core_enable+0x2c/0xa4)
          [<>] (clk_core_enable) from [<>] (clk_enable+0x24/0x38)
          [<>] (clk_enable) from [<>] (lpc32xx_pwm_enable+0x1c/0x40)
          [<>] (lpc32xx_pwm_enable) from [<>] (pwm_enable+0x48/0x5c)
          [<>] (pwm_enable) from [<>] (pwm_enable_store+0x5c/0x78)
          [<>] (pwm_enable_store) from [<>] (dev_attr_store+0x20/0x2c)
          [<>] (dev_attr_store) from [<>] (sysfs_kf_write+0x44/0x50)
          [<>] (sysfs_kf_write) from [<>] (kernfs_fop_write+0x134/0x194)
          [<>] (kernfs_fop_write) from [<>] (__vfs_write+0x34/0xdc)
          [<>] (__vfs_write) from [<>] (vfs_write+0xb8/0x140)
          [<>] (vfs_write) from [<>] (SyS_write+0x50/0x90)
          [<>] (SyS_write) from [<>] (ret_fast_syscall+0x0/0x38)
      Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      82aff048
    • Vladimir Zapolskiy's avatar
      pwm: lpc32xx: correct number of PWM channels from 2 to 1 · ebe1fca3
      Vladimir Zapolskiy authored
      LPC32xx SoC has two independent PWM controllers, they have different
      clock parents, clock gates and even slightly different controls, and
      each of these two PWM controllers has one output channel. Due to
      almost similar controls arranged in a row it is incorrectly set that
      there is one PWM controller with two channels, fix this problem, which
      at the moment prevents separate configuration of different clock
      parents and gates for both PWM controllers.
      
      The change makes previous PWM device node description incompatible
      with this update.
      Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      ebe1fca3
    • Vladimir Zapolskiy's avatar
      dt: lpc32xx: pwm: update documentation of LPC32xx PWM device · 5795980a
      Vladimir Zapolskiy authored
      NXP LPC32xx SoC has two separate PWM controller devices, update device
      tree binding documentation to reflect this fact.
      
      The change makes previous PWM device node description incompatible
      with the new version.
      Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      5795980a
    • Vladimir Zapolskiy's avatar
      dt: lpc32xx: pwm: correct LPC32xx PWM device node example · c0cc25cc
      Vladimir Zapolskiy authored
      The change removes '0x' from a device node address and uses lower case
      hex chars.
      Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      c0cc25cc
    • Stefan Agner's avatar
      pwm: fsl-ftm: Fix clock enable/disable when using PM · 816aec23
      Stefan Agner authored
      A FTM PWM instance enables/disables three clocks: The bus clock, the
      counter clock and the PWM clock. The bus clock gets enabled on
      pwm_request, whereas the counter and PWM clocks will be enabled upon
      pwm_enable.
      
      The driver has three closesly related issues when enabling/disabling
      clocks during suspend/resume:
      - The three clocks are not treated differently in regards to the
        individual PWM state enabled/requested. This can lead to clocks
        getting disabled which have not been enabled in the first place
        (a PWM channel which only has been requested going through
        suspend/resume).
      
      - When entering suspend, the current behavior relies on the
        FTM_OUTMASK register: If a PWM output is unmasked, the driver
        assumes the clocks are enabled. However, some PWM instances
        have only 2 channels connected (e.g. Vybrid's FTM1). In that case,
        the FTM_OUTMASK reads 0x3 if all channels are disabled, even if
        the code wrote 0xff to it before. For those PWM instances, the
        current approach to detect enabled PWM signals does not work.
      
      - A third issue applies to the bus clock only, which can get enabled
        multiple times (once for each PWM channel of a PWM chip). This is
        fine, however when entering suspend mode, the clock only gets
        disabled once.
      
      This change introduces a different approach by relying on the enable
      and prepared counters of the clock framework and using the frameworks
      PWM signal states to address all three issues.
      
      Clocks get disabled during suspend and back enabled on resume
      regarding to the PWM channels individual state (requested/enabled).
      
      Since we do not count the clock enables in the driver, this change no
      longer clears the Status and Control registers Clock Source Selection
      (FTM_SC[CLKS]). However, since we disable the selected clock anyway,
      and we explicitly select the clock source on reenabling a PWM channel
      this approach should not make a difference in practice.
      Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      816aec23
    • Mika Westerberg's avatar
      pwm: lpss: Rework the sequence of programming PWM_SW_UPDATE · 37670676
      Mika Westerberg authored
      Setting of PWM_SW_UPDATE is bit different in Intel Broxton compared to the
      previous generation SoCs. Previously it was OK to set the bit many times
      (from userspace via sysfs for example) before the PWM is actually enabled.
      
      Starting from Intel Broxton it seems that we must set PWM_SW_UPDATE only
      once before the PWM is enabled. Otherwise it is possible that the PWM does
      not start properly.
      
      Change the sequence of how PWM_SW_UPDATE is programmed so that we only set
      it in pwm_lpss_config() when the PWM is already enabled. The initial
      setting of PWM_SW_UPDATE will be done when PWM gets enabled. This should
      make the driver work with the previous generation Intel SoCs and Broxton.
      
      Add also small delay after the bit is set to let the hardware propagate it
      properly.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      37670676
    • Andy Shevchenko's avatar
      pwm: lpss: Select core part automatically · 6f90a00c
      Andy Shevchenko authored
      We have two users of core part right now. Let them to select core part
      automatically.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      6f90a00c
    • qipeng.zha's avatar
      pwm: lpss: Update PWM setting for Broxton · 883e4d07
      qipeng.zha authored
      For Broxton PWM controller, base unit is defined as 8-bit integer
      and 14-bit fraction, so need to update base unit setting to output
      wave with right frequency.
      Signed-off-by: default avatarQipeng Zha <qipeng.zha@intel.com>
      Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      883e4d07
    • Stefan Wahren's avatar
    • Stefan Wahren's avatar
      pwm: bcm2835: Prevent division by zero · fd13c144
      Stefan Wahren authored
      It's possible that the PWM clock becomes an orphan. So better check the
      result of clk_get_rate() in order to prevent a division by zero.
      Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      fd13c144
    • Stefan Wahren's avatar
      pwm: bcm2835: Calculate scaler in ->config() · ebe88b6a
      Stefan Wahren authored
      Currently pwm-bcm2835 assumes a fixed clock rate and stores the
      resulting scaler in the driver structure. But with the upcoming
      PWM clock support for clk-bcm2835 the rate could change, so
      calculate the scaler in the ->config() callback.
      Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      ebe88b6a
    • Mika Westerberg's avatar
      pwm: lpss: Remove ->free() callback · c7b91b33
      Mika Westerberg authored
      The LPSS PWM driver calls pwm_lpss_disable() when the PWM device is
      released (for example unexported from sysfs). This in turn calls
      pm_runtime_put() which makes runtime PM count to be unbalanced if the
      device has not been enabled at this point.
      
      This is easy to reproduce:
      
        # cd /sys/class/pwm/pwmchip0
        # echo 0 > export
        # echo 0 > unexport
      
      The count is unbalanced and prevents the PWM device from being powered on
      next time.
      
      Fix this by removing ->free() callback. There are no resources to be
      released anyway.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      c7b91b33
  2. 16 Nov, 2015 1 commit
  3. 15 Nov, 2015 6 commits
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0ca9b676
      Linus Torvalds authored
      Pull perf updates from Thomas Gleixner:
       "Mostly updates to the perf tool plus two fixes to the kernel core code:
      
         - Handle tracepoint filters correctly for inherited events (Peter
           Zijlstra)
      
         - Prevent a deadlock in perf_lock_task_context (Paul McKenney)
      
         - Add missing newlines to some pr_err() calls (Arnaldo Carvalho de
           Melo)
      
         - Print full source file paths when using 'perf annotate --print-line
           --full-paths' (Michael Petlan)
      
         - Fix 'perf probe -d' when just one out of uprobes and kprobes is
           enabled (Wang Nan)
      
         - Add compiler.h to list.h to fix 'make perf-tar-src-pkg' generated
           tarballs, i.e. out of tree building (Arnaldo Carvalho de Melo)
      
         - Add the llvm-src-base.c and llvm-src-kbuild.c files, generated by
           the 'perf test' LLVM entries, when running it in-tree, to
           .gitignore (Yunlong Song)
      
         - libbpf error reporting improvements, using a strerror interface to
           more precisely tell the user about problems with the provided
           scriptlet, be it in C or as a ready made object file (Wang Nan)
      
         - Do not be case sensitive when searching for matching 'perf test'
           entries (Arnaldo Carvalho de Melo)
      
         - Inform the user about objdump failures in 'perf annotate' (Andi
           Kleen)
      
         - Improve the LLVM 'perf test' entry, introduce a new ones for BPF
           and kbuild tests to check the environment used by clang to compile
           .c scriptlets (Wang Nan)"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits)
        perf/x86/intel/rapl: Remove the unused RAPL_EVENT_DESC() macro
        tools include: Add compiler.h to list.h
        perf probe: Verify parameters in two functions
        perf session: Add missing newlines to some pr_err() calls
        perf annotate: Support full source file paths for srcline fix
        perf test: Add llvm-src-base.c and llvm-src-kbuild.c to .gitignore
        perf: Fix inherited events vs. tracepoint filters
        perf: Disable IRQs across RCU RS CS that acquires scheduler lock
        perf test: Do not be case sensitive when searching for matching tests
        perf test: Add 'perf test BPF'
        perf test: Enhance the LLVM tests: add kbuild test
        perf test: Enhance the LLVM test: update basic BPF test program
        perf bpf: Improve BPF related error messages
        perf tools: Make fetch_kernel_version() publicly available
        bpf tools: Add new API bpf_object__get_kversion()
        bpf tools: Improve libbpf error reporting
        perf probe: Cleanup find_perf_probe_point_from_map to reduce redundancy
        perf annotate: Inform the user about objdump failures in --stdio
        perf stat: Make stat options global
        perf sched latency: Fix thread pid reuse issue
        ...
      0ca9b676
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 051b29f2
      Linus Torvalds authored
      Pull scheduler fix from Thomas Gleixner:
       "A single fix to prevent math underflow in the numa balancing code"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/numa: Fix math underflow in task_tick_numa()
      051b29f2
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8f98e292
      Linus Torvalds authored
      Pull liblockdep fixes from Thomas Gleixner:
       "Three small patches to synchronize liblockdep with the latest core
        changes"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tools/liblockdep: explicitly declare lockdep API we call from liblockdep
        tools/liblockdep: add userspace versions of WRITE_ONCE and RCU_INIT_POINTER
        tools/liblockdep: remove task argument from debug_check_no_locks_held
      8f98e292
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bba072df
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A couple of fixes and updates related to x86:
      
         - Fix the W+X check regression on XEN
      
         - The real fix for the low identity map trainwreck
      
         - Probe legacy PIC early instead of unconditionally allocating legacy
           irqs
      
         - Add cpu verification to long mode entry
      
         - Adjust the cache topology to AMD Fam17H systems
      
         - Let Merrifield use the TSC across S3"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Call verify_cpu() after having entered long mode too
        x86/setup: Fix low identity map for >= 2GB kernel range
        x86/mm: Skip the hypervisor range when walking PGD
        x86/AMD: Fix last level cache topology for AMD Fam17h systems
        x86/irq: Probe for PIC presence before allocating descs for legacy IRQs
        x86/cpu/intel: Enable X86_FEATURE_NONSTOP_TSC_S3 for Merrifield
      bba072df
    • Linus Torvalds's avatar
      Merge branches 'irq-urgent-for-linus' and 'timers-urgent-for-linus' of... · 511601bd
      Linus Torvalds authored
      Merge branches 'irq-urgent-for-linus' and 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull irq and timer fixes from Thomas Gleixner:
      
       - An irq regression fix to restore the wakeup behaviour of chained
         interrupts.
      
       - A timer fix for a long standing race versus timers scheduled on a
         target cpu which got exposed by recent changes in the workqueue
         implementation.
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq/PM: Restore system wake up from chained interrupts
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        timers: Use proper base migration in add_timer_on()
      511601bd
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · b84da9fa
      Linus Torvalds authored
      Pull MIPS updates from Ralf Baechle:
       "These are the highlists of the main MIPS pull request for 4.4:
      
         - Add latencytop support
         - Support appended DTBs
         - VDSO support and initially use it for gettimeofday.
         - Drop the .MIPS.abiflags and ELF NOTE sections from vmlinux
         - Support for the 5KE, an internal test core.
         - Switch all MIPS platfroms to libata drivers.
         - Improved support, cleanups for ralink and Lantiq platforms.
         - Support for the new xilfpga platform.
         - A number of DTB improvments for BMIPS.
         - Improved support for CM and CPS.
         - Minor JZ4740 and BCM47xx enhancements"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (120 commits)
        MIPS: idle: add case for CPU_5KE
        MIPS: Octeon: Support APPENDED_DTB
        MIPS: vmlinux: create a section for appended DTB
        MIPS: Clean up compat_siginfo_t
        MIPS: Fix PAGE_MASK definition
        MIPS: BMIPS: Enable GZIP ramdisk and timed printks
        MIPS: Add xilfpga defconfig
        MIPS: xilfpga: Add mipsfpga platform code
        MIPS: xilfpga: Add xilfpga device tree files.
        dt-bindings: MIPS: Document xilfpga bindings and boot style
        MIPS: Make MIPS_CMDLINE_DTB default
        MIPS: Make the kernel arguments from dtb available
        MIPS: Use USE_OF as the guard for appended dtb
        MIPS: BCM63XX: Use pr_* instead of printk
        MIPS: Loongson: Cleanup CONFIG_LOONGSON_SUSPEND.
        MIPS: lantiq: Disable xbar fpi burst mode
        MIPS: lantiq: Force the crossbar to big endian
        MIPS: lantiq: Initialize the USB core on boot
        MIPS: lantiq: Return correct value for fpi clock on ar9
        MIPS: ralink: Add missing clock on rt305x
        ...
      b84da9fa
  4. 14 Nov, 2015 18 commits
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 12b76f3b
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Here are a collection of small fixes tha have been gathered for
        4.4-rc1.  The only significant changes are those in PCI drivers
        Kconfig, to use "depends on" instead of "select" for CONFIG_ZONE_DMA.
        A reverse select is often more user-friendly, but in this case, it
        makes hard to manage with the conflict with ZONE_DEVICE, so changed in
        such a way for now.
      
        Others are all small fixes and quirks: an error check in soundcore
        reigster_chrdev(), HD-audio HDMI/DP phantom jack fix, Intel Broxton DP
        quirk, USB-audio DSD device quirk, some constifications, etc"
      
      * tag 'sound-fix-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: pci: depend on ZONE_DMA
        ALSA: hda - Simplify phantom jack handling for HDMI/DP
        ALSA: hda/hdmi - apply Skylake fix-ups to Broxton display codec
        ALSA: ctxfi: constify rsc ops structures
        ALSA: usb: Add native DSD support for Aune X1S
        ALSA: oxfw: add an comment to Kconfig for TASCAM FireOne
        sound: fix check for error condition of register_chrdev()
      12b76f3b
    • Linus Torvalds's avatar
      Merge tag 'arc-4.4-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · b3a0d9a2
      Linus Torvalds authored
      Pull ARC fixes from Vineet Gupta:
       "Found a couple of brown paper bag bugs with the prev pull request
        (including a SMP build breakage report from Guenter).  Since these are
        urgent I also decided to send over a bunch of other pending fixes
        which could have otherwise waited an rc or two.
      
        Summary:
      
         - A bunch of brown paper bag bugs (MAINTAINERS list email, SMP build
           failure)
         - cpu_relax() now compiler barrier for UP as well
         - handling of userspace Bus Errors for ARCompact builds"
      
      * tag 'arc-4.4-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: Fix silly typo in MAINTAINERS file
        ARC: cpu_relax() to be compiler barrier even for UP
        ARC: use ASL assembler mnemonic
        ARC: [arcompact] Handle bus error from userspace as Interrupt not exception
        ARC: remove extraneous header include
        ARCv2: lib: memcpy: use local symbols
      b3a0d9a2
    • Vineet Gupta's avatar
      ARC: Fix silly typo in MAINTAINERS file · 30b9dbee
      Vineet Gupta authored
      30b9dbee
    • Vineet Gupta's avatar
      ARC: cpu_relax() to be compiler barrier even for UP · 1cfc05cb
      Vineet Gupta authored
      cpu_relax() on ARC has been barrier only for SMP (and no-op for UP). Per
      recent discussions, it is safer to make it a compiler barrier
      unconditionally.
      
      Link: http://lkml.kernel.org/r/53A7D3AA.9020100@synopsys.comAcked-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      1cfc05cb
    • Vineet Gupta's avatar
      ARC: use ASL assembler mnemonic · a6416f57
      Vineet Gupta authored
      ARCompact and ARCv2 only have ASL, while binutils used to support LSL as
      a alias mnemonic.
      
      Newer binutils (upstream) don't want to do that so replace it.
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      a6416f57
    • Vineet Gupta's avatar
      ARC: [arcompact] Handle bus error from userspace as Interrupt not exception · 541366da
      Vineet Gupta authored
      Bus errors from userspace on ARCompact based cores are handled by core
      as a high priority L2 interrupt but current code treated it as interrupt
      Handling an interrupt like exception is certainly not going to go unnoticed.
      (and it worked so far as we never saw a Bus error from userspace until
      IPPK guys tested a DDR controller with ECC error detection etc hence
      needed to explicitly trigger/handle such errors)
      
       - So move mem_service exception handler from common code into ARCv2 code.
       - In ARCompact code, define  mem_service as L2 interrupt handler which
         just drops down to pure kernel mode and goes of to enqueue SIGBUS
      Reported-by: default avatarNelson Pereira <npereira@synopsys.com>
      Tested-by: default avatarAna Martins <amartins@synopsys.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      541366da
    • Vineet Gupta's avatar
      ARC: remove extraneous header include · 76a8c40c
      Vineet Gupta authored
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      76a8c40c
    • Linus Torvalds's avatar
      Merge tag 'chrome-platform-4.4' of... · 63f4f7e8
      Linus Torvalds authored
      Merge tag 'chrome-platform-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform
      
      Pull chrome platform updates from Olof Johansson:
       "Here's the branch of chrome platform changes for v4.4.  Some have been
        queued up for the full 4.3 release cycle since I forgot to send them
        in for that round (rebased early on to deal with fixes conflicts).
      
        Most of these enable EC communication stuff -- Pixel 2015 support,
        enabling building for ARM64 platforms, and a few fixes for memory
        leaks.
      
        There's also a patch in here to allow reading/writing the verified
        boot context, which depends on a sysfs patch acked by Greg"
      
      * tag 'chrome-platform-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform:
        platform/chrome: Fix i2c-designware adapter name
        platform/chrome: Support reading/writing the vboot context
        sysfs: Support is_visible() on binary attributes
        platform/chrome: cros_ec: Fix possible leak in led_rgb_store()
        platform/chrome: cros_ec: Fix leak in sequence_store()
        platform/chrome: Enable Chrome platforms on 64-bit ARM
        platform/chrome: cros_ec_dev - Add a platform device ID table
        platform/chrome: cros_ec_lpc - Add support for Google Pixel 2
        platform/chrome: cros_ec_lpc - Use existing function to check EC result
        platform/chrome: Make depends on MFD_CROS_EC instead CROS_EC_PROTO
        Revert "platform/chrome: Don't make CHROME_PLATFORMS depends on X86 || ARM"
      63f4f7e8
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v4.4-2' of... · 4bfc89d2
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v4.4-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
      
      Pull another x86 platform driver update from Darren Hart:
       "Support for the unfortunately rather unique ESC key on the Ideapad
        Yoga 3 and two DMI matches for rfkill support.  Solitary fix for
        potential missed errors for asus-wmi.  Downgrade a thinkpad_acpi
        message to info.
      
        asus-wmi:
         - fix error handling in store_sys_wmi()
      
        ideapad-laptop:
         - Add Lenovo Yoga 900 to no_hw_rfkill dmi list
         - include Yoga 3 1170 in add rfkill whitelist
         - add support for Yoga 3 ESC key
      
        thinkpad_acpi:
         - Don't yell on unsupported brightness interfaces"
      
      * tag 'platform-drivers-x86-v4.4-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
        asus-wmi: fix error handling in store_sys_wmi()
        ideapad-laptop: Add Lenovo Yoga 900 to no_hw_rfkill dmi list
        ideapad-laptop: include Yoga 3 1170 in add rfkill whitelist
        ideapad-laptop: add support for Yoga 3 ESC key
        thinkpad_acpi: Don't yell on unsupported brightness interfaces
      4bfc89d2
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · a30b7ca2
      Linus Torvalds authored
      Pull more input updates from Dmitry Torokhov:
       "An update to the tsc2005 driver that allows it to also support tsc2004
        (basically the same controller, but uses i2c instead of spi bus), and
        a couple of bug fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: parkbd - drop bogus __init from parkbd_allocate_serio()
        Input: elantech - add Fujitsu Lifebook U745 to force crc_enabled
        Input: tsc2004 - add support for tsc2004
        Input: tsc200x-core - rename functions and variables
        Input: tsc2005 - separate SPI and core functions
      a30b7ca2
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · d83763f4
      Linus Torvalds authored
      Pull final round of SCSI updates from James Bottomley:
       "Sorry for the delay in this patch which was mostly caused by getting
        the merger of the mpt2/mpt3sas driver, which was seen as an essential
        item of maintenance work to do before the drivers diverge too much.
        Unfortunately, this caused a compile failure (detected by linux-next),
        which then had to be fixed up and incubated.
      
        In addition to the mpt2/3sas rework, there are updates from pm80xx,
        lpfc, bnx2fc, hpsa, ipr, aacraid, megaraid_sas, storvsc and ufs plus
        an assortment of changes including some year 2038 issues, a fix for a
        remove before detach issue in some drivers and a couple of other minor
        issues"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (141 commits)
        mpt3sas: fix inline markers on non inline function declarations
        sd: Clear PS bit before Mode Select.
        ibmvscsi: set max_lun to 32
        ibmvscsi: display default value for max_id, max_lun and max_channel.
        mptfusion: don't allow negative bytes in kbuf_alloc_2_sgl()
        scsi: pmcraid: replace struct timeval with ktime_get_real_seconds()
        mvumi: 64bit value for seconds_since1970
        be2iscsi: Fix bogus WARN_ON length check
        scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice
        mpt3sas: Bump mpt3sas driver version to 09.102.00.00
        mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs
        mpt2sas, mpt3sas: Update the driver versions
        mpt3sas: setpci reset kernel oops fix
        mpt3sas: Added OEM Gen2 PnP ID branding names
        mpt3sas: Refcount fw_events and fix unsafe list usage
        mpt3sas: Refcount sas_device objects and fix unsafe list usage
        mpt3sas: sysfs attribute to report Backup Rail Monitor Status
        mpt3sas: Ported WarpDrive product SSS6200 support
        mpt3sas: fix for driver fails EEH, recovery from injected pci bus error
        mpt3sas: Manage MSI-X vectors according to HBA device type
        ...
      d83763f4
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 9aa3d651
      Linus Torvalds authored
      Pull SCSI target updates from Nicholas Bellinger:
       "This series contains HCH's changes to absorb configfs attribute
        ->show() + ->store() function pointer usage from it's original
        tree-wide consumers, into common configfs code.
      
        It includes usb-gadget, target w/ drivers, netconsole and ocfs2
        changes to realize the improved simplicity, that now renders the
        original include/target/configfs_macros.h CPP magic for fabric drivers
        and others, unnecessary and obsolete.
      
        And with common code in place, new configfs attributes can be added
        easier than ever before.
      
        Note, there are further improvements in-flight from other folks for
        v4.5 code in configfs land, plus number of target fixes for post -rc1
        code"
      
      In the meantime, a new user of the now-removed old configfs API came in
      through the char/misc tree in commit 7bd1d409 ("stm class: Introduce
      an abstraction for System Trace Module devices").
      
      This merge resolution comes from Alexander Shishkin, who updated his stm
      class tracing abstraction to account for the removal of the old
      show_attribute and store_attribute methods in commit 51798222
      ("configfs: remove old API") from this pull.  As Alexander says about
      that patch:
      
       "There's no need to keep an extra wrapper structure per item and the
        awkward show_attribute/store_attribute item ops are no longer needed.
      
        This patch converts policy code to the new api, all the while making
        the code quite a bit smaller and easier on the eyes.
      
        Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>"
      
      That patch was folded into the merge so that the tree should be fully
      bisectable.
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (23 commits)
        configfs: remove old API
        ocfs2/cluster: use per-attribute show and store methods
        ocfs2/cluster: move locking into attribute store methods
        netconsole: use per-attribute show and store methods
        target: use per-attribute show and store methods
        spear13xx_pcie_gadget: use per-attribute show and store methods
        dlm: use per-attribute show and store methods
        usb-gadget/f_serial: use per-attribute show and store methods
        usb-gadget/f_phonet: use per-attribute show and store methods
        usb-gadget/f_obex: use per-attribute show and store methods
        usb-gadget/f_uac2: use per-attribute show and store methods
        usb-gadget/f_uac1: use per-attribute show and store methods
        usb-gadget/f_mass_storage: use per-attribute show and store methods
        usb-gadget/f_sourcesink: use per-attribute show and store methods
        usb-gadget/f_printer: use per-attribute show and store methods
        usb-gadget/f_midi: use per-attribute show and store methods
        usb-gadget/f_loopback: use per-attribute show and store methods
        usb-gadget/ether: use per-attribute show and store methods
        usb-gadget/f_acm: use per-attribute show and store methods
        usb-gadget/f_hid: use per-attribute show and store methods
        ...
      9aa3d651
    • Linus Torvalds's avatar
      Merge branch 'for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 5d2eb548
      Linus Torvalds authored
      Pull vfs xattr cleanups from Al Viro.
      
      * 'for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        f2fs: xattr simplifications
        squashfs: xattr simplifications
        9p: xattr simplifications
        xattr handlers: Pass handler to operations instead of flags
        jffs2: Add missing capability check for listing trusted xattrs
        hfsplus: Remove unused xattr handler list operations
        ubifs: Remove unused security xattr handler
        vfs: Fix the posix_acl_xattr_list return value
        vfs: Check attribute names in posix acl xattr handers
      5d2eb548
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 2870f6c4
      Linus Torvalds authored
      Pull libnvdimm fixes from Dan Williams:
      
       - three fixes tagged for -stable including a crash fix, simple
         performance tweak, and an invalid i/o error.
      
       - build regression fix for the nvdimm unit tests
      
       - nvdimm documentation update
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        dax: fix __dax_pmd_fault crash
        libnvdimm: documentation clarifications
        libnvdimm, pmem: fix size trim in pmem_direct_access()
        libnvdimm, e820: fix numa node for e820-type-12 pmem ranges
        tools/testing/nvdimm, acpica: fix flag rename build breakage
      2870f6c4
    • Andreas Gruenbacher's avatar
      f2fs: xattr simplifications · 29608d20
      Andreas Gruenbacher authored
      Now that the xattr handler is passed to the xattr handler operations, we
      have access to the attribute name prefix, so simplify
      f2fs_xattr_generic_list.
      
      Also, f2fs_xattr_advise_list is only ever called for
      f2fs_xattr_advise_handler; there is no need to double check for that.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Cc: Jaegeuk Kim <jaegeuk@kernel.org>
      Cc: Changman Lee <cm224.lee@samsung.com>
      Cc: Chao Yu <chao2.yu@samsung.com>
      Cc: linux-f2fs-devel@lists.sourceforge.net
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      29608d20
    • Andreas Gruenbacher's avatar
      squashfs: xattr simplifications · 0ddaf72c
      Andreas Gruenbacher authored
      Now that the xattr handler is passed to the xattr handler operations, we
      have access to the attribute name prefix, so simplify the squashfs xattr
      handlers a bit.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Cc: Phillip Lougher <phillip@squashfs.org.uk>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      0ddaf72c
    • Andreas Gruenbacher's avatar
      9p: xattr simplifications · e409de99
      Andreas Gruenbacher authored
      Now that the xattr handler is passed to the xattr handler operations, we
      can use the same get and set operations for the user, trusted, and security
      xattr namespaces.  In those namespaces, we can access the full attribute
      name by "reattaching" the name prefix the vfs has skipped for us.  Add a
      xattr_full_name helper to make this obvious in the code.
      
      For the "system.posix_acl_access" and "system.posix_acl_default"
      attributes, handler->prefix is the full attribute name; the suffix is the
      empty string.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Cc: Eric Van Hensbergen <ericvh@gmail.com>
      Cc: Ron Minnich <rminnich@sandia.gov>
      Cc: Latchesar Ionkov <lucho@ionkov.net>
      Cc: v9fs-developer@lists.sourceforge.net
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      e409de99
    • Andreas Gruenbacher's avatar
      xattr handlers: Pass handler to operations instead of flags · d9a82a04
      Andreas Gruenbacher authored
      The xattr_handler operations are currently all passed a file system
      specific flags value which the operations can use to disambiguate between
      different handlers; some file systems use that to distinguish the xattr
      namespace, for example.  In some oprations, it would be useful to also have
      access to the handler prefix.  To allow that, pass a pointer to the handler
      to operations instead of the flags value alone.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      d9a82a04