1. 02 Apr, 2021 3 commits
    • Mark Brown's avatar
      Merge series "Support ROHM BD71815 PMIC" from Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>: · aaa8c4e0
      Mark Brown authored
      Patch series introducing support for ROHM BD71815 PMIC
      
      ROHM BD71815 is a power management IC used in some battery powered
      systems. It contains regulators, GPO(s), charger + coulomb counter, RTC
      and a clock gate.
      
      All regulators can be controlled via I2C. LDO4 can additionally be set to
      be enabled/disabled by a GPIO. LDO3 voltage could be selected from two
      voltages written into separate VSEL reisters using GPIO but this mode is
      not supported by driver. On top of that the PMIC has the typical HW
      state machine which is present also on many other ROHM PMICs.
      
      IC contains two GPOs - but one of the GPOs is marked as GND in
      data-sheet. Thus the driver by default only exposes one GPO. The second
      GPO can be enabled by special DT property.
      
      RTC is almost similar to what is on BD71828. For currently used features
      only the register address offset to RTC block differs.
      
      The charger driver is not included in this series. ROHM has a charger
      driver with some fuel-gauging logig written in but this is not included
      here. I am working on separating the logic from HW specific driver and
      supporting both BD71815 and BD71828 chargers in separate patch series.
      
      Changelog v5:
        Regulator:
        - Added regmap helper for regulator ramp-delay and taken it in use
          (patches 13, 14, 16 - they can be just dropped if ramp-delay helper is not
          a good idea. Patch 15 implements old-fashioned ramp-delay)
        GPIO:
        - styling changes to GPIO (Mostly suggested by Andy)
        - implemented init_valid_mask (but can't count on it yet)
      Changelog v4:
        - Sorted ROHM chip ID enum
        - Statcized DVS structures in regulator driver
        - Minor styling for regulator driver
        - rebased on v5.12-rc4
      Changelog v3:
        - GPIO clean-up as suggested by Bartosz
        - MFD clean-up as suggested by Lee
        - clk-mode dt-binding handling in MFD driver corrected to reflect new
          property values.
        - Dropped already applied patches
        - Rebased on v5.12-rc2
      Changelog v2:
        - Rebased on top of v5.11-rc3
        - Added another "preliminary patch" which fixes HW-dvs voltage
          handling (patch 1)
        - split regulator patch to two.
        - changed dt-binding patch ordering.
        regulators:
          - staticized probe
          - removed some unnecessary defines
          - updated comments
          - split rohm-regulator patch adding SNVS and supporting simple
            linear mapping into two - one adding support for mapping, other
            adding SNVS.
        GPIO:
          - removed unnecessary headers
          - clarified dev/parent->dev usage
          - removed forgotten #define DEBUG
        dt-bindings:
          - changed patch order to meet ref-dependencies
          - added missing regulator nodes
          - changed string property for clk mode to tristated
        MFD:
          - header cleanups.
        CLK:
          - fixed commit message
      
      --
      
      Matti Vaittinen (19):
        rtc: bd70528: Do not require parent data
        mfd: bd718x7: simplify by cleaning unnecessary device data
        dt_bindings: bd71828: Add clock output mode
        dt_bindings: regulator: Add ROHM BD71815 PMIC regulators
        dt_bindings: mfd: Add ROHM BD71815 PMIC
        mfd: Add ROHM BD71815 ID
        mfd: Sort ROHM chip ID list for better readability
        mfd: Support for ROHM BD71815 PMIC core
        gpio: support ROHM BD71815 GPOs
        regulator: helpers: Export helper voltage listing
        regulator: rohm-regulator: linear voltage support
        regulator: rohm-regulator: Support SNVS HW state.
        regulator: Add regmap helper for ramp-delay setting
        regulator: bd718x7, bd71828: Use ramp-delay helper
        regulator: Support ROHM BD71815 regulators
        regulator: bd71815: use ramp-delay helper
        clk: bd718x7: Add support for clk gate on ROHM BD71815 PMIC
        rtc: bd70528: Support RTC on ROHM BD71815
        MAINTAINERS: Add ROHM BD71815AGW
      
       .../bindings/mfd/rohm,bd71815-pmic.yaml       | 201 ++++++
       .../bindings/mfd/rohm,bd71828-pmic.yaml       |   6 +
       .../regulator/rohm,bd71815-regulator.yaml     | 116 ++++
       MAINTAINERS                                   |   3 +
       drivers/clk/clk-bd718x7.c                     |   9 +-
       drivers/gpio/Kconfig                          |  10 +
       drivers/gpio/Makefile                         |   1 +
       drivers/gpio/gpio-bd71815.c                   | 193 ++++++
       drivers/mfd/Kconfig                           |  15 +-
       drivers/mfd/rohm-bd71828.c                    | 486 +++++++++----
       drivers/mfd/rohm-bd718x7.c                    |  43 +-
       drivers/regulator/Kconfig                     |  11 +
       drivers/regulator/Makefile                    |   1 +
       drivers/regulator/bd71815-regulator.c         | 651 ++++++++++++++++++
       drivers/regulator/bd71828-regulator.c         |  51 +-
       drivers/regulator/bd718x7-regulator.c         |  60 +-
       drivers/regulator/helpers.c                   | 101 ++-
       drivers/regulator/rohm-regulator.c            |  23 +-
       drivers/rtc/Kconfig                           |   6 +-
       drivers/rtc/rtc-bd70528.c                     | 104 +--
       include/linux/mfd/rohm-bd71815.h              | 562 +++++++++++++++
       include/linux/mfd/rohm-bd71828.h              |   3 +
       include/linux/mfd/rohm-bd718x7.h              |  13 -
       include/linux/mfd/rohm-generic.h              |  15 +-
       include/linux/regulator/driver.h              |   7 +
       25 files changed, 2393 insertions(+), 298 deletions(-)
       create mode 100644 Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml
       create mode 100644 Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml
       create mode 100644 drivers/gpio/gpio-bd71815.c
       create mode 100644 drivers/regulator/bd71815-regulator.c
       create mode 100644 include/linux/mfd/rohm-bd71815.h
      
      base-commit: 0d02ec6b
      --
      2.25.4
      
      --
      Matti Vaittinen, Linux device drivers
      ROHM Semiconductors, Finland SWDC
      Kiviharjunlenkki 1E
      90220 OULU
      FINLAND
      
      ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
      Simon says - in Latin please.
      ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
      Thanks to Simon Glass for the translation =]
      aaa8c4e0
    • Matti Vaittinen's avatar
      regulator: Add regmap helper for ramp-delay setting · fb8fee9e
      Matti Vaittinen authored
      Quite a few regulator ICs do support setting ramp-delay by writing a value
      matching the delay to a ramp-delay register.
      
      Provide a simple helper for table-based delay setting.
      Signed-off-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
      Link: https://lore.kernel.org/r/f101f1db564cf32cb58719c77af0b00d7236bb89.1617020713.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      fb8fee9e
    • Matti Vaittinen's avatar
      regulator: helpers: Export helper voltage listing · e3baacf5
      Matti Vaittinen authored
      Some drivers need to translate voltage values to selectors prior regulator
      registration. Currently a regulator_desc based list_voltages helper is only
      exported for regulators using the linear_ranges. Export similar helper also
      for regulators using simple linear mapping.
      Signed-off-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
      Link: https://lore.kernel.org/r/1200ef7a50c84327ada019b85f6527b4fc9b5ce1.1617020713.git.matti.vaittinen@fi.rohmeurope.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      e3baacf5
  2. 01 Apr, 2021 4 commits
  3. 24 Mar, 2021 1 commit
  4. 21 Mar, 2021 23 commits
  5. 20 Mar, 2021 7 commits
    • Thomas Gleixner's avatar
      genirq: Disable interrupts for force threaded handlers · 81e2073c
      Thomas Gleixner authored
      With interrupt force threading all device interrupt handlers are invoked
      from kernel threads. Contrary to hard interrupt context the invocation only
      disables bottom halfs, but not interrupts. This was an oversight back then
      because any code like this will have an issue:
      
      thread(irq_A)
        irq_handler(A)
          spin_lock(&foo->lock);
      
      interrupt(irq_B)
        irq_handler(B)
          spin_lock(&foo->lock);
      
      This has been triggered with networking (NAPI vs. hrtimers) and console
      drivers where printk() happens from an interrupt which interrupted the
      force threaded handler.
      
      Now people noticed and started to change the spin_lock() in the handler to
      spin_lock_irqsave() which affects performance or add IRQF_NOTHREAD to the
      interrupt request which in turn breaks RT.
      
      Fix the root cause and not the symptom and disable interrupts before
      invoking the force threaded handler which preserves the regular semantics
      and the usefulness of the interrupt force threading as a general debugging
      tool.
      
      For not RT this is not changing much, except that during the execution of
      the threaded handler interrupts are delayed until the handler
      returns. Vs. scheduling and softirq processing there is no difference.
      
      For RT kernels there is no issue.
      
      Fixes: 8d32a307 ("genirq: Provide forced interrupt threading")
      Reported-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
      Acked-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Link: https://lore.kernel.org/r/20210317143859.513307808@linutronix.de
      81e2073c
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 812da4d3
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
       "A handful of fixes for 5.12:
      
         - fix the SBI remote fence numbers for hypervisor fences, which had
           been transcribed in the wrong order in Linux. These fences are only
           used with the KVM patches applied.
      
         - fix a whole host of build warnings, these should have no functional
           change.
      
         - fix init_resources() to prevent an off-by-one error from causing an
           out-of-bounds array reference. This was manifesting during boot on
           vexriscv.
      
         - ensure the KASAN mappings are visible before proceeding to use
           them"
      
      * tag 'riscv-for-linus-5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Correct SPARSEMEM configuration
        RISC-V: kasan: Declare kasan_shallow_populate() static
        riscv: Ensure page table writes are flushed when initializing KASAN vmalloc
        RISC-V: Fix out-of-bounds accesses in init_resources()
        riscv: Fix compilation error with Canaan SoC
        ftrace: Fix spelling mistake "disabed" -> "disabled"
        riscv: fix bugon.cocci warnings
        riscv: process: Fix no prototype for arch_dup_task_struct
        riscv: ftrace: Use ftrace_get_regs helper
        riscv: process: Fix no prototype for show_regs
        riscv: syscall_table: Reduce W=1 compilation warnings noise
        riscv: time: Fix no prototype for time_init
        riscv: ptrace: Fix no prototype warnings
        riscv: sbi: Fix comment of __sbi_set_timer_v01
        riscv: irq: Fix no prototype warning
        riscv: traps: Fix no prototype warnings
        RISC-V: correct enum sbi_ext_rfence_fid
      812da4d3
    • Linus Torvalds's avatar
      Merge tag '5.12-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6 · bfdc4aa9
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Five cifs/smb3 fixes - three for stable, including an important ACL
        fix and security signature fix"
      
      * tag '5.12-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: fix allocation size on newly created files
        cifs: warn and fail if trying to use rootfs without the config option
        fs/cifs/: fix misspellings using codespell tool
        cifs: Fix preauth hash corruption
        cifs: update new ACE pointer after populate_new_aces.
      bfdc4aa9
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · af97713d
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Eight fixes, all in drivers, all fairly minor either being fixes in
        error legs, memory leaks on teardown, context errors or semantic
        problems"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: mpt3sas: Do not use GFP_KERNEL in atomic context
        scsi: ufs: ufs-mediatek: Correct operator & -> &&
        scsi: sd_zbc: Update write pointer offset cache
        scsi: lpfc: Fix some error codes in debugfs
        scsi: qla2xxx: Fix broken #endif placement
        scsi: st: Fix a use after free in st_open()
        scsi: myrs: Fix a double free in myrs_cleanup()
        scsi: ibmvfc: Free channel_setup_buf during device tear down
      af97713d
    • Linus Torvalds's avatar
      Merge tag 'zonefs-5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs · 1c273e10
      Linus Torvalds authored
      Pull zonefs fixes from Damien Le Moal:
      
       - fix inode write open reference count (Chao)
      
       - Fix wrong write offset for asynchronous O_APPEND writes (me)
      
       - Prevent use of sequential zone file as swap files (me)
      
      * tag 'zonefs-5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:
        zonefs: fix to update .i_wr_refcnt correctly in zonefs_open_zone()
        zonefs: Fix O_APPEND async write handling
        zonefs: prevent use of seq files as swap file
      1c273e10
    • Linus Torvalds's avatar
      Merge tag 'block-5.12-2021-03-19' of git://git.kernel.dk/linux-block · d626c692
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Just an NVMe pull request this week:
      
         - fix tag allocation for keep alive
      
         - fix a unit mismatch for the Write Zeroes limits
      
         - various TCP transport fixes (Sagi Grimberg, Elad Grupi)
      
         - fix iosqes and iocqes validation for discovery controllers (Sagi Grimberg)"
      
      * tag 'block-5.12-2021-03-19' of git://git.kernel.dk/linux-block:
        nvmet-tcp: fix kmap leak when data digest in use
        nvmet: don't check iosqes,iocqes for discovery controllers
        nvme-rdma: fix possible hang when failing to set io queues
        nvme-tcp: fix possible hang when failing to set io queues
        nvme-tcp: fix misuse of __smp_processor_id with preemption enabled
        nvme-tcp: fix a NULL deref when receiving a 0-length r2t PDU
        nvme: fix Write Zeroes limitations
        nvme: allocate the keep alive request using BLK_MQ_REQ_NOWAIT
        nvme: merge nvme_keep_alive into nvme_keep_alive_work
        nvme-fabrics: only reserve a single tag
      d626c692
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.12-2021-03-19' of git://git.kernel.dk/linux-block · 0ada2dad
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Quieter week this time, which was both expected and desired. About
        half of the below is fixes for this release, the other half are just
        fixes in general. In detail:
      
         - Fix the freezing of IO threads, by making the freezer not send them
           fake signals. Make them freezable by default.
      
         - Like we did for personalities, move the buffer IDR to xarray. Kills
           some code and avoids a use-after-free on teardown.
      
         - SQPOLL cleanups and fixes (Pavel)
      
         - Fix linked timeout race (Pavel)
      
         - Fix potential completion post use-after-free (Pavel)
      
         - Cleanup and move internal structures outside of general kernel view
           (Stefan)
      
         - Use MSG_SIGNAL for send/recv from io_uring (Stefan)"
      
      * tag 'io_uring-5.12-2021-03-19' of git://git.kernel.dk/linux-block:
        io_uring: don't leak creds on SQO attach error
        io_uring: use typesafe pointers in io_uring_task
        io_uring: remove structures from include/linux/io_uring.h
        io_uring: imply MSG_NOSIGNAL for send[msg]()/recv[msg]() calls
        io_uring: fix sqpoll cancellation via task_work
        io_uring: add generic callback_head helpers
        io_uring: fix concurrent parking
        io_uring: halt SQO submission on ctx exit
        io_uring: replace sqd rw_semaphore with mutex
        io_uring: fix complete_post use ctx after free
        io_uring: fix ->flags races by linked timeouts
        io_uring: convert io_buffer_idr to XArray
        io_uring: allow IO worker threads to be frozen
        kernel: freezer should treat PF_IO_WORKER like PF_KTHREAD for freezing
      0ada2dad
  6. 19 Mar, 2021 2 commits
    • Johan Hovold's avatar
      x86/apic/of: Fix CPU devicetree-node lookups · dd926880
      Johan Hovold authored
      Architectures that describe the CPU topology in devicetree and do not have
      an identity mapping between physical and logical CPU ids must override the
      default implementation of arch_match_cpu_phys_id().
      
      Failing to do so breaks CPU devicetree-node lookups using of_get_cpu_node()
      and of_cpu_device_node_get() which several drivers rely on. It also causes
      the CPU struct devices exported through sysfs to point to the wrong
      devicetree nodes.
      
      On x86, CPUs are described in devicetree using their APIC ids and those
      do not generally coincide with the logical ids, even if CPU0 typically
      uses APIC id 0.
      
      Add the missing implementation of arch_match_cpu_phys_id() so that CPU-node
      lookups work also with SMP.
      
      Apart from fixing the broken sysfs devicetree-node links this likely does
      not affect current users of mainline kernels on x86.
      
      Fixes: 4e07db9c ("x86/devicetree: Use CPU description from Device Tree")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/r/20210312092033.26317-1-johan@kernel.org
      dd926880
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · ecd8ee7f
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "Fixes for kvm on x86:
      
         - new selftests
      
         - fixes for migration with HyperV re-enlightenment enabled
      
         - fix RCU/SRCU usage
      
         - fixes for local_irq_restore misuse false positive"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        documentation/kvm: additional explanations on KVM_SET_BOOT_CPU_ID
        x86/kvm: Fix broken irq restoration in kvm_wait
        KVM: X86: Fix missing local pCPU when executing wbinvd on all dirty pCPUs
        KVM: x86: Protect userspace MSR filter with SRCU, and set atomically-ish
        selftests: kvm: add set_boot_cpu_id test
        selftests: kvm: add _vm_ioctl
        selftests: kvm: add get_msr_index_features
        selftests: kvm: Add basic Hyper-V clocksources tests
        KVM: x86: hyper-v: Don't touch TSC page values when guest opted for re-enlightenment
        KVM: x86: hyper-v: Track Hyper-V TSC page status
        KVM: x86: hyper-v: Prevent using not-yet-updated TSC page by secondary CPUs
        KVM: x86: hyper-v: Limit guest to writing zero to HV_X64_MSR_TSC_EMULATION_STATUS
        KVM: x86/mmu: Store the address space ID in the TDP iterator
        KVM: x86/mmu: Factor out tdp_iter_return_to_root
        KVM: x86/mmu: Fix RCU usage when atomically zapping SPTEs
        KVM: x86/mmu: Fix RCU usage in handle_removed_tdp_mmu_page
      ecd8ee7f