1. 12 Apr, 2024 2 commits
  2. 11 Apr, 2024 1 commit
  3. 10 Apr, 2024 4 commits
    • Uros Bizjak's avatar
      locking/atomic/x86: Define arch_atomic_sub() family using arch_atomic_add() functions · 21689e4b
      Uros Bizjak authored
      There is no need to implement arch_atomic_sub() family of inline
      functions, corresponding macros can be directly implemented using
      arch_atomic_add() inlines with negated argument.
      
      No functional changes intended.
      Signed-off-by: default avatarUros Bizjak <ubizjak@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Link: https://lore.kernel.org/r/20240410062957.322614-4-ubizjak@gmail.com
      21689e4b
    • Uros Bizjak's avatar
      locking/atomic/x86: Rewrite x86_32 arch_atomic64_{,fetch}_{and,or,xor}() functions · 95ece481
      Uros Bizjak authored
      Rewrite x86_32 arch_atomic64_{,fetch}_{and,or,xor}() functions to
      use arch_atomic64_try_cmpxchg().  This implementation avoids one extra
      trip through the CMPXCHG loop.
      
      The value preload before the cmpxchg loop does not need to be atomic.
      Use arch_atomic64_read_nonatomic(v) to load the value from atomic_t
      location in a non-atomic way.
      
      The generated code improves from:
      
        1917d5:	31 c9                	xor    %ecx,%ecx
        1917d7:	31 db                	xor    %ebx,%ebx
        1917d9:	89 4c 24 3c          	mov    %ecx,0x3c(%esp)
        1917dd:	8b 74 24 24          	mov    0x24(%esp),%esi
        1917e1:	89 c8                	mov    %ecx,%eax
        1917e3:	89 5c 24 34          	mov    %ebx,0x34(%esp)
        1917e7:	8b 7c 24 28          	mov    0x28(%esp),%edi
        1917eb:	21 ce                	and    %ecx,%esi
        1917ed:	89 74 24 4c          	mov    %esi,0x4c(%esp)
        1917f1:	21 df                	and    %ebx,%edi
        1917f3:	89 de                	mov    %ebx,%esi
        1917f5:	89 7c 24 50          	mov    %edi,0x50(%esp)
        1917f9:	8b 54 24 4c          	mov    0x4c(%esp),%edx
        1917fd:	8b 7c 24 2c          	mov    0x2c(%esp),%edi
        191801:	8b 4c 24 50          	mov    0x50(%esp),%ecx
        191805:	89 d3                	mov    %edx,%ebx
        191807:	89 f2                	mov    %esi,%edx
        191809:	f0 0f c7 0f          	lock cmpxchg8b (%edi)
        19180d:	89 c1                	mov    %eax,%ecx
        19180f:	8b 74 24 34          	mov    0x34(%esp),%esi
        191813:	89 d3                	mov    %edx,%ebx
        191815:	89 44 24 4c          	mov    %eax,0x4c(%esp)
        191819:	8b 44 24 3c          	mov    0x3c(%esp),%eax
        19181d:	89 df                	mov    %ebx,%edi
        19181f:	89 54 24 44          	mov    %edx,0x44(%esp)
        191823:	89 ca                	mov    %ecx,%edx
        191825:	31 de                	xor    %ebx,%esi
        191827:	31 c8                	xor    %ecx,%eax
        191829:	09 f0                	or     %esi,%eax
        19182b:	75 ac                	jne    1917d9 <...>
      
      to:
      
        1912ba:	8b 06                	mov    (%esi),%eax
        1912bc:	8b 56 04             	mov    0x4(%esi),%edx
        1912bf:	89 44 24 3c          	mov    %eax,0x3c(%esp)
        1912c3:	89 c1                	mov    %eax,%ecx
        1912c5:	23 4c 24 34          	and    0x34(%esp),%ecx
        1912c9:	89 d3                	mov    %edx,%ebx
        1912cb:	23 5c 24 38          	and    0x38(%esp),%ebx
        1912cf:	89 54 24 40          	mov    %edx,0x40(%esp)
        1912d3:	89 4c 24 2c          	mov    %ecx,0x2c(%esp)
        1912d7:	89 5c 24 30          	mov    %ebx,0x30(%esp)
        1912db:	8b 5c 24 2c          	mov    0x2c(%esp),%ebx
        1912df:	8b 4c 24 30          	mov    0x30(%esp),%ecx
        1912e3:	f0 0f c7 0e          	lock cmpxchg8b (%esi)
        1912e7:	0f 85 f3 02 00 00    	jne    1915e0 <...>
      Signed-off-by: default avatarUros Bizjak <ubizjak@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Link: https://lore.kernel.org/r/20240410062957.322614-3-ubizjak@gmail.com
      95ece481
    • Uros Bizjak's avatar
      locking/atomic/x86: Introduce arch_atomic64_read_nonatomic() to x86_32 · e73c4e34
      Uros Bizjak authored
      Introduce arch_atomic64_read_nonatomic() for 32-bit targets to load
      the value from atomic64_t location in a non-atomic way. This
      function is intended to be used in cases where a subsequent atomic
      operation will handle the torn value, and can be used to prime the
      first iteration of unconditional try_cmpxchg() loops.
      Suggested-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarUros Bizjak <ubizjak@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Link: https://lore.kernel.org/r/20240410062957.322614-2-ubizjak@gmail.com
      e73c4e34
    • Uros Bizjak's avatar
      locking/atomic/x86: Introduce arch_atomic64_try_cmpxchg() to x86_32 · 276b8930
      Uros Bizjak authored
      Introduce arch_atomic64_try_cmpxchg() for 32-bit targets to use
      optimized target specific implementation instead of a generic one.
      This implementation eliminates dual-word compare after
      cmpxchg8b instruction and improves generated asm code from:
      
          2273:	f0 0f c7 0f          	lock cmpxchg8b (%edi)
          2277:	8b 74 24 2c          	mov    0x2c(%esp),%esi
          227b:	89 d3                	mov    %edx,%ebx
          227d:	89 c2                	mov    %eax,%edx
          227f:	89 5c 24 10          	mov    %ebx,0x10(%esp)
          2283:	8b 7c 24 30          	mov    0x30(%esp),%edi
          2287:	89 44 24 1c          	mov    %eax,0x1c(%esp)
          228b:	31 f2                	xor    %esi,%edx
          228d:	89 d0                	mov    %edx,%eax
          228f:	89 da                	mov    %ebx,%edx
          2291:	31 fa                	xor    %edi,%edx
          2293:	09 d0                	or     %edx,%eax
          2295:	0f 85 a5 00 00 00    	jne    2340 <...>
      
      to:
      
          2270:	f0 0f c7 0f          	lock cmpxchg8b (%edi)
          2274:	0f 85 a6 00 00 00    	jne    2320 <...>
      Signed-off-by: default avatarUros Bizjak <ubizjak@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Link: https://lore.kernel.org/r/20240410062957.322614-1-ubizjak@gmail.com
      276b8930
  4. 09 Apr, 2024 4 commits
  5. 07 Apr, 2024 4 commits
  6. 06 Apr, 2024 13 commits
  7. 05 Apr, 2024 12 commits
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.9-20240405' of git://git.kernel.dk/linux · 4f72ed49
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Backport of some fixes that came up during development of the 6.10
         io_uring patches. This includes some kbuf cleanups and reference
         fixes.
      
       - Disable multishot read if we don't have NOWAIT support on the target
      
       - Fix for a dependency issue with workqueue flushing
      
      * tag 'io_uring-6.9-20240405' of git://git.kernel.dk/linux:
        io_uring/kbuf: hold io_buffer_list reference over mmap
        io_uring/kbuf: protect io_buffer_list teardown with a reference
        io_uring/kbuf: get rid of bl->is_ready
        io_uring/kbuf: get rid of lower BGID lists
        io_uring: use private workqueue for exit work
        io_uring: disable io-wq execution of multishot NOWAIT requests
        io_uring/rw: don't allow multishot reads without NOWAIT support
      4f72ed49
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 4de2ff26
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "The most important is the libsas fix, which is a problem for DMA to a
        kmalloc'd structure too small causing cache line interference. The
        other fixes (all in drivers) are mostly for allocation length fixes,
        error leg unwinding, suspend races and a missing retry"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ufs: core: Fix MCQ mode dev command timeout
        scsi: libsas: Align SMP request allocation to ARCH_DMA_MINALIGN
        scsi: sd: Unregister device if device_add_disk() failed in sd_probe()
        scsi: ufs: core: WLUN suspend dev/link state error recovery
        scsi: mylex: Fix sysfs buffer lengths
      4de2ff26
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 84985eb2
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Fix NIOS2 boot with external DTB
      
       - Add missing synchronization needed between fw_devlink and DT overlay
         removals
      
       - Fix some unit-address regex's to be hex only
      
       - Drop some 10+ year old "unstable binding" statements
      
       - Add new SoCs to QCom UFS binding
      
       - Add TPM bindings to TPM maintainers
      
      * tag 'devicetree-fixes-for-6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        nios2: Only use built-in devicetree blob if configured to do so
        dt-bindings: timer: narrow regex for unit address to hex numbers
        dt-bindings: soc: fsl: narrow regex for unit address to hex numbers
        dt-bindings: remoteproc: ti,davinci: remove unstable remark
        dt-bindings: clock: ti: remove unstable remark
        dt-bindings: clock: keystone: remove unstable remark
        of: module: prevent NULL pointer dereference in vsnprintf()
        dt-bindings: ufs: qcom: document SM6125 UFS
        dt-bindings: ufs: qcom: document SC7180 UFS
        dt-bindings: ufs: qcom: document SC8180X UFS
        of: dynamic: Synchronize of_changeset_destroy() with the devlink removals
        driver core: Introduce device_link_wait_removal()
        docs: dt-bindings: add missing address/size-cells to example
        MAINTAINERS: Add TPM DT bindings to TPM maintainers
      84985eb2
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2024-04-05-11-30' of... · af709adf
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2024-04-05-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "8 hotfixes, 3 are cc:stable
      
        There are a couple of fixups for this cycle's vmalloc changes and one
        for the stackdepot changes. And a fix for a very old x86 PAT issue
        which can cause a warning splat"
      
      * tag 'mm-hotfixes-stable-2024-04-05-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        stackdepot: rename pool_index to pool_index_plus_1
        x86/mm/pat: fix VM_PAT handling in COW mappings
        MAINTAINERS: change vmware.com addresses to broadcom.com
        selftests/mm: include strings.h for ffsl
        mm: vmalloc: fix lockdep warning
        mm: vmalloc: bail out early in find_vmap_area() if vmap is not init
        init: open output files from cpio unpacking with O_LARGEFILE
        mm/secretmem: fix GUP-fast succeeding on secretmem folios
      af709adf
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · c7830236
      Linus Torvalds authored
      Pull arm64 fix from Catalin Marinas:
       "arm64/ptrace fix to use the correct SVE layout based on the saved
        floating point state rather than the TIF_SVE flag. The latter may be
        left on during syscalls even if the SVE state is discarded"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64/ptrace: Use saved floating point state type to determine SVE layout
      c7830236
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 261b8e89
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - A fix for an __{get,put}_kernel_nofault to avoid an uninitialized
         value causing spurious failures
      
       - compat_vdso.so.dbg is now installed to the standard install location
      
       - A fix to avoid initializing PERF_SAMPLE_BRANCH_*-related events, as
         they aren't supported and will just later fail
      
       - A fix to make AT_VECTOR_SIZE_ARCH correct now that we're providing
         AT_MINSIGSTKSZ
      
       - pgprot_nx() is now implemented, which fixes vmap W^X protection
      
       - A fix for the vector save/restore code, which at least manifests as
         corrupted vector state when a signal is taken
      
       - A fix for a race condition in instruction patching
      
       - A fix to avoid leaking the kernel-mode GP to userspace, which is a
         kernel pointer leak that can be used to defeat KASLR in various ways
      
       - A handful of smaller fixes to build warnings, an overzealous printk,
         and some missing tracing annotations
      
      * tag 'riscv-for-linus-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: process: Fix kernel gp leakage
        riscv: Disable preemption when using patch_map()
        riscv: Fix warning by declaring arch_cpu_idle() as noinstr
        riscv: use KERN_INFO in do_trap
        riscv: Fix vector state restore in rt_sigreturn()
        riscv: mm: implement pgprot_nx
        riscv: compat_vdso: align VDSOAS build log
        RISC-V: Update AT_VECTOR_SIZE_ARCH for new AT_MINSIGSTKSZ
        riscv: Mark __se_sys_* functions __used
        drivers/perf: riscv: Disable PERF_SAMPLE_BRANCH_* while not supported
        riscv: compat_vdso: install compat_vdso.so.dbg to /lib/modules/*/vdso/
        riscv: hwprobe: do not produce frtace relocation
        riscv: Fix spurious errors from __get/put_kernel_nofault
        riscv: mm: Fix prototype to avoid discarding const
      261b8e89
    • Linus Torvalds's avatar
      Merge tag 's390-6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 50094473
      Linus Torvalds authored
      Pull s390 fixes from Alexander Gordeev:
      
       - Fix missing NULL pointer check when determining guest/host fault
      
       - Mark all functions in asm/atomic_ops.h, asm/atomic.h and
         asm/preempt.h as __always_inline to avoid unwanted instrumentation
      
       - Fix removal of a Processor Activity Instrumentation (PAI) sampling
         event in PMU device driver
      
       - Align system call table on 8 bytes
      
      * tag 's390-6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/entry: align system call table on 8 bytes
        s390/pai: fix sampling event removal for PMU device driver
        s390/preempt: mark all functions __always_inline
        s390/atomic: mark all functions __always_inline
        s390/mm: fix NULL pointer dereference
      50094473
    • Linus Torvalds's avatar
      Merge tag 'pm-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 2f9fd9e4
      Linus Torvalds authored
      Pull power management fix from Rafael Wysocki:
       "Fix a recent Energy Model change that went against a recent scheduler
        change made independently (Vincent Guittot)"
      
      * tag 'pm-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM: EM: fix wrong utilization estimation in em_cpu_energy()
      2f9fd9e4
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · b21defcb
      Linus Torvalds authored
      Pull thermal control fixes from Rafael Wysocki:
       "These fix two power allocator thermal governor issues and an ACPI
        thermal driver regression that all were introduced during the 6.8
        development cycle.
      
        Specifics:
      
         - Allow the power allocator thermal governor to bind to a thermal
           zone without cooling devices and/or without trip points (Nikita
           Travkin)
      
         - Make the ACPI thermal driver register a tripless thermal zone when
           it cannot find any usable trip points instead of returning an error
           from acpi_thermal_add() (Stephen Horvath)"
      
      * tag 'thermal-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: gov_power_allocator: Allow binding without trip points
        thermal: gov_power_allocator: Allow binding without cooling devices
        ACPI: thermal: Register thermal zones without valid trip points
      b21defcb
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 2e69af16
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - make sure GPIO devices are registered with the subsystem before
         trying to return them to a caller of gpio_device_find()
      
       - fix two issues with incorrect sanitization of the interrupt labels
      
      * tag 'gpio-fixes-for-v6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: cdev: fix missed label sanitizing in debounce_setup()
        gpio: cdev: check for NULL labels when sanitizing them for irqs
        gpiolib: Fix triggering "kobject: 'gpiochipX' is not initialized, yet" kobject_get() errors
      2e69af16
    • Linus Torvalds's avatar
      Merge tag 'ata-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux · 4c3fc345
      Linus Torvalds authored
      Pull ata fixes from Damien Le Moal:
      
       - Compilation warning fixes from Arnd: one in the sata_sx4 driver due
         to an incorrect calculation of the parameters passed to memcpy() and
         another one in the sata_mv driver when CONFIG_PCI is not set
      
       - Drop the owner driver field assignment in the pata_macio driver. That
         is not needed as the PCI core code does that already (Krzysztof)
      
       - Remove an unusued field in struct st_ahci_drv_data of the ahci_st
         driver (Christophe)
      
       - Add a missing clock probe error check in the sata_gemini driver
         (Chen)
      
      * tag 'ata-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
        ata: sata_gemini: Check clk_enable() result
        ata: sata_mv: Fix PCI device ID table declaration compilation warning
        ata: ahci_st: Remove an unused field in struct st_ahci_drv_data
        ata: pata_macio: drop driver owner assignment
        ata: sata_sx4: fix pdc20621_get_from_dimm() on 64-bit
      4c3fc345
    • Linus Torvalds's avatar
      Merge tag 'sound-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · c42881d4
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "This became a bit bigger collection of patches, but almost all are
        about device-specific fixes, and should be safe for 6.9:
      
         - Lots of ASoC Intel SOF-related fixes/updates
      
         - Locking fixes in SoundWire drivers
      
         - ASoC AMD ACP/SOF updates
      
         - ASoC ES8326 codec fixes
      
         - HD-audio codec fixes and quirks
      
         - A regression fix in emu10k1 synth code"
      
      * tag 'sound-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (49 commits)
        ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path
        ASoC: SOF: amd: fix for false dsp interrupts
        ASoC: SOF: Intel: lnl: Disable DMIC/SSP offload on remove
        ASoC: Intel: avs: boards: Add modules description
        ASoC: codecs: ES8326: Removing the control of ADC_SCALE
        ASoC: codecs: ES8326: Solve a headphone detection issue after suspend and resume
        ASoC: codecs: ES8326: modify clock table
        ASoC: codecs: ES8326: Solve error interruption issue
        ALSA: line6: Zero-initialize message buffers
        ALSA: hda/realtek: cs35l41: Support ASUS ROG G634JYR
        ALSA: hda/realtek: Update Panasonic CF-SZ6 quirk to support headset with microphone
        ALSA: hda/realtek: Add sound quirks for Lenovo Legion slim 7 16ARHA7 models
        Revert "ALSA: emu10k1: fix synthesizer sample playback position and caching"
        OSS: dmasound/paula: Mark driver struct with __refdata to prevent section mismatch
        ALSA: hda/realtek: Add quirks for ASUS Laptops using CS35L56
        ASoC: amd: acp: fix for acp_init function error handling
        ASoC: tas2781: mark dvc_tlv with __maybe_unused
        ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw
        ASoC: rt-sdw*: add __func__ to all error logs
        ASoC: rt722-sdca-sdw: fix locking sequence
        ...
      c42881d4