1. 19 Feb, 2017 7 commits
  2. 03 Feb, 2017 1 commit
  3. 31 Jan, 2017 2 commits
  4. 23 Jan, 2017 3 commits
  5. 20 Jan, 2017 1 commit
  6. 17 Jan, 2017 4 commits
    • Mylène Josserand's avatar
      ASoC: sun4i-i2s: Increase DMA max burst to 8 · ebad64d1
      Mylène Josserand authored
      As done previously for sun4i-codec, the DMA maxburst of 4
      is not supported by every SoCs so the DMA controller engine
      returns "unsupported value".
      
      As a maxburst of 8 is supported by all variants, this patch
      increases it to 8.
      
      For more details, see commit from Chen-Yu Tsai:
      commit 730e2dd0 ("ASoC: sun4i-codec: Increase DMA max burst to 8")
      Signed-off-by: default avatarMylène Josserand <mylene.josserand@free-electrons.com>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      ebad64d1
    • Jörg Krause's avatar
      ASoC: mxs-saif: fix setting master base rate · bcb8c270
      Jörg Krause authored
      The SAIF base oversample rates are either 512*fs or 384*fs. An additional
      divider exists within the SAIF to generate sub-multiples of these two base
      rates if MCLK is required by the codec.
      
       * The sub-rates for the 512x base rate are: 256x, 128x, 64x, and 32x.
       * The sub-rates for the 384x base rate are: 192x, 96x, and 48x.
      
      Setting the base rate depending on the modulo operation with 32 and 48
      give wrong results for some mclk.
      
      If mclk=18.432MHz both modulo operations results in 0. As testing the
      result with 32 is done first, a wrong base rate of 512*fs is set instead
      of the correct 384*fs.
      
      Fix this by setting the base rate depending on the calculated sub-rate.
      Signed-off-by: default avatarJörg Krause <joerg.krause@embedded.rocks>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      bcb8c270
    • Jörg Krause's avatar
      ASoC: mxs-saif: fix setting SAIF1 register · b25658ed
      Jörg Krause authored
      If SAIF0 is used in master and SAIF1 in slave mode setting the SAIF1
      register in mxs_saif_set_dai_fmt() does not have any effect on the
      interface as the clk gate needs to be cleared before the register can be
      written.
      Signed-off-by: default avatarJörg Krause <joerg.krause@embedded.rocks>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      b25658ed
    • Linus Walleij's avatar
      ASoC: dapm: handle probe deferrals · 37e1df8c
      Linus Walleij authored
      This starts to handle probe deferrals on regulators and clocks
      on the ASoC DAPM.
      
      I came to this patch after audio stopped working on Ux500 ages
      ago and I finally looked into it to see what is wrong. I had
      messages like this in the console since a while back:
      
      ab8500-codec.0: ASoC: Failed to request audioclk: -517
      ab8500-codec.0: ASoC: Failed to create DAPM control audioclk
      ab8500-codec.0: Failed to create new controls -12
      snd-soc-mop500.0: ASoC: failed to instantiate card -12
      snd-soc-mop500.0: Error: snd_soc_register_card failed (-12)!
      snd-soc-mop500: probe of snd-soc-mop500.0 failed with error -12
      
      Apparently because the widget table for the codec looks like
      this (sound/soc/codecs/ab8500-codec.c):
      
      static const struct snd_soc_dapm_widget ab8500_dapm_widgets[] = {
      
              /* Clocks */
              SND_SOC_DAPM_CLOCK_SUPPLY("audioclk"),
      
              /* Regulators */
              SND_SOC_DAPM_REGULATOR_SUPPLY("V-AUD", 0, 0),
              SND_SOC_DAPM_REGULATOR_SUPPLY("V-AMIC1", 0, 0),
              SND_SOC_DAPM_REGULATOR_SUPPLY("V-AMIC2", 0, 0),
              SND_SOC_DAPM_REGULATOR_SUPPLY("V-DMIC", 0, 0),
      
      So when we call snd_soc_register_codec() and any of these widgets
      get a deferred probe we do not get an -EPROBE_DEFER (-517) back as
      we should and instead we just fail. Apparently the code assumes
      that clocks and regulators must be available at this point and
      not defer.
      
      After this patch it rather looks like this:
      
      ab8500-codec.0: Failed to create new controls -517
      snd-soc-mop500.0: ASoC: failed to instantiate card -517
      snd-soc-mop500.0: Error: snd_soc_register_card failed (-517)!
      (...)
      abx500-clk.0: registered clocks for ab850x
      snd-soc-mop500.0: ab8500-codec-dai.0 <-> ux500-msp-i2s.1 mapping ok
      snd-soc-mop500.0: ab8500-codec-dai.1 <-> ux500-msp-i2s.3 mapping ok
      
      I'm pretty happy about the patch as it it, but I'm a bit
      uncertain on how to proceed: there are a lot of users of the
      external functions snd_soc_dapm_new_control() (111 sites)
      and that will now return an occassional error pointer, which
      is not handled in the calling sites.
      
      I want an indication from the maintainers whether I should just
      go in and augment all these call sites, or if deferred probe
      is frowned upon when it leads to this much overhead.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      37e1df8c
  7. 10 Jan, 2017 6 commits
  8. 09 Jan, 2017 3 commits
  9. 08 Jan, 2017 6 commits
    • Linus Torvalds's avatar
      Linux 4.10-rc3 · a121103c
      Linus Torvalds authored
      a121103c
    • Linus Torvalds's avatar
      Merge tag 'usb-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 83280e90
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a bunch of USB fixes for 4.10-rc3. Yeah, it's a lot, an
        artifact of the holiday break I think.
      
        Lots of gadget and the usual XHCI fixups for reported issues (one day
        that driver will calm down...) Also included are a bunch of usb-serial
        driver fixes, and for good measure, a number of much-reported MUSB
        driver issues have finally been resolved.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (72 commits)
        USB: fix problems with duplicate endpoint addresses
        usb: ohci-at91: use descriptor-based gpio APIs correctly
        usb: storage: unusual_uas: Add JMicron JMS56x to unusual device
        usb: hub: Move hub_port_disable() to fix warning if PM is disabled
        usb: musb: blackfin: add bfin_fifo_offset in bfin_ops
        usb: musb: fix compilation warning on unused function
        usb: musb: Fix trying to free already-free IRQ 4
        usb: musb: dsps: implement clear_ep_rxintr() callback
        usb: musb: core: add clear_ep_rxintr() to musb_platform_ops
        USB: serial: ti_usb_3410_5052: fix NULL-deref at open
        USB: serial: spcp8x5: fix NULL-deref at open
        USB: serial: quatech2: fix sleep-while-atomic in close
        USB: serial: pl2303: fix NULL-deref at open
        USB: serial: oti6858: fix NULL-deref at open
        USB: serial: omninet: fix NULL-derefs at open and disconnect
        USB: serial: mos7840: fix misleading interrupt-URB comment
        USB: serial: mos7840: remove unused write URB
        USB: serial: mos7840: fix NULL-deref at open
        USB: serial: mos7720: remove obsolete port initialisation
        USB: serial: mos7720: fix parallel probe
        ...
      83280e90
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · cc250e26
      Linus Torvalds authored
      Pull char/misc fixes from Greg KH:
       "Here are a few small char/misc driver fixes for 4.10-rc3.
      
        Two MEI driver fixes, and three NVMEM patches for reported issues, and
        a new Hyper-V driver MAINTAINER update. Nothing major at all, all have
        been in linux-next with no reported issues"
      
      * tag 'char-misc-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        hyper-v: Add myself as additional MAINTAINER
        nvmem: fix nvmem_cell_read() return type doc
        nvmem: imx-ocotp: Fix wrong register size
        nvmem: qfprom: Allow single byte accesses for read/write
        mei: move write cb to completion on credentials failures
        mei: bus: fix mei_cldev_enable KDoc
      cc250e26
    • Linus Torvalds's avatar
      Merge tag 'staging-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 6ea17ed1
      Linus Torvalds authored
      Pull staging/IIO fixes from Greg KH:
       "Here are some staging and IIO driver fixes for 4.10-rc3.
      
        Most of these are minor IIO fixes of reported issues, along with one
        network driver fix to resolve an issue. And a MAINTAINERS update with
        a new mailing list. All of these, except the MAINTAINERS file update,
        have been in linux-next with no reported issues (the MAINTAINERS patch
        happened on Friday...)"
      
      * tag 'staging-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        MAINTAINERS: add greybus subsystem mailing list
        staging: octeon: Call SET_NETDEV_DEV()
        iio: accel: st_accel: fix LIS3LV02 reading and scaling
        iio: common: st_sensors: fix channel data parsing
        iio: max44000: correct value in illuminance_integration_time_available
        iio: adc: TI_AM335X_ADC should depend on HAS_DMA
        iio: bmi160: Fix time needed to sleep after command execution
        iio: 104-quad-8: Fix active level mismatch for the preset enable option
        iio: 104-quad-8: Fix off-by-one errors when addressing IOR
        iio: 104-quad-8: Fix index control configuration
      6ea17ed1
    • Johannes Weiner's avatar
      mm: workingset: fix use-after-free in shadow node shrinker · ea07b862
      Johannes Weiner authored
      Several people report seeing warnings about inconsistent radix tree
      nodes followed by crashes in the workingset code, which all looked like
      use-after-free access from the shadow node shrinker.
      
      Dave Jones managed to reproduce the issue with a debug patch applied,
      which confirmed that the radix tree shrinking indeed frees shadow nodes
      while they are still linked to the shadow LRU:
      
        WARNING: CPU: 2 PID: 53 at lib/radix-tree.c:643 delete_node+0x1e4/0x200
        CPU: 2 PID: 53 Comm: kswapd0 Not tainted 4.10.0-rc2-think+ #3
        Call Trace:
           delete_node+0x1e4/0x200
           __radix_tree_delete_node+0xd/0x10
           shadow_lru_isolate+0xe6/0x220
           __list_lru_walk_one.isra.4+0x9b/0x190
           list_lru_walk_one+0x23/0x30
           scan_shadow_nodes+0x2e/0x40
           shrink_slab.part.44+0x23d/0x5d0
           shrink_node+0x22c/0x330
           kswapd+0x392/0x8f0
      
      This is the WARN_ON_ONCE(!list_empty(&node->private_list)) placed in the
      inlined radix_tree_shrink().
      
      The problem is with 14b46879 ("mm: workingset: move shadow entry
      tracking to radix tree exceptional tracking"), which passes an update
      callback into the radix tree to link and unlink shadow leaf nodes when
      tree entries change, but forgot to pass the callback when reclaiming a
      shadow node.
      
      While the reclaimed shadow node itself is unlinked by the shrinker, its
      deletion from the tree can cause the left-most leaf node in the tree to
      be shrunk.  If that happens to be a shadow node as well, we don't unlink
      it from the LRU as we should.
      
      Consider this tree, where the s are shadow entries:
      
             root->rnode
                  |
             [0       n]
              |       |
           [s    ] [sssss]
      
      Now the shadow node shrinker reclaims the rightmost leaf node through
      the shadow node LRU:
      
             root->rnode
                  |
             [0        ]
              |
          [s     ]
      
      Because the parent of the deleted node is the first level below the
      root and has only one child in the left-most slot, the intermediate
      level is shrunk and the node containing the single shadow is put in
      its place:
      
             root->rnode
                  |
             [s        ]
      
      The shrinker again sees a single left-most slot in a first level node
      and thus decides to store the shadow in root->rnode directly and free
      the node - which is a leaf node on the shadow node LRU.
      
        root->rnode
             |
             s
      
      Without the update callback, the freed node remains on the shadow LRU,
      where it causes later shrinker runs to crash.
      
      Pass the node updater callback into __radix_tree_delete_node() in case
      the deletion causes the left-most branch in the tree to collapse too.
      
      Also add warnings when linked nodes are freed right away, rather than
      wait for the use-after-free when the list is scanned much later.
      
      Fixes: 14b46879 ("mm: workingset: move shadow entry tracking to radix tree exceptional tracking")
      Reported-by: default avatarDave Chinner <david@fromorbit.com>
      Reported-by: default avatarHugh Dickins <hughd@google.com>
      Reported-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
      Reported-and-tested-by: default avatarDave Jones <davej@codemonkey.org.uk>
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Leech <cleech@redhat.com>
      Cc: Lee Duncan <lduncan@suse.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@linuxonhyperv.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ea07b862
    • Hugh Dickins's avatar
      mm: stop leaking PageTables · b0b9b3df
      Hugh Dickins authored
      4.10-rc loadtest (even on x86, and even without THPCache) fails with
      "fork: Cannot allocate memory" or some such; and /proc/meminfo shows
      PageTables growing.
      
      Commit 953c66c2 ("mm: THP page cache support for ppc64") that got
      merged in rc1 removed the freeing of an unused preallocated pagetable
      after do_fault_around() has called map_pages().
      
      This is usually a good optimization, so that the followup doesn't have
      to reallocate one; but it's not sufficient to shift the freeing into
      alloc_set_pte(), since there are failure cases (most commonly
      VM_FAULT_RETRY) which never reach finish_fault().
      
      Check and free it at the outer level in do_fault(), then we don't need
      to worry in alloc_set_pte(), and can restore that to how it was (I
      cannot find any reason to pte_free() under lock as it was doing).
      
      And fix a separate pagetable leak, or crash, introduced by the same
      change, that could only show up on some ppc64: why does do_set_pmd()'s
      failure case attempt to withdraw a pagetable when it never deposited
      one, at the same time overwriting (so leaking) the vmf->prealloc_pte?
      Residue of an earlier implementation, perhaps? Delete it.
      
      Fixes: 953c66c2 ("mm: THP page cache support for ppc64")
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Michael Neuling <mikey@neuling.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Balbir Singh <bsingharora@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b0b9b3df
  10. 07 Jan, 2017 2 commits
  11. 06 Jan, 2017 5 commits