1. 21 Aug, 2016 5 commits
    • Vignesh R's avatar
      iio: adc: ti_am335x_adc: Increase timeout value waiting for ADC sample · 7175cce1
      Vignesh R authored
      Now that open delay and sample delay for each channel is configurable
      via DT, the default IDLE_TIMEOUT value is not enough as this is
      calculated based on hardcoded macros. This results in driver returning
      EBUSY sometimes. Fix this by increasing the timeout
      value based on maximum value possible to open delay and sample delays
      for each channel.
      
      Fixes: 5dc11e81 ("iio: adc: ti_am335x_adc: make sample delay, open delay, averaging DT parameters")
      Signed-off-by: default avatarVignesh R <vigneshr@ti.com>
      Acked-by: default avatarLee Jones <lee.jones@linaro.org>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      7175cce1
    • Vignesh R's avatar
      iio: adc: ti_am335x_adc: Protect FIFO1 from concurrent access · 90c43ec6
      Vignesh R authored
      It is possible that two or more ADC channels can be simultaneously
      requested for raw samples, in which case there can be race in access to
      FIFO data resulting in loss of samples.
      If am335x_tsc_se_set_once() is called again from tiadc_read_raw(), when
      ADC is still acquired to sample one of the channels, the second process
      might be put into uninterruptible sleep state. Fix these issues, by
      protecting FIFO access and channel configurations with a mutex. Since
      tiadc_read_raw() might take anywhere between few microseconds to few
      milliseconds to finish execution (depending on averaging and delay
      values supplied via DT), its better to use mutex instead of spinlock.
      
      Fixes: 7ca6740c ("mfd: input: iio: ti_amm335x: Rework TSC/ADC synchronization")
      Signed-off-by: default avatarVignesh R <vigneshr@ti.com>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      90c43ec6
    • Colin Ian King's avatar
      iio: chemical: atlas-ph-sensor: fix typo in val assignment · ca64d4bc
      Colin Ian King authored
      Fix an incorrect assignment due to a typo on a variable name. The
      variable val2 should be assigned 100000 and not val.
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Reviewed-By: default avatarMatt Ranostay <mranostay@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      ca64d4bc
    • Brian Norris's avatar
      iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING" · fcf68f3c
      Brian Norris authored
      When using CONFIG_DEBUG_ATOMIC_SLEEP, the scheduler nicely points out
      that we're calling sleeping primitives within the wait_event loop, which
      means we might clobber the task state:
      
      [   10.831289] do not call blocking ops when !TASK_RUNNING; state=1 set at [<ffffffc00026b610>]
      [   10.845531] ------------[ cut here ]------------
      [   10.850161] WARNING: at kernel/sched/core.c:7630
      ...
      [   12.164333] ---[ end trace 45409966a9a76438 ]---
      [   12.168942] Call trace:
      [   12.171391] [<ffffffc00024ed44>] __might_sleep+0x64/0x90
      [   12.176699] [<ffffffc000954774>] mutex_lock_nested+0x50/0x3fc
      [   12.182440] [<ffffffc0007b9424>] iio_kfifo_buf_data_available+0x28/0x4c
      [   12.189043] [<ffffffc0007b76ac>] iio_buffer_ready+0x60/0xe0
      [   12.194608] [<ffffffc0007b7834>] iio_buffer_read_first_n_outer+0x108/0x1a8
      [   12.201474] [<ffffffc000370d48>] __vfs_read+0x58/0x114
      [   12.206606] [<ffffffc000371740>] vfs_read+0x94/0x118
      [   12.211564] [<ffffffc0003720f8>] SyS_read+0x64/0xb4
      [   12.216436] [<ffffffc000203cb4>] el0_svc_naked+0x24/0x28
      
      To avoid this, we should (a la https://lwn.net/Articles/628628/) use the
      wait_woken() function, which avoids the nested sleeping while still
      handling races between waiting / wake-events.
      Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
      Reviewed-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Cc: <Stable@vger.kernel.org> # 3.19+ for introduction of wake_woken
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      fcf68f3c
    • Giorgio Dal Molin's avatar
      iio:ti-ads1015: fix a wrong pointer definition. · 522caebb
      Giorgio Dal Molin authored
      The call to i2c_get_clientdata(client) returns a struct iio_dev*, not
      the needed struct ads1015_data*. We need here an intermediate step as
      in the function: void ads1015_get_channels_config(struct i2c_client *client).
      Signed-off-by: default avatarGiorgio Dal Molin <giorgio.nicole@arcor.de>
      Fixes: ecc24e72 ("iio: adc: Add TI ADS1015 ADC driver support")
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      522caebb
  2. 15 Aug, 2016 16 commits
  3. 14 Aug, 2016 2 commits
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus-4.8' of... · 118253a5
      Linus Torvalds authored
      Merge tag 'fixes-for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull h8300 and unicore32 architecture fixes from Guenter Roeck:
       "Two patches to fix h8300 and unicore32 builds.
      
        unicore32 builds have been broken since v4.6.  The fix has been
        available in -next since March of this year.
      
        h8300 builds have been broken since the last commit window.  The fix
        has been available in -next since June of this year"
      
      * tag 'fixes-for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        h8300: Add missing include file to asm/io.h
        unicore32: mm: Add missing parameter to arch_vma_access_permitted
      118253a5
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 120c5475
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - support for nr_cpus= command line argument (maxcpus was previously
         changed to allow secondary CPUs to be hot-plugged)
      
       - ARM PMU interrupt handling fix
      
       - fix potential TLB conflict in the hibernate code
      
       - improved handling of EL1 instruction aborts (better error reporting)
      
       - removal of useless jprobes code for stack saving/restoring
      
       - defconfig updates
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: defconfig: enable CONFIG_LOCALVERSION_AUTO
        arm64: defconfig: add options for virtualization and containers
        arm64: hibernate: handle allocation failures
        arm64: hibernate: avoid potential TLB conflict
        arm64: Handle el1 synchronous instruction aborts cleanly
        arm64: Remove stack duplicating code from jprobes
        drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property
        drivers/perf: arm-pmu: convert arm_pmu_mutex to spinlock
        arm64: Support hard limit of cpu count by nr_cpus
      120c5475
  4. 13 Aug, 2016 4 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 329f4152
      Linus Torvalds authored
      Pull KVM fixes from Radim Krčmář:
       "KVM:
         - lock kvm_device list to prevent corruption on device creation.
      
        PPC:
         - split debugfs initialization from creation of the xics device to
           unlock the newly taken kvm lock earlier.
      
        s390:
         - prevent userspace from triggering two WARN_ON_ONCE.
      
        MIPS:
         - fix several issues in the management of TLB faults (Cc: stable)"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        MIPS: KVM: Propagate kseg0/mapped tlb fault errors
        MIPS: KVM: Fix gfn range check in kseg0 tlb faults
        MIPS: KVM: Add missing gfn range check
        MIPS: KVM: Fix mapped fault broken commpage handling
        KVM: Protect device ops->create and list_add with kvm->lock
        KVM: PPC: Move xics_debugfs_init out of create
        KVM: s390: reset KVM_REQ_MMU_RELOAD if mapping the prefix failed
        KVM: s390: set the prefix initially properly
      329f4152
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · a1e21033
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - an NVMe fix from Gabriel, fixing a suspend/resume issue on some
         setups
      
       - addition of a few missing entries in the block queue sysfs
         documentation, from Joe
      
       - a fix for a sparse shadow warning for the bvec iterator, from
         Johannes
      
       - a writeback deadlock involving raid issuing barriers, and not
         flushing the plug when we wakeup the flusher threads.  From
         Konstantin
      
       - a set of patches for the NVMe target/loop/rdma code, from Roland and
         Sagi
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        bvec: avoid variable shadowing warning
        doc: update block/queue-sysfs.txt entries
        nvme: Suspend all queues before deletion
        mm, writeback: flush plugged IO in wakeup_flusher_threads()
        nvme-rdma: Remove unused includes
        nvme-rdma: start async event handler after reconnecting to a controller
        nvmet: Fix controller serial number inconsistency
        nvmet-rdma: Don't use the inline buffer in order to avoid allocation for small reads
        nvmet-rdma: Correctly handle RDMA device hot removal
        nvme-rdma: Make sure to shutdown the controller if we can
        nvme-loop: Remove duplicate call to nvme_remove_namespaces
        nvme-rdma: Free the I/O tags when we delete the controller
        nvme-rdma: Remove duplicate call to nvme_remove_namespaces
        nvme-rdma: Fix device removal handling
        nvme-rdma: Queue ns scanning after a sucessful reconnection
        nvme-rdma: Don't leak uninitialized memory in connect request private data
      a1e21033
    • Guenter Roeck's avatar
      h8300: Add missing include file to asm/io.h · 2b05980d
      Guenter Roeck authored
      h8300 builds fail with
      
      arch/h8300/include/asm/io.h:9:15: error: unknown type name ‘u8’
      arch/h8300/include/asm/io.h:15:15: error: unknown type name ‘u16’
      arch/h8300/include/asm/io.h:21:15: error: unknown type name ‘u32’
      
      and many related errors.
      
      Fixes: 23c82d41bdf4 ("kexec-allow-architectures-to-override-boot-mapping-fix")
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      2b05980d
    • Guenter Roeck's avatar
      unicore32: mm: Add missing parameter to arch_vma_access_permitted · 783011b1
      Guenter Roeck authored
      unicore32 fails to compile with the following errors.
      
      mm/memory.c: In function ‘__handle_mm_fault’:
      mm/memory.c:3381: error:
      	too many arguments to function ‘arch_vma_access_permitted’
      mm/gup.c: In function ‘check_vma_flags’:
      mm/gup.c:456: error:
      	too many arguments to function ‘arch_vma_access_permitted’
      mm/gup.c: In function ‘vma_permits_fault’:
      mm/gup.c:640: error:
      	too many arguments to function ‘arch_vma_access_permitted’
      
      Fixes: d61172b4 ("mm/core, x86/mm/pkeys: Differentiate instruction fetches")
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarGuan Xuetao <gxt@mprc.pku.edu.cn>
      783011b1
  5. 12 Aug, 2016 13 commits