1. 26 Jan, 2020 1 commit
  2. 21 Jan, 2020 1 commit
  3. 17 Jan, 2020 1 commit
  4. 16 Jan, 2020 2 commits
  5. 15 Jan, 2020 2 commits
  6. 14 Jan, 2020 1 commit
  7. 07 Jan, 2020 1 commit
    • Jens Axboe's avatar
      io_uring: remove punt of short reads to async context · eacc6dfa
      Jens Axboe authored
      We currently punt any short read on a regular file to async context,
      but this fails if the short read is due to running into EOF. This is
      especially problematic since we only do the single prep for commands
      now, as we don't reset kiocb->ki_pos. This can result in a 4k read on
      a 1k file returning zero, as we detect the short read and then retry
      from async context. At the time of retry, the position is now 1k, and
      we end up reading nothing, and hence return 0.
      
      Instead of trying to patch around the fact that short reads can be
      legitimate and won't succeed in case of retry, remove the logic to punt
      a short read to async context. Simply return it.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      eacc6dfa
  8. 24 Dec, 2019 1 commit
  9. 23 Dec, 2019 1 commit
  10. 20 Dec, 2019 7 commits
    • Jens Axboe's avatar
      io_uring: pass in 'sqe' to the prep handlers · 3529d8c2
      Jens Axboe authored
      This moves the prep handlers outside of the opcode handlers, and allows
      us to pass in the sqe directly. If the sqe is non-NULL, it means that
      the request should be prepared for the first time.
      
      With the opcode handlers not having access to the sqe at all, we are
      guaranteed that the prep handler has setup the request fully by the
      time we get there. As before, for opcodes that need to copy in more
      data then the io_kiocb allows for, the io_async_ctx holds that info. If
      a prep handler is invoked with req->io set, it must use that to retain
      information for later.
      
      Finally, we can remove io_kiocb->sqe as well.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      3529d8c2
    • Jens Axboe's avatar
      io_uring: standardize the prep methods · 06b76d44
      Jens Axboe authored
      We currently have a mix of use cases. Most of the newer ones are pretty
      uniform, but we have some older ones that use different calling
      calling conventions. This is confusing.
      
      For the opcodes that currently rely on the req->io->sqe copy saving
      them from reuse, add a request type struct in the io_kiocb command
      union to store the data they need.
      
      Prepare for all opcodes having a standard prep method, so we can call
      it in a uniform fashion and outside of the opcode handler. This is in
      preparation for passing in the 'sqe' pointer, rather than storing it
      in the io_kiocb. Once we have uniform prep handlers, we can leave all
      the prep work to that part, and not even pass in the sqe to the opcode
      handler. This ensures that we don't reuse sqe data inadvertently.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      06b76d44
    • Jens Axboe's avatar
      io_uring: read 'count' for IORING_OP_TIMEOUT in prep handler · 26a61679
      Jens Axboe authored
      Add the count field to struct io_timeout, and ensure the prep handler
      has read it. Timeout also needs an async context always, set it up
      in the prep handler if we don't have one.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      26a61679
    • Jens Axboe's avatar
      io_uring: move all prep state for IORING_OP_{SEND,RECV}_MGS to prep handler · e47293fd
      Jens Axboe authored
      Add struct io_sr_msg in our io_kiocb per-command union, and ensure that
      the send/recvmsg prep handlers have grabbed what they need from the SQE
      by the time prep is done.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      e47293fd
    • Jens Axboe's avatar
      io_uring: move all prep state for IORING_OP_CONNECT to prep handler · 3fbb51c1
      Jens Axboe authored
      Add struct io_connect in our io_kiocb per-command union, and ensure
      that io_connect_prep() has grabbed what it needs from the SQE.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      3fbb51c1
    • Jens Axboe's avatar
      io_uring: add and use struct io_rw for read/writes · 9adbd45d
      Jens Axboe authored
      Put the kiocb in struct io_rw, and add the addr/len for the request as
      well. Use the kiocb->private field for the buffer index for fixed reads
      and writes.
      
      Any use of kiocb->ki_filp is flipped to req->file. It's the same thing,
      and less confusing.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      9adbd45d
    • Jens Axboe's avatar
      io_uring: use u64_to_user_ptr() consistently · d55e5f5b
      Jens Axboe authored
      We use it in some spots, but not consistently. Convert the rest over,
      makes it easier to read as well.
      
      No functional changes in this patch.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      d55e5f5b
  11. 18 Dec, 2019 12 commits
  12. 16 Dec, 2019 1 commit
    • Jens Axboe's avatar
      io_uring: fix sporadic -EFAULT from IORING_OP_RECVMSG · 0b416c3e
      Jens Axboe authored
      If we have to punt the recvmsg to async context, we copy all the
      context.  But since the iovec used can be either on-stack (if small) or
      dynamically allocated, if it's on-stack, then we need to ensure we reset
      the iov pointer. If we don't, then we're reusing old stack data, and
      that can lead to -EFAULTs if things get overwritten.
      
      Ensure we retain the right pointers for the iov, and free it as well if
      we end up having to go beyond UIO_FASTIOV number of vectors.
      
      Fixes: 03b1230c ("io_uring: ensure async punted sendmsg/recvmsg requests copy data")
      Reported-by: default avatar李通洲 <carter.li@eoitek.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      0b416c3e
  13. 15 Dec, 2019 1 commit
  14. 13 Dec, 2019 8 commits
    • Linus Torvalds's avatar
      Merge tag 'nios2-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 · e31736d9
      Linus Torvalds authored
      Pull nios2 fix from Ley Foon Tan:
       "Fix nios2 ioremap regression"
      
      * tag 'nios2-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
        nios2: Fix ioremap
      e31736d9
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 1482e664
      Linus Torvalds authored
      Pull Devicetree fixes from Rob Herring:
      
       - Fix for dependency tracking caused by unittest interaction
      
       - Fix some schema errors in Tegra memory controller schema
      
       - Update Maxime Ripard's email address
      
       - Review fixes to TI cpsw-switch
      
       - Add wakeup-source prop for STM32 rproc. Got dropped in the schema
         conversion.
      
      * tag 'devicetree-fixes-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        of/platform: Unconditionally pause/resume sync state during kernel init
        dt-bindings: memory-controllers: tegra: Fix type references
        dt-bindings: Change maintainer address
        dt-bindings: net: ti: cpsw-switch: update to fix comments
        dt-bindings: remoteproc: stm32: add wakeup-source property
      1482e664
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · dd79b536
      Linus Torvalds authored
      Pull virtio fixes from Michael Tsirkin:
       "Some fixes and cleanup patches"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio_balloon: divide/multiply instead of shifts
        virtio_balloon: name cleanups
        virtio-balloon: fix managed page counts when migrating pages between zones
      dd79b536
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 1d76c079
      Linus Torvalds authored
      Pull PCI fix from Bjorn Helgaas:
       "Fix rockchip outbound ATU issue that prevented Google Kevin
        Chromebooks from booting (Enric Balletbo i Serra)"
      
      * tag 'pci-v5.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: rockchip: Fix IO outbound ATU register number
      1d76c079
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 3b2ee614
      Linus Torvalds authored
      Pull i2c updates from Wolfram Sang:
      
       - removal of an old API where all in-kernel users have been converted
         as of this merge window.
      
       - a kdoc fix
      
       - a new helper that will make dependencies for the next API conversion
         a tad easier
      
      * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: add helper to check if a client has a driver attached
        i2c: fix header file kernel-doc warning
        i2c: remove i2c_new_dummy() API
      3b2ee614
    • Linus Torvalds's avatar
      Merge tag 'pm-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 6bd2c87a
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These add PM QoS support to devfreq and fix a few issues in that
        subsystem, fix two cpuidle issues and do one minor cleanup in there,
        and address an ACPI power management problem related to devices with
        special power management requirements, like fans.
      
        Specifics:
      
         - Add PM QoS support, based on the frequency QoS introduced during
           the 5.4 cycle, to devfreq (Leonard Crestez).
      
         - Fix some assorted devfreq issues (Leonard Crestez).
      
         - Fix an unintentional cpuidle behavior change (introduced during the
           5.4 cycle) related to the active polling time limit (Marcelo
           Tosatti).
      
         - Fix a recently introduced cpuidle helper function and do a minor
           cleanup in the cpuidle core (Rafael Wysocki).
      
         - Avoid adding devices with special power management requirements,
           like fans, to the generic ACPI PM domain (Rafael Wysocki)"
      
      * tag 'pm-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpuidle: Drop unnecessary type cast in cpuidle_poll_time()
        cpuidle: Fix cpuidle_driver_state_disabled()
        ACPI: PM: Avoid attaching ACPI PM domain to certain devices
        cpuidle: use first valid target residency as poll time
        PM / devfreq: Use PM QoS for sysfs min/max_freq
        PM / devfreq: Add PM QoS support
        PM / devfreq: Don't fail devfreq_dev_release if not in list
        PM / devfreq: Introduce get_freq_range helper
        PM / devfreq: Set scaling_max_freq to max on OPP notifier error
        PM / devfreq: Fix devfreq_notifier_call returning errno
      6bd2c87a
    • Linus Torvalds's avatar
      Merge tag 'sound-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · b61c5622
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A small collection of fixes.
      
        The main changes are fixes for a couple of regressions in AMD HD-audio
        and FireWire that were introduced in 5.5-rc1. The rest are small fixes
        for echoaudio and FireWire, as well as a usual Dell HD-audio fixup"
      
      * tag 'sound-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/realtek - Line-out jack doesn't work on a Dell AIO
        ALSA: hda/hdmi - Fix duplicate unref of pci_dev
        ALSA: fireface: fix return value in error path of isochronous resources reservation
        ALSA: oxfw: fix return value in error path of isochronous resources reservation
        ALSA: firewire-motu: fix double unlocked 'motu->mutex'
        ALSA: echoaudio: simplify get_audio_levels
      b61c5622
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2019-12-13' of git://anongit.freedesktop.org/drm/drm · b2cb931d
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Usual round of rc2 fixes.
      
        i915 and amdgpu leading the charge, but a few others in here,
        including some nouveau fixes, all seems pretty for rc2, but hey it's a
        Fri 13th pull so I'm sure it'll cause untold bad fortune.
      
        dma-buf:
         - memory leak fix
         - expand MAINTAINERS scope
      
        core:
         - fix mode matching for drivers not using picture_aspect_ratio
      
        nouveau:
         - panel scaling fix
         - MST BPC fix
         - atomic fixes
      
        i915:
         - GPU hang on idle transition
         - GLK+ FBC corruption fix
         - non-priv OA access on Tigerlake
         - HDCP state fix
         - CI found race fixes
      
        amdgpu:
         - renoir DC fixes
         - GFX8 fence flush alignment with userspace
         - Arcturus power profile fix
         - DC aux + i2c over aux fixes
         - GPUVM invalidation semaphore fixes
         - gfx10 golden registers update
      
        mgag200:
         - expand startadd fix
      
        panfrost:
         - devfreq fix
         - memory fixes
      
        mcde:
         - DSI pointer deref fix"
      
      * tag 'drm-fixes-2019-12-13' of git://anongit.freedesktop.org/drm/drm: (51 commits)
        drm/amdgpu: add invalidate semaphore limit for SRIOV in gmc10
        drm/amdgpu: add invalidate semaphore limit for SRIOV and picasso in gmc9
        drm/amdgpu: avoid using invalidate semaphore for picasso
        Revert "drm/amdgpu: dont schedule jobs while in reset"
        drm/amdgpu: fix license on Kconfig and Makefiles
        drm/amdgpu/gfx10: update gfx golden settings for navi14
        drm/amdgpu/gfx10: update gfx golden settings
        drm/amdgpu/gfx10: update gfx golden settings for navi14
        drm/amdgpu/gfx10: update gfx golden settings
        drm/i915: Serialise with remote retirement
        drm/amd/display: include linux/slab.h where needed
        drm/amd/display: fix undefined struct member reference
        drm/nouveau/kms/nv50-: fix panel scaling
        drm/nouveau/kms/nv50-: Limit MST BPC to 8
        drm/nouveau/kms/nv50-: Store the bpc we're using in nv50_head_atom
        drm/nouveau/kms/nv50-: Call outp_atomic_check_view() before handling PBN
        drm/nouveau: Fix drm-core using atomic code-paths on pre-nv50 hardware
        drm/nouveau: Move the declaration of struct nouveau_conn_atom up a bit
        drm/i915/gt: Detect if we miss WaIdleLiteRestore
        drm/i915/hdcp: Nuke intel_hdcp_transcoder_config()
        ...
      b2cb931d