1. 15 Sep, 2019 1 commit
  2. 10 Sep, 2019 1 commit
    • Lukas Wunner's avatar
      spi: bcm2835: Work around DONE bit erratum · 4c524191
      Lukas Wunner authored
      Commit 3bd7f658 ("spi: bcm2835: Overcome sglist entry length
      limitation") amended the BCM2835 SPI driver with support for DMA
      transfers whose buffers are not aligned to 4 bytes and require more than
      one sglist entry.
      
      When testing this feature with upcoming commits to speed up TX-only and
      RX-only transfers, I noticed that SPI transmission sometimes breaks.
      A function introduced by the commit, bcm2835_spi_transfer_prologue(),
      performs one or two PIO transmissions as a prologue to the actual DMA
      transmission.  It turns out that the breakage goes away if the DONE bit
      in the CS register is set when ending such a PIO transmission.
      
      The DONE bit signifies emptiness of the TX FIFO.  According to the spec,
      the bit is of type RO, so writing it should never have any effect.
      Perhaps the spec is wrong and the bit is actually of type RW1C.
      E.g. the I2C controller on the BCM2835 does have an RW1C DONE bit which
      needs to be cleared by the driver.  Another, possibly more likely
      explanation is that it's a hardware erratum since the issue does not
      occur consistently.
      
      Either way, amend bcm2835_spi_transfer_prologue() to always write the
      DONE bit.
      
      Usually a transmission is ended by bcm2835_spi_reset_hw().  If the
      transmission was successful, the TX FIFO is empty and thus the DONE bit
      is set when bcm2835_spi_reset_hw() reads the CS register.  The bit is
      then written back to the register, so we happen to do the right thing.
      
      However if DONE is not set, e.g. because transmission is aborted with
      a non-empty TX FIFO, the bit won't be written by bcm2835_spi_reset_hw()
      and it seems possible that transmission might subsequently break.  To be
      on the safe side, likewise amend bcm2835_spi_reset_hw() to always write
      the bit.
      Tested-by: default avatarNuno Sá <nuno.sa@analog.com>
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Acked-by: default avatarStefan Wahren <wahrenst@gmx.net>
      Acked-by: default avatarMartin Sperl <kernel@martin.sperl.org>
      Link: https://lore.kernel.org/r/edb004dff4af6106f6bfcb89e1a96391e96eb857.1564825752.git.lukas@wunner.deSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      4c524191
  3. 08 Sep, 2019 4 commits
  4. 07 Sep, 2019 4 commits
  5. 06 Sep, 2019 17 commits
  6. 05 Sep, 2019 9 commits
  7. 04 Sep, 2019 4 commits
    • Al Viro's avatar
      configfs: provide exclusion between IO and removals · b0841eef
      Al Viro authored
      Make sure that attribute methods are not called after the item
      has been removed from the tree.  To do so, we
      	* at the point of no return in removals, grab ->frag_sem
      exclusive and mark the fragment dead.
      	* call the methods of attributes with ->frag_sem taken
      shared and only after having verified that the fragment is still
      alive.
      
      	The main benefit is for method instances - they are
      guaranteed that the objects they are accessing *and* all ancestors
      are still there.  Another win is that we don't need to bother
      with extra refcount on config_item when opening a file -
      the item will be alive for as long as it stays in the tree, and
      we won't touch it/attributes/any associated data after it's
      been removed from the tree.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      b0841eef
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.3-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 3b47fd5c
      Linus Torvalds authored
      Pull NFS client bugfix from Trond Myklebust:
       "Regression fix inode fileid checks in attribute revalidation code"
      
      * tag 'nfs-for-5.3-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: Fix inode fileid checks in attribute revalidation code
      3b47fd5c
    • Ingo Molnar's avatar
      sched/core: Fix uclamp ABI bug, clean up and robustify sched_read_attr() ABI logic and code · 1251201c
      Ingo Molnar authored
      Thadeu Lima de Souza Cascardo reported that 'chrt' broke on recent kernels:
      
        $ chrt -p $$
        chrt: failed to get pid 26306's policy: Argument list too long
      
      and he has root-caused the bug to the following commit increasing sched_attr
      size and breaking sched_read_attr() into returning -EFBIG:
      
        a509a7cd ("sched/uclamp: Extend sched_setattr() to support utilization clamping")
      
      The other, bigger bug is that the whole sched_getattr() and sched_read_attr()
      logic of checking non-zero bits in new ABI components is arguably broken,
      and pretty much any extension of the ABI will spuriously break the ABI.
      That's way too fragile.
      
      Instead implement the perf syscall's extensible ABI instead, which we
      already implement on the sched_setattr() side:
      
       - if user-attributes have the same size as kernel attributes then the
         logic is unchanged.
      
       - if user-attributes are larger than the kernel knows about then simply
         skip the extra bits, but set attr->size to the (smaller) kernel size
         so that tooling can (in principle) handle older kernel as well.
      
       - if user-attributes are smaller than the kernel knows about then just
         copy whatever user-space can accept.
      
      Also clean up the whole logic:
      
       - Simplify the code flow - there's no need for 'ret' for example.
      
       - Standardize on 'kattr/uattr' and 'ksize/usize' naming to make sure we
         always know which side we are dealing with.
      
       - Why is it called 'read' when what it does is to copy to user? This
         code is so far away from VFS read() semantics that the naming is
         actively confusing. Name it sched_attr_copy_to_user() instead, which
         mirrors other copy_to_user() functionality.
      
       - Move the attr->size assignment from the head of sched_getattr() to the
         sched_attr_copy_to_user() function. Nothing else within the kernel
         should care about the size of the structure.
      
      With these fixes the sched_getattr() syscall now nicely supports an
      extensible ABI in both a forward and backward compatible fashion, and
      will also fix the chrt bug.
      
      As an added bonus the bogus -EFBIG return is removed as well, which as
      Thadeu noted should have been -E2BIG to begin with.
      Reported-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
      Tested-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
      Tested-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
      Acked-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Patrick Bellasi <patrick.bellasi@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Fixes: a509a7cd ("sched/uclamp: Extend sched_setattr() to support utilization clamping")
      Link: https://lkml.kernel.org/r/20190904075532.GA26751@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1251201c
    • Arnd Bergmann's avatar
      Merge tag 'renesas-fixes-for-v5.3' of... · d9a2b63c
      Arnd Bergmann authored
      Merge tag 'renesas-fixes-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/fixes
      
      Renesas ARM Based SoC Fixes for v5.3
      
      * R-Car D3 (r8a77995) based Draak Board
        - Correct backlight regulator name in device tree
      
      * tag 'renesas-fixes-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
        arm64: dts: renesas: r8a77995: draak: Fix backlight regulator name
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      d9a2b63c