1. 12 Aug, 2022 4 commits
  2. 11 Aug, 2022 26 commits
  3. 10 Aug, 2022 2 commits
    • Palmer Dabbelt's avatar
      RISC-V: Canaan devicetree fixes · 8f2f74b4
      Palmer Dabbelt authored
      This series should rid us of dtbs_check errors for the RISC-V Canaan
      k210 based boards. To make keeping it that way a little easier, I
      changed the Canaan devicetree Makefile so that it would build all of the
      devicetrees in the directory if SOC_CANAAN.
      
      Link: https://lore.kernel.org/all/mhng-85044754-c361-40bc-a6a2-7082f35930bb@palmer-ri-x1c9/
      
      * remotes/palmer/riscv-canaan_dt_schema:
        riscv: dts: canaan: build all devicetress if SOC_CANAAN
        riscv: dts: canaan: add specific compatible for kd233's LCD
        riscv: dts: canaan: fix bus {ranges,reg} warnings
        riscv: dts: canaan: remove spi-max-frequency from controllers
        riscv: dts: canaan: use custom compatible for k210 i2s
        riscv: dts: canaan: fix kd233 display spi frequency
        riscv: dts: canaan: fix mmc node names
        riscv: dts: canaan: fix the k210's timer nodes
        riscv: dts: canaan: fix the k210's memory node
        dt-bindings: memory-controllers: add canaan k210 sram controller
        dt-bindings: display: ili9341: document canaan kd233's lcd
        dt-bindings: display: convert ilitek,ili9341.txt to dt-schema
      8f2f74b4
    • Chen Lifu's avatar
      riscv: lib: uaccess: fix CSR_STATUS SR_SUM bit · c08b4848
      Chen Lifu authored
      Since commit 5d8544e2 ("RISC-V: Generic library routines and assembly")
      and commit ebcbd75e ("riscv: Fix the bug in memory access fixup code"),
      if __clear_user and __copy_user return from an fixup branch,
      CSR_STATUS SR_SUM bit will be set, it is a vulnerability, so that
      S-mode memory accesses to pages that are accessible by U-mode will success.
      Disable S-mode access to U-mode memory should clear SR_SUM bit.
      
      Fixes: 5d8544e2 ("RISC-V: Generic library routines and assembly")
      Fixes: ebcbd75e ("riscv: Fix the bug in memory access fixup code")
      Signed-off-by: default avatarChen Lifu <chenlifu@huawei.com>
      Reviewed-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Link: https://lore.kernel.org/r/20220615014714.1650349-1-chenlifu@huawei.com
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      c08b4848
  4. 06 Aug, 2022 8 commits
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.20-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 4d1044fc
      Linus Torvalds authored
      Pull RISC-V updates from Palmer Dabbelt:
      
       - Enabling the FPU is now a static_key
      
       - Improvements to the Svpbmt support
      
       - CPU topology bindings for a handful of systems
      
       - Support for systems with 64-bit hart IDs
      
       - Many settings have been enabled in the defconfig, including both
         support for the StarFive systems and many of the Docker requirements
      
      There are also a handful of cleanups and improvements, as usual.
      
      * tag 'riscv-for-linus-5.20-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (28 commits)
        riscv: enable Docker requirements in defconfig
        riscv: convert the t-head pbmt errata to use the __nops macro
        riscv: introduce nops and __nops macros for NOP sequences
        RISC-V: Add fast call path of crash_kexec()
        riscv: mmap with PROT_WRITE but no PROT_READ is invalid
        riscv/efi_stub: Add 64bit boot-hartid support on RV64
        riscv: cpu: Add 64bit hartid support on RV64
        riscv: smp: Add 64bit hartid support on RV64
        riscv: spinwait: Fix hartid variable type
        riscv: cpu_ops_sbi: Add 64bit hartid support on RV64
        riscv: dts: sifive: "fix" pmic watchdog node name
        riscv: dts: canaan: Add k210 topology information
        riscv: dts: sifive: Add fu740 topology information
        riscv: dts: sifive: Add fu540 topology information
        riscv: dts: starfive: Add JH7100 CPU topology
        RISC-V: Add CONFIG_{NON,}PORTABLE
        riscv: config: enable SOC_STARFIVE in defconfig
        riscv: dts: microchip: Add mpfs' topology information
        riscv: Kconfig.socs: Add comments
        riscv: Kconfig.erratas: Add comments
        ...
      4d1044fc
    • Linus Torvalds's avatar
      Merge tag '9p-for-5.20' of https://github.com/martinetd/linux · ea0c3926
      Linus Torvalds authored
      Pull 9p updates from Dominique Martinet:
      
       - a couple of fixes
      
       - add a tracepoint for fid refcounting
      
       - some cleanup/followup on fid lookup
      
       - some cleanup around req refcounting
      
      * tag '9p-for-5.20' of https://github.com/martinetd/linux:
        net/9p: Initialize the iounit field during fid creation
        net: 9p: fix refcount leak in p9_read_work() error handling
        9p: roll p9_tag_remove into p9_req_put
        9p: Add client parameter to p9_req_put()
        9p: Drop kref usage
        9p: Fix some kernel-doc comments
        9p fid refcount: cleanup p9_fid_put calls
        9p fid refcount: add a 9p_fid_ref tracepoint
        9p fid refcount: add p9_fid_get/put wrappers
        9p: Fix minor typo in code comment
        9p: Remove unnecessary variable for old fids while walking from d_parent
        9p: Make the path walk logic more clear about when cloning is required
        9p: Track the root fid with its own variable during lookups
      ea0c3926
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v5.19-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · c42b729e
      Linus Torvalds authored
      Pull gfs2 updates from Andreas Gruenbacher:
      
       - Instantiate glocks ouside of the glock state engine, in the contect
         of the process taking the glock. This moves unnecessary complexity
         out of the core glock code. Clean up the instantiate logic to be more
         sensible.
      
       - In gfs2_glock_async_wait(), cancel pending locking request upon
         failure. Make sure all glocks are left in a consistent state.
      
       - Various other minor cleanups and fixes.
      
      * tag 'gfs2-v5.19-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: List traversal in do_promote is safe
        gfs2: do_promote glock holder stealing fix
        gfs2: Use better variable name
        gfs2: Make go_instantiate take a glock
        gfs2: Add new go_held glock operation
        gfs2: Revert 'Fix "truncate in progress" hang'
        gfs2: Instantiate glocks ouside of glock state engine
        gfs2: Fix up gfs2_glock_async_wait
        gfs2: Minor gfs2_glock_nq_m cleanup
        gfs2: Fix spelling mistake in comment
        gfs2: Rewrap overlong comment in do_promote
        gfs2: Remove redundant NULL check before kfree
      c42b729e
    • Linus Torvalds's avatar
      Revert "iommu/dma: Add config for PCI SAC address trick" · af3e9579
      Linus Torvalds authored
      This reverts commit 4bf7fda4.
      
      It turns out that it was hopelessly naive to think that this would work,
      considering that we've always done this.  The first machine I actually
      tested this on broke at bootup, getting to
      
          Reached target cryptsetup.target - Local Encrypted Volumes.
      
      and then hanging.  It's unclear what actually fails, since there's a lot
      else going on around that time (eg amdgpu probing also happens around
      that same time, but it could be some other random init thing that didn't
      complete earlier and just caused the boot to hang at that point).
      
      The expectations that we should default to some unsafe and untested mode
      seems entirely unfounded, and the belief that this wouldn't affect
      modern systems is clearly entirely false.  The machine in question is
      about two years old, so it's not exactly shiny, but it's also not some
      dusty old museum piece PDP-11 in a closet.
      
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      af3e9579
    • Linus Torvalds's avatar
      Merge tag 'for-6.0/dm-changes-2' of... · 20cf903a
      Linus Torvalds authored
      Merge tag 'for-6.0/dm-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull more device mapper updates from Mike Snitzer:
      
       - Add flags argument to dm_bufio_client_create and introduce
         DM_BUFIO_CLIENT_NO_SLEEP flag to have dm-bufio use spinlock rather
         than mutex for its locking.
      
       - Add optional "try_verify_in_tasklet" feature to DM verity target.
         This feature gives users the option to improve IO latency by using a
         tasklet to verify, using hashes in bufio's cache, rather than wait to
         schedule a work item via workqueue. But if there is a bufio cache
         miss, or an error, then the tasklet will fallback to using workqueue.
      
       - Incremental changes to both dm-bufio and the DM verity target to use
         jump_label to minimize cost of branching associated with the niche
         "try_verify_in_tasklet" feature. DM-bufio in particular is used by
         quite a few other DM targets so it doesn't make sense to incur
         additional bufio cost in those targets purely for the benefit of this
         niche verity feature if the feature isn't ever used.
      
       - Optimize verity_verify_io, which is used by both workqueue and
         tasklet based verification, if FEC is not configured or tasklet based
         verification isn't used.
      
       - Remove DM verity target's verify_wq's use of the WQ_CPU_INTENSIVE
         flag since it uses WQ_UNBOUND. Also, use the WQ_HIGHPRI flag if
         "try_verify_in_tasklet" is specified.
      
      * tag 'for-6.0/dm-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm verity: have verify_wq use WQ_HIGHPRI if "try_verify_in_tasklet"
        dm verity: remove WQ_CPU_INTENSIVE flag since using WQ_UNBOUND
        dm verity: only copy bvec_iter in verity_verify_io if in_tasklet
        dm verity: optimize verity_verify_io if FEC not configured
        dm verity: conditionally enable branching for "try_verify_in_tasklet"
        dm bufio: conditionally enable branching for DM_BUFIO_CLIENT_NO_SLEEP
        dm verity: allow optional args to alter primary args handling
        dm verity: Add optional "try_verify_in_tasklet" feature
        dm bufio: Add DM_BUFIO_CLIENT_NO_SLEEP flag
        dm bufio: Add flags argument to dm_bufio_client_create
      20cf903a
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-5.20-2022-08-06' of git://git.infradead.org/users/hch/dma-mapping · c993e07b
      Linus Torvalds authored
      Pull dma-mapping updates from Christoph Hellwig:
      
       - convert arm32 to the common dma-direct code (Arnd Bergmann, Robin
         Murphy, Christoph Hellwig)
      
       - restructure the PCIe peer to peer mapping support (Logan Gunthorpe)
      
       - allow the IOMMU code to communicate an optional DMA mapping length
         and use that in scsi and libata (John Garry)
      
       - split the global swiotlb lock (Tianyu Lan)
      
       - various fixes and cleanup (Chao Gao, Dan Carpenter, Dongli Zhang,
         Lukas Bulwahn, Robin Murphy)
      
      * tag 'dma-mapping-5.20-2022-08-06' of git://git.infradead.org/users/hch/dma-mapping: (45 commits)
        swiotlb: fix passing local variable to debugfs_create_ulong()
        dma-mapping: reformat comment to suppress htmldoc warning
        PCI/P2PDMA: Remove pci_p2pdma_[un]map_sg()
        RDMA/rw: drop pci_p2pdma_[un]map_sg()
        RDMA/core: introduce ib_dma_pci_p2p_dma_supported()
        nvme-pci: convert to using dma_map_sgtable()
        nvme-pci: check DMA ops when indicating support for PCI P2PDMA
        iommu/dma: support PCI P2PDMA pages in dma-iommu map_sg
        iommu: Explicitly skip bus address marked segments in __iommu_map_sg()
        dma-mapping: add flags to dma_map_ops to indicate PCI P2PDMA support
        dma-direct: support PCI P2PDMA pages in dma-direct map_sg
        dma-mapping: allow EREMOTEIO return code for P2PDMA transfers
        PCI/P2PDMA: Introduce helpers for dma_map_sg implementations
        PCI/P2PDMA: Attempt to set map_type if it has not been set
        lib/scatterlist: add flag for indicating P2PDMA segments in an SGL
        swiotlb: clean up some coding style and minor issues
        dma-mapping: update comment after dmabounce removal
        scsi: sd: Add a comment about limiting max_sectors to shost optimal limit
        ata: libata-scsi: cap ata_device->max_sectors according to shost->max_sectors
        scsi: scsi_transport_sas: cap shost opt_sectors according to DMA optimal limit
        ...
      c993e07b
    • Linus Torvalds's avatar
      Merge tag 'iommu-updates-v5.20-or-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 1d239c1e
      Linus Torvalds authored
      Pull iommu updates from Joerg Roedel:
      
       - The most intrusive patch is small and changes the default allocation
         policy for DMA addresses.
      
         Before the change the allocator tried its best to find an address in
         the first 4GB. But that lead to performance problems when that space
         gets exhaused, and since most devices are capable of 64-bit DMA these
         days, we changed it to search in the full DMA-mask range from the
         beginning.
      
         This change has the potential to uncover bugs elsewhere, in the
         kernel or the hardware. There is a Kconfig option and a command line
         option to restore the old behavior, but none of them is enabled by
         default.
      
       - Add Robin Murphy as reviewer of IOMMU code and maintainer for the
         dma-iommu and iova code
      
       - Chaning IOVA magazine size from 1032 to 1024 bytes to save memory
      
       - Some core code cleanups and dead-code removal
      
       - Support for ACPI IORT RMR node
      
       - Support for multiple PCI domains in the AMD-Vi driver
      
       - ARM SMMU changes from Will Deacon:
            - Add even more Qualcomm device-tree compatible strings
            - Support dumping of IMP DEF Qualcomm registers on TLB sync
              timeout
            - Fix reference count leak on device tree node in Qualcomm driver
      
       - Intel VT-d driver updates from Lu Baolu:
            - Make intel-iommu.h private
            - Optimize the use of two locks
            - Extend the driver to support large-scale platforms
            - Cleanup some dead code
      
       - MediaTek IOMMU refactoring and support for TTBR up to 35bit
      
       - Basic support for Exynos SysMMU v7
      
       - VirtIO IOMMU driver gets a map/unmap_pages() implementation
      
       - Other smaller cleanups and fixes
      
      * tag 'iommu-updates-v5.20-or-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (116 commits)
        iommu/amd: Fix compile warning in init code
        iommu/amd: Add support for AVIC when SNP is enabled
        iommu/amd: Simplify and Consolidate Virtual APIC (AVIC) Enablement
        ACPI/IORT: Fix build error implicit-function-declaration
        drivers: iommu: fix clang -wformat warning
        iommu/arm-smmu: qcom_iommu: Add of_node_put() when breaking out of loop
        iommu/arm-smmu-qcom: Add SM6375 SMMU compatible
        dt-bindings: arm-smmu: Add compatible for Qualcomm SM6375
        MAINTAINERS: Add Robin Murphy as IOMMU SUBSYTEM reviewer
        iommu/amd: Do not support IOMMUv2 APIs when SNP is enabled
        iommu/amd: Do not support IOMMU_DOMAIN_IDENTITY after SNP is enabled
        iommu/amd: Set translation valid bit only when IO page tables are in use
        iommu/amd: Introduce function to check and enable SNP
        iommu/amd: Globally detect SNP support
        iommu/amd: Process all IVHDs before enabling IOMMU features
        iommu/amd: Introduce global variable for storing common EFR and EFR2
        iommu/amd: Introduce Support for Extended Feature 2 Register
        iommu/amd: Change macro for IOMMU control register bit shift to decimal value
        iommu/exynos: Enable default VM instance on SysMMU v7
        iommu/exynos: Add SysMMU v7 register set
        ...
      1d239c1e
    • Linus Torvalds's avatar
      Merge tag 'backlight-next-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight · 75b9fcb5
      Linus Torvalds authored
      Pull backlight updates from Lee Jones:
       "Core Framework:
         - Change maintainer email address
      
        Fix-ups:
         - Obtain OCP level from Device Tree; rt4831-backlight
         - DT fix-ups/conversions; richtek,rt4831-backlight
         - Remove unused code / functionatlity; platform_lcd
         - Switch to atomic PWM API; lp855x_bl
      
      * tag 'backlight-next-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
        MAINTAINERS: Use Lee Jones' kernel.org address for Backlight submissions
        backlight: lp855x: Switch to atomic PWM API
        dt-bindings: backlight: Update Lee Jones' email address
        Revert "drivers/video/backlight/platform_lcd.c: add support for device tree based probe"
        backlight: rt4831: Apply ocp level from devicetree
        dt-bindings: backlight: rt4831: Add the new ocp level property
      75b9fcb5