1. 14 Nov, 2022 1 commit
  2. 02 Nov, 2022 1 commit
    • Arnd Bergmann's avatar
      Merge tag 'memory-controller-drv-6.2' of... · 9e549c76
      Arnd Bergmann authored
      Merge tag 'memory-controller-drv-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers
      
      Memory controller drivers for v6.2
      
      1. STM32 FMC2:
         a. Correct in bindings the name of property for address
            setup duration. The DTS and driver were already using proper name,
            so it is only alignment of bindings with real usage.
         b. Split off STM32 memory controller bus peripheral properties into
            generic ones (re-usable by multiple memory controllers) and STM32 bus
            peripheral.  This way, the FMC2 controller properties in Micrel
            KSZ8851MLL ethernet controller node can be properly validated.
      
      2. Tegra MC: simplify with DEFINE_SHOW_ATTRIBUTE.
      
      3. Renesas RPC IF: add suppor tfor R-Car Gen4.
      
      4. LPDDR bindings: refactor and extend with description of DDR channels.
         Add also bindings for LPDDR4 and LPDDR5.
      
      The rationale for (4) above - LPDDR bindings changes, wrote by Julius Werner:
      
      "We (Chromium OS) have been trying to find a way to pass LPDDR memory
      chip information that is available to the firmware through the FDT
      (mostly for userspace informational purposes, for now). We have been
      using and expanding the existing "jedec,lpddr2" and "jedec,lpddr3"
      bindings for this (e.g. [1]). The goal is to be able to identify the
      memory layout of the system (how the parts look like, how they're tied
      together, how much capacity there is in total) as accurately as
      possible from software-probed values.
      
      ...
      
      The problem with this is that each individual LPDDR chip has its own
      set of mode registers (per rank) that only describe the density of
      that particular chip (rank). The host memory controller may have
      multiple channels (each of which is basically an entirely separate set
      of physical LPDDR pins on the board), a single channel may be
      connected to multiple LPDDR chips (e.g. if the memory controller has
      an outgoing 32-bit channel, that channel could be tied to two 16-bit
      LPDDR chips by tying the low 16 bits to one and the high 16 bits to
      the other), and then each of those chips may offer multiple
      independent ranks (which rank is being accessed at a given time is
      controlled by a separate chip select pin).
      
      So if we just have one "io-width" and one "density" field in the FDT,
      there's no way to figure out how much memory there's actually
      connected in total, because that only describes a single LPDDR chip.
      Worse, there may be chips where different ranks have different
      densities (e.g. a 6GB dual-rank chip with one 4GB and one 2GB rank),
      and different channels could theoretically be connected to chips of
      completely different manufacturers."
      
      Link: https://lore.kernel.org/r/CAODwPW9E8wWwxbYKyf4_-JFb4F-JSmLR3qOF_iudjX0f9ndF0A@mail.gmail.com
      
      * tag 'memory-controller-drv-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
        dt-bindings: memory-controller: st,stm32: Split off MC properties
        dt-bindings: memory: Add jedec,lpddrX-channel binding
        dt-bindings: memory: Add jedec,lpddr4 and jedec,lpddr5 bindings
        dt-bindings: memory: Add numeric LPDDR compatible string variant
        dt-bindings: memory: Factor out common properties of LPDDR bindings
        memory: renesas-rpc-if: Add support for R-Car Gen4
        memory: renesas-rpc-if: Clear HS bit during hardware initialization
        dt-bindings: memory: renesas,rpc-if: Document R-Car V4H support
        memory: tegra186-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
        memory: tegra210-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
        memory: tegra30-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
        memory: tegra20-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
        dt-bindings: memory-controller: st,stm32: Fix st,fmc2_ebi-cs-write-address-setup-ns
      
      Link: https://lore.kernel.org/r/20221026171354.51877-1-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      9e549c76
  3. 01 Nov, 2022 1 commit
    • Linus Walleij's avatar
      soc: fsl: qe: Avoid using gpio_to_desc() · 84582f9e
      Linus Walleij authored
      The qe gpio driver is a custom API combined GPIO and pin control
      driver that exist outside of the pin control subsystem for historical
      reasons.
      
      We want to get rid of the old GPIO numberspace, so instead of
      calling gpio_to_desc() we get the gpio descriptor for the requested
      line from the device tree directly without passing through the
      GPIO numberspace, and then we get the gpiochip from the descriptor.
      
      Using the reference counting inside the gpio descriptor we can drop
      the reference counting code in this driver. A second gpiod_get()
      will not succeed.
      
      To obtain the local hardware offset of the GPIO line, the driver
      need to include the header from the gpiolib internals. This isn't
      pretty but it is the lesser evil compared to keeping the code
      as a roadblock to gpiolib refactoring. A proper solution would be
      to rewrite the driver as a real pin control driver with a
      built-in gpio_chip.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <brgl@bgdev.pl>
      Cc: linux-gpio@vger.kernel.org
      Link: https://lore.kernel.org/r/20221027081108.174662-1-linus.walleij@linaro.org'
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      84582f9e
  4. 23 Oct, 2022 9 commits
  5. 22 Oct, 2022 21 commits
  6. 21 Oct, 2022 7 commits
    • Linus Torvalds's avatar
      Merge tag '6.1-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · bd8e9634
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
      
       - memory leak fixes
      
       - fixes for directory leases, including an important one which fixes a
         problem noticed by git functional tests
      
       - fixes relating to missing free_xid calls (helpful for
         tracing/debugging of entry/exit into cifs.ko)
      
       - a multichannel fix
      
       - a small cleanup fix (use of list_move instead of list_del/list_add)
      
      * tag '6.1-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: update internal module number
        cifs: fix memory leaks in session setup
        cifs: drop the lease for cached directories on rmdir or rename
        smb3: interface count displayed incorrectly
        cifs: Fix memory leak when build ntlmssp negotiate blob failed
        cifs: set rc to -ENOENT if we can not get a dentry for the cached dir
        cifs: use LIST_HEAD() and list_move() to simplify code
        cifs: Fix xid leak in cifs_get_file_info_unix()
        cifs: Fix xid leak in cifs_ses_add_channel()
        cifs: Fix xid leak in cifs_flock()
        cifs: Fix xid leak in cifs_copy_file_range()
        cifs: Fix xid leak in cifs_create()
      bd8e9634
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · 022c028f
      Linus Torvalds authored
      Pull nfsd fixes from Chuck Lever:
       "Fixes for patches merged in v6.1"
      
      * tag 'nfsd-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        nfsd: ensure we always call fh_verify_error tracepoint
        NFSD: unregister shrinker when nfsd_init_net() fails
      022c028f
    • Chang S. Bae's avatar
      x86/fpu: Fix copy_xstate_to_uabi() to copy init states correctly · 471f0aa7
      Chang S. Bae authored
      When an extended state component is not present in fpstate, but in init
      state, the function copies from init_fpstate via copy_feature().
      
      But, dynamic states are not present in init_fpstate because of all-zeros
      init states. Then retrieving them from init_fpstate will explode like this:
      
       BUG: kernel NULL pointer dereference, address: 0000000000000000
       ...
       RIP: 0010:memcpy_erms+0x6/0x10
        ? __copy_xstate_to_uabi_buf+0x381/0x870
        fpu_copy_guest_fpstate_to_uabi+0x28/0x80
        kvm_arch_vcpu_ioctl+0x14c/0x1460 [kvm]
        ? __this_cpu_preempt_check+0x13/0x20
        ? vmx_vcpu_put+0x2e/0x260 [kvm_intel]
        kvm_vcpu_ioctl+0xea/0x6b0 [kvm]
        ? kvm_vcpu_ioctl+0xea/0x6b0 [kvm]
        ? __fget_light+0xd4/0x130
        __x64_sys_ioctl+0xe3/0x910
        ? debug_smp_processor_id+0x17/0x20
        ? fpregs_assert_state_consistent+0x27/0x50
        do_syscall_64+0x3f/0x90
        entry_SYSCALL_64_after_hwframe+0x63/0xcd
      
      Adjust the 'mask' to zero out the userspace buffer for the features that
      are not available both from fpstate and from init_fpstate.
      
      The dynamic features depend on the compacted XSAVE format. Ensure it is
      enabled before reading XCOMP_BV in init_fpstate.
      
      Fixes: 2308ee57 ("x86/fpu/amx: Enable the AMX feature in 64-bit mode")
      Reported-by: default avatarYuan Yao <yuan.yao@intel.com>
      Suggested-by: default avatarDave Hansen <dave.hansen@intel.com>
      Signed-off-by: default avatarChang S. Bae <chang.seok.bae@intel.com>
      Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Tested-by: default avatarYuan Yao <yuan.yao@intel.com>
      Link: https://lore.kernel.org/lkml/BYAPR11MB3717EDEF2351C958F2C86EED95259@BYAPR11MB3717.namprd11.prod.outlook.com/
      Link: https://lkml.kernel.org/r/20221021185844.13472-1-chang.seok.bae@intel.com
      471f0aa7
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · ed537795
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Two small changes, one in the lpfc driver and the other in the core.
      
        The core change is an additional footgun guard which prevents users
        from writing the wrong state to sysfs and causing a hang"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: lpfc: Fix memory leak in lpfc_create_port()
        scsi: core: Restrict legal sdev_state transitions via sysfs
      ed537795
    • Linus Torvalds's avatar
      Merge tag 'block-6.1-2022-10-20' of git://git.kernel.dk/linux · d4b7332e
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request via Christoph:
            - fix nvme-hwmon for DMA non-cohehrent architectures (Serge Semin)
            - add a nvme-hwmong maintainer (Christoph Hellwig)
            - fix error pointer dereference in error handling (Dan Carpenter)
            - fix invalid memory reference in nvmet_subsys_attr_qid_max_show
              (Daniel Wagner)
            - don't limit the DMA segment size in nvme-apple (Russell King)
            - fix workqueue MEM_RECLAIM flushing dependency (Sagi Grimberg)
            - disable write zeroes on various Kingston SSDs (Xander Li)
      
       - fix a memory leak with block device tracing (Ye)
      
       - flexible-array fix for ublk (Yushan)
      
       - document the ublk recovery feature from this merge window
         (ZiyangZhang)
      
       - remove dead bfq variable in struct (Yuwei)
      
       - error handling rq clearing fix (Yu)
      
       - add an IRQ safety check for the cached bio freeing (Pavel)
      
       - drbd bio cloning fix (Christoph)
      
      * tag 'block-6.1-2022-10-20' of git://git.kernel.dk/linux:
        blktrace: remove unnessary stop block trace in 'blk_trace_shutdown'
        blktrace: fix possible memleak in '__blk_trace_remove'
        blktrace: introduce 'blk_trace_{start,stop}' helper
        bio: safeguard REQ_ALLOC_CACHE bio put
        block, bfq: remove unused variable for bfq_queue
        drbd: only clone bio if we have a backing device
        ublk_drv: use flexible-array member instead of zero-length array
        nvmet: fix invalid memory reference in nvmet_subsys_attr_qid_max_show
        nvmet: fix workqueue MEM_RECLAIM flushing dependency
        nvme-hwmon: kmalloc the NVME SMART log buffer
        nvme-hwmon: consistently ignore errors from nvme_hwmon_init
        nvme: add Guenther as nvme-hwmon maintainer
        nvme-apple: don't limit DMA segement size
        nvme-pci: disable write zeroes on various Kingston SSD
        nvme: fix error pointer dereference in error handling
        Documentation: document ublk user recovery feature
        blk-mq: fix null pointer dereference in blk_mq_clear_rq_mapping()
      d4b7332e
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.1-2022-10-20' of git://git.kernel.dk/linux · 294e73ff
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Fix a potential memory leak in the error handling path of io-wq setup
         (Rafael)
      
       - Kill an errant debug statement that got added in this release (me)
      
       - Fix an oops with an invalid direct descriptor with IORING_OP_MSG_RING
         (Harshit)
      
       - Remove unneeded FFS_SCM flagging (Pavel)
      
       - Remove polling off the exit path (Pavel)
      
       - Move out direct descriptor debug check to the cleanup path (Pavel)
      
       - Use the proper helper rather than open-coding cached request get
         (Pavel)
      
      * tag 'io_uring-6.1-2022-10-20' of git://git.kernel.dk/linux:
        io-wq: Fix memory leak in worker creation
        io_uring/msg_ring: Fix NULL pointer dereference in io_msg_send_fd()
        io_uring/rw: remove leftover debug statement
        io_uring: don't iopoll from io_ring_ctx_wait_and_kill()
        io_uring: reuse io_alloc_req()
        io_uring: kill hot path fixed file bitmap debug checks
        io_uring: remove FFS_SCM
      294e73ff
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.1-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 1d61754c
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "Just two fixes for the new 'virtio with grants' feature"
      
      * tag 'for-linus-6.1-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/virtio: Convert PAGE_SIZE/PAGE_SHIFT/PFN_UP to Xen counterparts
        xen/virtio: Handle cases when page offset > PAGE_SIZE properly
      1d61754c