Skip to contentSkip to conversation

Linux 5.9.12

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Dec 2, 2020 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 5.9.12 kernel.

All users of the 5.9 kernel series must upgrade.

The updated 5.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.9.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Makefile                                               |    2 
 arch/arc/include/asm/pgtable.h                         |    2 
 arch/arm/boot/dts/dra76x.dtsi                          |    4 
 arch/arm/include/asm/pgtable-2level.h                  |    2 
 arch/arm/include/asm/pgtable-3level.h                  |    2 
 arch/arm/mach-omap2/cpuidle44xx.c                      |    8 
 arch/arm64/boot/dts/nvidia/tegra194-p3668-0000.dtsi    |    2 
 arch/arm64/boot/dts/nvidia/tegra194.dtsi               |    2 
 arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi         |   20 -
 arch/arm64/include/asm/pgtable.h                       |   34 +-
 arch/arm64/kvm/vgic/vgic-mmio-v3.c                     |   22 +
 arch/mips/include/asm/pgtable-32.h                     |    3 
 arch/powerpc/include/asm/book3s/32/pgtable.h           |    2 
 arch/powerpc/include/asm/book3s/64/kup-radix.h         |    2 
 arch/powerpc/include/asm/nohash/32/pgtable.h           |    2 
 arch/powerpc/kernel/exceptions-64s.S                   |   13 
 arch/powerpc/kvm/book3s_xive_native.c                  |    7 
 arch/riscv/include/asm/pgtable-32.h                    |    2 
 arch/riscv/include/asm/vdso/processor.h                |    2 
 arch/riscv/kernel/setup.c                              |    1 
 arch/riscv/kernel/vdso/Makefile                        |    2 
 arch/s390/kernel/asm-offsets.c                         |   10 
 arch/s390/kernel/entry.S                               |    2 
 arch/s390/kvm/kvm-s390.c                               |    4 
 arch/s390/kvm/pv.c                                     |    3 
 arch/s390/mm/gmap.c                                    |    2 
 arch/x86/events/intel/cstate.c                         |    6 
 arch/x86/events/intel/uncore.c                         |    4 
 arch/x86/events/intel/uncore.h                         |   12 
 arch/x86/events/rapl.c                                 |   14 
 arch/x86/include/asm/kvm_host.h                        |    1 
 arch/x86/kernel/cpu/bugs.c                             |    4 
 arch/x86/kernel/cpu/mce/core.c                         |    6 
 arch/x86/kernel/cpu/resctrl/rdtgroup.c                 |   65 +---
 arch/x86/kernel/dumpstack.c                            |   23 +
 arch/x86/kernel/tboot.c                                |    5 
 arch/x86/kvm/irq.c                                     |   85 ++---
 arch/x86/kvm/lapic.c                                   |    2 
 arch/x86/kvm/x86.c                                     |   18 -
 arch/x86/xen/spinlock.c                                |   12 
 arch/xtensa/include/asm/uaccess.h                      |    2 
 block/keyslot-manager.c                                |    7 
 drivers/bus/ti-sysc.c                                  |   29 +
 drivers/cpuidle/cpuidle-tegra.c                        |    4 
 drivers/dma/pl330.c                                    |    2 
 drivers/dma/xilinx/xilinx_dma.c                        |    4 
 drivers/firmware/efi/Kconfig                           |    2 
 drivers/firmware/efi/efi.c                             |    2 
 drivers/firmware/xilinx/zynqmp.c                       |   65 +++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c             |    4 
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c                |    6 
 drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h                |    4 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c              |   10 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h              |   11 
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h                |    1 
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c                 |   41 ++
 drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h                |    4 
 drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c                  |   20 -
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c      |    2 
 drivers/gpu/drm/mediatek/mtk_dsi.c                     |   61 +---
 drivers/gpu/drm/nouveau/nouveau_gem.c                  |    8 
 drivers/hid/hid-cypress.c                              |   44 ++-
 drivers/hid/hid-ids.h                                  |    9 
 drivers/hid/hid-input.c                                |    3 
 drivers/hid/hid-ite.c                                  |   61 ++++
 drivers/hid/hid-logitech-hidpp.c                       |    6 
 drivers/hid/hid-quirks.c                               |    5 
 drivers/hid/hid-sensor-hub.c                           |    3 
 drivers/hid/hid-uclogic-core.c                         |    2 
 drivers/hid/hid-uclogic-params.c                       |    2 
 drivers/infiniband/hw/hfi1/file_ops.c                  |    4 
 drivers/infiniband/hw/hfi1/hfi.h                       |    2 
 drivers/infiniband/hw/hfi1/mmu_rb.c                    |   68 ++--
 drivers/infiniband/hw/hfi1/mmu_rb.h                    |   16 +
 drivers/infiniband/hw/hfi1/user_exp_rcv.c              |   12 
 drivers/infiniband/hw/hfi1/user_exp_rcv.h              |    6 
 drivers/infiniband/hw/hfi1/user_sdma.c                 |   13 
 drivers/infiniband/hw/hfi1/user_sdma.h                 |    7 
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c             |    9 
 drivers/infiniband/hw/hns/hns_roce_hw_v2.h             |    2 
 drivers/infiniband/hw/i40iw/i40iw_main.c               |    5 
 drivers/infiniband/hw/i40iw/i40iw_verbs.c              |   37 --
 drivers/infiniband/hw/mthca/mthca_cq.c                 |   10 
 drivers/input/serio/i8042.c                            |   12 
 drivers/iommu/intel/dmar.c                             |    3 
 drivers/iommu/intel/iommu.c                            |    4 
 drivers/iommu/iommu.c                                  |   10 
 drivers/irqchip/irq-sni-exiu.c                         |    2 
 drivers/net/bonding/bond_main.c                        |   61 ++--
 drivers/net/bonding/bond_sysfs_slave.c                 |   18 -
 drivers/net/can/m_can/m_can.c                          |    4 
 drivers/net/can/usb/gs_usb.c                           |  131 ++++----
 drivers/net/dsa/mv88e6xxx/chip.c                       |    2 
 drivers/net/dsa/mv88e6xxx/global1.c                    |   31 ++
 drivers/net/dsa/mv88e6xxx/global1.h                    |    1 
 drivers/net/ethernet/amazon/ena/ena_eth_com.c          |    3 
 drivers/net/ethernet/amazon/ena/ena_netdev.c           |   80 ++---
 drivers/net/ethernet/aquantia/atlantic/aq_ring.c       |  126 +++-----
 drivers/net/ethernet/broadcom/bnxt/bnxt.c              |    4 
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c      |    3 
 drivers/net/ethernet/freescale/dpaa2/Kconfig           |    1 
 drivers/net/ethernet/freescale/enetc/enetc_qos.c       |   14 
 drivers/net/ethernet/ibm/ibmvnic.c                     |   17 -
 drivers/net/ethernet/ibm/ibmvnic.h                     |    3 
 drivers/net/ethernet/intel/i40e/i40e.h                 |    1 
 drivers/net/ethernet/intel/i40e/i40e_main.c            |   22 +
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c     |   26 +
 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c      |    2 
 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c        |    2 
 drivers/net/wireless/intel/iwlwifi/fw/api/time-event.h |    8 
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c      |    3 
 drivers/net/wireless/intel/iwlwifi/mvm/time-event.c    |  103 ++++---
 drivers/nfc/s3fwrn5/i2c.c                              |    4 
 drivers/nvme/host/pci.c                                |   15 +
 drivers/phy/qualcomm/Kconfig                           |    4 
 drivers/phy/tegra/xusb.c                               |    1 
 drivers/platform/x86/thinkpad_acpi.c                   |    1 
 drivers/platform/x86/toshiba_acpi.c                    |    3 
 drivers/ptp/ptp_clockmatrix.c                          |   49 +--
 drivers/rtc/rtc-pcf2127.c                              |    4 
 drivers/s390/net/qeth_core.h                           |    9 
 drivers/s390/net/qeth_core_main.c                      |   82 +++--
 drivers/scsi/libiscsi.c                                |   23 +
 drivers/scsi/ufs/ufshcd.c                              |    6 
 drivers/spi/spi-bcm-qspi.c                             |   34 --
 drivers/spi/spi-bcm2835.c                              |   27 -
 drivers/spi/spi-bcm2835aux.c                           |    3 
 drivers/spi/spi-imx.c                                  |    1 
 drivers/staging/ralink-gdma/Kconfig                    |    1 
 drivers/target/iscsi/iscsi_target.c                    |   17 -
 drivers/tee/optee/call.c                               |    3 
 drivers/usb/cdns3/gadget.c                             |   80 ++---
 drivers/usb/core/devio.c                               |   14 
 drivers/usb/core/quirks.c                              |   10 
 drivers/usb/gadget/function/f_midi.c                   |   10 
 drivers/usb/gadget/legacy/inode.c                      |    3 
 drivers/vdpa/Kconfig                                   |    1 
 drivers/vhost/scsi.c                                   |  249 +++++++++--------
 drivers/vhost/vhost.c                                  |    6 
 drivers/vhost/vhost.h                                  |    1 
 drivers/video/fbdev/hyperv_fb.c                        |    7 
 fs/btrfs/file.c                                        |   57 ---
 fs/btrfs/inode.c                                       |   58 +++
 fs/btrfs/qgroup.c                                      |   22 +
 fs/btrfs/tests/inode-tests.c                           |   12 
 fs/btrfs/tree-checker.c                                |    3 
 fs/btrfs/volumes.c                                     |    8 
 fs/cifs/cifsacl.c                                      |    1 
 fs/cifs/smb2ops.c                                      |   88 ++++--
 fs/efivarfs/inode.c                                    |    2 
 fs/efivarfs/super.c                                    |    1 
 fs/io_uring.c                                          |   66 +++-
 fs/proc/self.c                                         |    7 
 include/kunit/test.h                                   |    2 
 include/linux/firmware/xlnx-zynqmp.h                   |    4 
 include/linux/pgtable.h                                |   13 
 include/linux/platform_data/ti-sysc.h                  |    1 
 include/net/bonding.h                                  |    8 
 include/scsi/libiscsi.h                                |    3 
 include/trace/events/writeback.h                       |    8 
 kernel/locking/lockdep.c                               |    6 
 mm/filemap.c                                           |    8 
 mm/page-writeback.c                                    |    6 
 net/batman-adv/log.c                                   |    1 
 net/ipv4/fib_frontend.c                                |    2 
 tools/perf/util/dwarf-aux.c                            |    8 
 tools/perf/util/stat-display.c                         |    5 
 tools/perf/util/synthetic-events.c                     |    3 
 168 files changed, 1700 insertions(+), 1097 deletions(-)

Alan Stern (2):
USB: core: Change %pK for __user pointers to %px
USB: core: Fix regression in Hercules audio card

Amadeusz Sławiński (1):
efi/efivars: Set generic ops before loading SSDT

Amit Sunil Dhamne (1):
firmware: xilinx: Use hash-table for api feature check

Anand K Mistry (1):
x86/speculation: Fix prctl() when spectre_v2_user={seccomp,prctl},ibpb

Andrew Lunn (1):
net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset

Antonio Borneo (1):
net: stmmac: fix incorrect merge of patch upstream

Anup Patel (1):
RISC-V: Add missing jump label initialization

Ard Biesheuvel (1):
efivarfs: revert "fix memory leak in efivarfs_create()"

Arnd Bergmann (1):
arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed

Avraham Stern (1):
iwlwifi: mvm: write queue_sync_state only for sync

Benjamin Berg (1):
platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time

Biwen Li (1):
rtc: pcf2127: fix a bug when not specify interrupts property

Boqun Feng (1):
lockdep: Put graph lock/unlock under lock_recursion protection

Brian Masney (1):
x86/xen: don't unbind uninitialized lock_kicker_irq

Bryan O'Donoghue (2):
phy: qualcomm: usb: Fix SuperSpeed PHY OF dependency
phy: qualcomm: Fix 28 nm Hi-Speed USB PHY OF dependency

CK Hu (1):
drm/mediatek: dsi: Modify horizontal front/back porch byte formula

Chen Baozi (1):
irqchip/exiu: Fix the index of fwspec for IRQ type

Chris Ye (1):
HID: add HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE for Gamevice devices

Clark Wang (1):
spi: imx: fix the unbalanced spi runtime pm management

Collin Walling (1):
KVM: s390: remove diag318 reset code

Cédric Le Goater (1):
KVM: PPC: Book3S HV: XIVE: Fix possible oops when accessing ESB page

Daniel Latypov (1):
kunit: fix display of failed expectations for strings

Daniel Xu (1):
btrfs: tree-checker: add missing return after error in root_item

David Sterba (1):
btrfs: tree-checker: add missing returns after data_ref alignment checks

David Woodhouse (1):
iommu/vt-d: Don't read VCCAP register unless it exists

Dennis Dalessandro (1):
IB/hfi1: Ensure correct mm is used at all times

Dexuan Cui (1):
video: hyperv_fb: Fix the cache type when mapping the VRAM

Dipen Patel (1):
arm64: tegra: Wrong AON HSP reg property size

Dmitry Osipenko (1):
cpuidle: tegra: Annotate tegra_pm_set_cpu_in_lp2() with RCU_NONIDLE

Emmanuel Grumbach (2):
iwlwifi: mvm: use the HOT_SPOT_CMD to cancel an AUX ROC
iwlwifi: mvm: properly cancel a session protection for P2P

Eric Biggers (1):
block/keyslot-manager: prevent crash when num_slots=1

Filipe Manana (2):
btrfs: fix missing delalloc new bit for new delalloc ranges
btrfs: fix lockdep splat when reading qgroup config on mount

Florian Klink (1):
ipv4: use IS_ENABLED instead of ifdef

Frank Yang (1):
HID: cypress: Support Varmilo Keyboards' media hotkeys

Gabriele Paoloni (1):
x86/mce: Do not overwrite no_way_out if mce_end() fails

Geert Uytterhoeven (1):
efi: EFI_EARLYCON should depend on EFI

Greg Kroah-Hartman (1):

      Linux 5.9.12

Grygorii Strashko (1):
bus: ti-sysc: suppress err msg for timers used as clockevent/source

Hans de Goede (4):
HID: ite: Replace ABS_MISC 120/121 events with touchpad on/off keypresses
Input: i8042 - allow insmod to succeed on devices without an i8042 controller
HID: logitech-hidpp: Add HIDPP_CONSUMER_VENDOR_KEYS quirk for the Dinovo Edge
HID: Add Logitech Dinovo Edge battery quirk

Hugh Dickins (1):
mm: fix VM_BUG_ON(PageTail) and BUG_ON(PageWriteback)

Hui Su (1):
trace: fix potenial dangerous pointer

Ioana Ciornei (1):
dpaa2-eth: select XGMAC_MDIO for MDIO bus support

JC Kuo (1):
arm64: tegra: Fix USB_VBUS_EN0 regulator on Jetson TX1

Jamie Iles (1):
bonding: wait for sysfs kobject destruction before freeing struct slave

Janosch Frank (1):
KVM: s390: pv: Mark mm as protected after the set secure parameters and improve cleanup

Jens Axboe (2):
proc: don't allow async path resolution of /proc/self components
io_uring: handle -EOPNOTSUPP on path resolution

Jiri Kosina (1):
HID: add support for Sega Saturn

Jisheng Zhang (1):
net: stmmac: dwmac_lib: enlarge dma reset timeout

Johannes Thumshirn (1):
btrfs: don't access possibly stale fs_info data for printing duplicate device

Jon Hunter (1):
arm64: tegra: Correct the UART for Jetson Xavier NX

Joseph Qi (1):
io_uring: fix shift-out-of-bounds when round up cq size

Julian Wiedmann (3):
s390/qeth: make af_iucv TX notification call more robust s390/qeth: fix af_iucv notification race s390/qeth: fix tear down of async TX buffers

Kaixu Xia (1):
platform/x86: toshiba_acpi: Fix the wrong variable assignment

Kenneth Feng (1):
drm/amd/amdgpu: fix null pointer in runtime pm

Krzysztof Kozlowski (1):
nfc: s3fwrn5: use signed integer for parsing GPIO numbers

Laurent Pinchart (1):
xtensa: uaccess: Add missing __user to strncpy_from_user() prototype

Laurent Vivier (1):
vdpasim: fix "mac_pton" undefined error

Lee Duncan (1):
scsi: libiscsi: Fix NOP race condition

Lijun Pan (5):
ibmvnic: fix call_netdevice_notifiers in do_reset
ibmvnic: notify peers when failover and migration happen
ibmvnic: fix NULL pointer dereference in reset_sub_crq_queues
ibmvnic: fix NULL pointer dereference in ibmvic_reset_crq
ibmvnic: enhance resetting status check during module exit

Likun Gao (2):
drm/amdgpu: update golden setting for sienna_cichlid drm/amdgpu: add rlc iram and dram firmware support

Lincoln Ramsay (1):
aquantia: Remove the build_skb path

Lu Baolu (1):
x86/tboot: Don't disable swiotlb when iommu is forced on

Lukas Wunner (2):
spi: bcm-qspi: Fix use-after-free on unbind
spi: bcm2835: Fix use-after-free on unbind

Manish Narani (1):
firmware: xilinx: Fix SD DLL node reset issue

Marc Ferland (1):
dmaengine: xilinx_dma: use readl_poll_timeout_atomic variant

Marc Kleine-Budde (4):
ARM: dts: dra76x: m_can: fix order of clocks
can: gs_usb: fix endianess problem with candleLight firmware
can: m_can: m_can_open(): remove IRQF_TRIGGER_FALLING from request_threaded_irq()'s flags
can: m_can: fix nominal bitiming tseg2 min for version >= 3.1

Marc Zyngier (1):
phy: tegra: xusb: Fix dangling pointer on probe failure

Martijn van de Streek (1):
HID: uclogic: Add ID for Trust Flex Design Tablet

Masami Hiramatsu (1):
perf probe: Fix to die_entrypc() returns error correctly

Matti Hamalainen (1):
drm/nouveau: fix relocations applying logic and a double-free

Michael Chan (1):
bnxt_en: Release PCI regions when DMA mask setup fails during probe.

Mike Christie (4):
vhost: add helper to check if a vq has been setup vhost scsi: alloc cmds per vq instead of session vhost scsi: fix cmd completion race
scsi: target: iscsi: Fix cmd abort fabric stop race

Min Li (1):
ptp: clockmatrix: bug fix for idtcm_strverscmp

Minwoo Im (1):
nvme: free sq/cq dbbuf pointers when dbbuf set fails

Namhyung Kim (2):
perf record: Synthesize cgroup events only if needed perf stat: Use proper cpu for shadow stats

Namjae Jeon (1):
cifs: fix a memleak with modefromsid

Nathan Chancellor (2):
riscv: Explicitly specify the build id style in vDSO Makefile again
spi: bcm2835aux: Restore err assignment in bcm2835aux_spi_probe

Necip Fazil Yildiran (1):
staging: ralink-gdma: fix kconfig dependency bug for DMA_RALINK

Nicholas Piggin (2):
powerpc/64s: Fix KVM system reset handling when CONFIG_PPC_PSERIES=y powerpc/64s/exception: KVM Fix for host DSI being taken in HPT guest MMU context

Pablo Ceballos (1):
HID: hid-sensor-hub: Fix issue with devices with no report ID

Paolo Bonzini (2):
KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint
KVM: x86: Fix split-irqchip vs interrupt injection window request

Pavel Begunkov (3):
io_uring: get an active ref_node from files_data
io_uring: order refnode recycling
io_uring: fix ITER_BVEC check

Peter Chen (2):
usb: cdns3: gadget: fix some endian issues
usb: cdns3: gadget: calculate TD_SIZE based on TD

Qu Wenruo (1):
btrfs: qgroup: don't commit transaction when we already hold the handle

Raju Rangoju (1):
cxgb4: fix the panic caused by non smac rewrite

Randy Dunlap (1):
RISC-V: fix barrier() use in <vdso/processor.h>

Rodrigo Siqueira (1):
drm/amd/display: Avoid HDCP initialization in devices without output

Rohith Surabattula (3):
smb3: Call cifs reconnect from demultiplex thread
smb3: Avoid Mid pending list corruption
smb3: Handle error case during offload read path

Rui Miguel Silva (1):
optee: add writeback to valid memory type

Sami Tolvanen (1):
perf/x86: fix sysfs type mismatches

Shameer Kolothum (1):
iommu: Check return of __iommu_attach_device()

Shay Agroskin (3):
net: ena: handle bad request id in ena_netdev
net: ena: set initial DMA width to avoid intel iommu issue
net: ena: fix packet's addresses for rx_offset feature

Shiraz Saleem (1):
RDMA/i40iw: Address an mmap handler exploit in i40iw

Sonny Jiang (2):
drm/amdgpu: fix SI UVD firmware validate resume fail drm/amdgpu: fix a page fault

Stanley Chu (1):
scsi: ufs: Fix race between shutdown and runtime resume flow

Stephen Rothwell (1):
powerpc/64s: Fix allnoconfig build since uaccess flush

Sugar Zhang (1):
dmaengine: pl330: _prep_dma_memcpy: Fix wrong burst size

Sven Schnelle (1):
s390: fix fpu restore in entry.S

Sylwester Dziedziuch (1):
i40e: Fix removing driver while bare-metal VFs pass traffic

Taehee Yoo (1):
batman-adv: set .owner to THIS_MODULE

Thomas Gleixner (1):
x86/dumpstack: Do not try to access user space code of other tasks

Tony Lindgren (3):
bus: ti-sysc: Fix reset status check for modules with quirks
bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw
ARM: OMAP2+: Manage MPU state properly for omap_enter_idle_coupled()

Vladimir Oltean (1):
enetc: Let the hardware auto-advance the taprio base-time of 0

Wenpeng Liang (2):
RDMA/hns: Fix wrong field of SRQ number the device supports RDMA/hns: Fix retry_cnt and rnr_cnt when querying QP

Will Deacon (2):
arm64: pgtable: Fix pte_accessible()
arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()

Xiaochen Shen (2):
x86/resctrl: Remove superfluous kernfs_get() calls to prevent refcount leak x86/resctrl: Add necessary kernfs_put() calls to prevent refcount leak

Xiongfeng Wang (1):
IB/mthca: fix return value of error branch in mthca_init_cq()

Yixian Liu (1):
RDMA/hns: Bugfix for memory window mtpt configuration

Zenghui Yu (1):
KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace

Zhang Changzhong (2):
bnxt_en: fix error return code in bnxt_init_one()
bnxt_en: fix error return code in bnxt_init_board()

Zhang Qilong (2):
usb: gadget: f_midi: Fix memleak in f_midi_alloc
usb: gadget: Fix memleak in gadgetfs_fill_super

penghao (1):
USB: quirks: Add USB_QUIRK_DISCONNECT_SUSPEND quirk for Lenovo A630Z TIO built-in usb-audio card

author maintainer
#1 lore raw
Makefile +1 -1
index bacb52fac2a5..1dd088b0ac99 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 9
-SUBLEVEL = 11
+SUBLEVEL = 12
 EXTRAVERSION =
 NAME = Kleptomaniac Octopus
 
arch/arc/include/asm/pgtable.h +2 -0
index f1ed17edb085..163641726a2b 100644
@@ -134,8 +134,10 @@
 
 #ifdef CONFIG_ARC_HAS_PAE40
 #define PTE_BITS_NON_RWX_IN_PD1	(0xff00000000 | PAGE_MASK | _PAGE_CACHEABLE)
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
 #else
 #define PTE_BITS_NON_RWX_IN_PD1	(PAGE_MASK | _PAGE_CACHEABLE)
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
 #endif
 
 /**************************************************************************
arch/arm/boot/dts/dra76x.dtsi +2 -2
index b69c7d40f5d8..2f326151116b 100644
@@ -32,8 +32,8 @@ m_can0: mcan@1a00 {
 				interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
 					     <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
 				interrupt-names = "int0", "int1";
-				clocks = <&mcan_clk>, <&l3_iclk_div>;
-				clock-names = "cclk", "hclk";
+				clocks = <&l3_iclk_div>, <&mcan_clk>;
+				clock-names = "hclk", "cclk";
 				bosch,mram-cfg = <0x0 0 0 32 0 0 1 1>;
 			};
 		};
arch/arm/include/asm/pgtable-2level.h +2 -0
index 3502c2f746ca..baf7d0204eb5 100644
@@ -75,6 +75,8 @@
 #define PTE_HWTABLE_OFF		(PTE_HWTABLE_PTRS * sizeof(pte_t))
 #define PTE_HWTABLE_SIZE	(PTRS_PER_PTE * sizeof(u32))
 
+#define MAX_POSSIBLE_PHYSMEM_BITS	32
+
 /*
  * PMD_SHIFT determines the size of the area a second-level page table can map
  * PGDIR_SHIFT determines what a third-level page table entry can map
arch/arm/include/asm/pgtable-3level.h +2 -0
index fbb6693c3352..2b85d175e999 100644
@@ -25,6 +25,8 @@
 #define PTE_HWTABLE_OFF		(0)
 #define PTE_HWTABLE_SIZE	(PTRS_PER_PTE * sizeof(u64))
 
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
+
 /*
  * PGDIR_SHIFT determines the size a top-level page table entry can map.
  */
arch/arm/mach-omap2/cpuidle44xx.c +5 -3
index a92d277f81a0..c8d317fafe2e 100644
@@ -175,8 +175,11 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
 		if (mpuss_can_lose_context) {
 			error = cpu_cluster_pm_enter();
 			if (error) {
-				omap_set_pwrdm_state(mpu_pd, PWRDM_POWER_ON);
-				goto cpu_cluster_pm_out;
+				index = 0;
+				cx = state_ptr + index;
+				pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
+				omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
+				mpuss_can_lose_context = 0;
 			}
 		}
 	}
@@ -184,7 +187,6 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
 	omap4_enter_lowpower(dev->cpu, cx->cpu_state);
 	cpu_done[dev->cpu] = true;
 
-cpu_cluster_pm_out:
 	/* Wakeup CPU1 only if it is not offlined */
 	if (dev->cpu == 0 && cpumask_test_cpu(1, cpu_online_mask)) {
 
arch/arm64/boot/dts/nvidia/tegra194-p3668-0000.dtsi +1 -1
index 10cb836aea7e..e970d8860a1f 100644
@@ -54,7 +54,7 @@ memory-controller@2c00000 {
 			status = "okay";
 		};
 
-		serial@c280000 {
+		serial@3100000 {
 			status = "okay";
 		};
 
arch/arm64/boot/dts/nvidia/tegra194.dtsi +1 -1
index ca5cb6aef5ee..6f6d460c931a 100644
@@ -924,7 +924,7 @@ p2u_hsio_11: phy@3f40000 {
 
 		hsp_aon: hsp@c150000 {
 			compatible = "nvidia,tegra194-hsp", "nvidia,tegra186-hsp";
-			reg = <0x0c150000 0xa0000>;
+			reg = <0x0c150000 0x90000>;
 			interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
 			             <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
 			             <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi +10 -10
index e18e1a9a3011..a9caaf7c0d67 100644
@@ -1663,16 +1663,6 @@ vdd_usb_vbus: regulator@9 {
 		vin-supply = <&vdd_5v0_sys>;
 	};
 
-	vdd_usb_vbus_otg: regulator@11 {
-		compatible = "regulator-fixed";
-		regulator-name = "USB_VBUS_EN0";
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		gpio = <&gpio TEGRA_GPIO(CC, 4) GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-		vin-supply = <&vdd_5v0_sys>;
-	};
-
 	vdd_hdmi: regulator@10 {
 		compatible = "regulator-fixed";
 		regulator-name = "VDD_HDMI_5V0";
@@ -1712,4 +1702,14 @@ vdd_cam_1v8: regulator@13 {
 		enable-active-high;
 		vin-supply = <&vdd_3v3_sys>;
 	};
+
+	vdd_usb_vbus_otg: regulator@14 {
+		compatible = "regulator-fixed";
+		regulator-name = "USB_VBUS_EN0";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpio TEGRA_GPIO(CC, 4) GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		vin-supply = <&vdd_5v0_sys>;
+	};
 };
arch/arm64/include/asm/pgtable.h +18 -16
index 88233d42d9c2..db16919a53e4 100644
@@ -108,8 +108,6 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
 #define pte_valid(pte)		(!!(pte_val(pte) & PTE_VALID))
 #define pte_valid_not_user(pte) \
 	((pte_val(pte) & (PTE_VALID | PTE_USER)) == PTE_VALID)
-#define pte_valid_young(pte) \
-	((pte_val(pte) & (PTE_VALID | PTE_AF)) == (PTE_VALID | PTE_AF))
 #define pte_valid_user(pte) \
 	((pte_val(pte) & (PTE_VALID | PTE_USER)) == (PTE_VALID | PTE_USER))
 
@@ -117,9 +115,12 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
  * Could the pte be present in the TLB? We must check mm_tlb_flush_pending
  * so that we don't erroneously return false for pages that have been
  * remapped as PROT_NONE but are yet to be flushed from the TLB.
+ * Note that we can't make any assumptions based on the state of the access
+ * flag, since ptep_clear_flush_young() elides a DSB when invalidating the
+ * TLB.
  */
 #define pte_accessible(mm, pte)	\
-	(mm_tlb_flush_pending(mm) ? pte_present(pte) : pte_valid_young(pte))
+	(mm_tlb_flush_pending(mm) ? pte_present(pte) : pte_valid(pte))
 
 /*
  * p??_access_permitted() is true for valid user mappings (subject to the
@@ -145,13 +146,6 @@ static inline pte_t set_pte_bit(pte_t pte, pgprot_t prot)
 	return pte;
 }
 
-static inline pte_t pte_wrprotect(pte_t pte)
-{
-	pte = clear_pte_bit(pte, __pgprot(PTE_WRITE));
-	pte = set_pte_bit(pte, __pgprot(PTE_RDONLY));
-	return pte;
-}
-
 static inline pte_t pte_mkwrite(pte_t pte)
 {
 	pte = set_pte_bit(pte, __pgprot(PTE_WRITE));
@@ -177,6 +171,20 @@ static inline pte_t pte_mkdirty(pte_t pte)
 	return pte;
 }
 
+static inline pte_t pte_wrprotect(pte_t pte)
+{
+	/*
+	 * If hardware-dirty (PTE_WRITE/DBM bit set and PTE_RDONLY
+	 * clear), set the PTE_DIRTY bit.
+	 */
+	if (pte_hw_dirty(pte))
+		pte = pte_mkdirty(pte);
+
+	pte = clear_pte_bit(pte, __pgprot(PTE_WRITE));
+	pte = set_pte_bit(pte, __pgprot(PTE_RDONLY));
+	return pte;
+}
+
 static inline pte_t pte_mkold(pte_t pte)
 {
 	return clear_pte_bit(pte, __pgprot(PTE_AF));
@@ -798,12 +806,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres
 	pte = READ_ONCE(*ptep);
 	do {
 		old_pte = pte;
-		/*
-		 * If hardware-dirty (PTE_WRITE/DBM bit set and PTE_RDONLY
-		 * clear), set the PTE_DIRTY bit.
-		 */
-		if (pte_hw_dirty(pte))
-			pte = pte_mkdirty(pte);
 		pte = pte_wrprotect(pte);
 		pte_val(pte) = cmpxchg_relaxed(&pte_val(*ptep),
 					       pte_val(old_pte), pte_val(pte));
arch/arm64/kvm/vgic/vgic-mmio-v3.c +20 -2
index 5c786b915cd3..39c34d92b601 100644
@@ -273,6 +273,23 @@ static unsigned long vgic_mmio_read_v3r_typer(struct kvm_vcpu *vcpu,
 	return extract_bytes(value, addr & 7, len);
 }
 
+static unsigned long vgic_uaccess_read_v3r_typer(struct kvm_vcpu *vcpu,
+						 gpa_t addr, unsigned int len)
+{
+	unsigned long mpidr = kvm_vcpu_get_mpidr_aff(vcpu);
+	int target_vcpu_id = vcpu->vcpu_id;
+	u64 value;
+
+	value = (u64)(mpidr & GENMASK(23, 0)) << 32;
+	value |= ((target_vcpu_id & 0xffff) << 8);
+
+	if (vgic_has_its(vcpu->kvm))
+		value |= GICR_TYPER_PLPIS;
+
+	/* reporting of the Last bit is not supported for userspace */
+	return extract_bytes(value, addr & 7, len);
+}
+
 static unsigned long vgic_mmio_read_v3r_iidr(struct kvm_vcpu *vcpu,
 					     gpa_t addr, unsigned int len)
 {
@@ -593,8 +610,9 @@ static const struct vgic_register_region vgic_v3_rd_registers[] = {
 	REGISTER_DESC_WITH_LENGTH(GICR_IIDR,
 		vgic_mmio_read_v3r_iidr, vgic_mmio_write_wi, 4,
 		VGIC_ACCESS_32bit),
-	REGISTER_DESC_WITH_LENGTH(GICR_TYPER,
-		vgic_mmio_read_v3r_typer, vgic_mmio_write_wi, 8,
+	REGISTER_DESC_WITH_LENGTH_UACCESS(GICR_TYPER,
+		vgic_mmio_read_v3r_typer, vgic_mmio_write_wi,
+		vgic_uaccess_read_v3r_typer, vgic_mmio_uaccess_write_wi, 8,
 		VGIC_ACCESS_64bit | VGIC_ACCESS_32bit),
 	REGISTER_DESC_WITH_LENGTH(GICR_WAKER,
 		vgic_mmio_read_raz, vgic_mmio_write_wi, 4,
arch/mips/include/asm/pgtable-32.h +3 -0
index a950fc1ddb4d..6c0532d7b211 100644
@@ -154,6 +154,7 @@ static inline void pmd_clear(pmd_t *pmdp)
 
 #if defined(CONFIG_XPA)
 
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
 #define pte_pfn(x)		(((unsigned long)((x).pte_high >> _PFN_SHIFT)) | (unsigned long)((x).pte_low << _PAGE_PRESENT_SHIFT))
 static inline pte_t
 pfn_pte(unsigned long pfn, pgprot_t prot)
@@ -169,6 +170,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot)
 
 #elif defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
 
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
 #define pte_pfn(x)		((unsigned long)((x).pte_high >> 6))
 
 static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)
@@ -183,6 +185,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)
 
 #else
 
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
 #ifdef CONFIG_CPU_VR41XX
 #define pte_pfn(x)		((unsigned long)((x).pte >> (PAGE_SHIFT + 2)))
 #define pfn_pte(pfn, prot)	__pte(((pfn) << (PAGE_SHIFT + 2)) | pgprot_val(prot))
arch/powerpc/include/asm/book3s/32/pgtable.h +2 -0
index 36443cda8dcf..1376be95e975 100644
@@ -36,8 +36,10 @@ static inline bool pte_user(pte_t pte)
  */
 #ifdef CONFIG_PTE_64BIT
 #define PTE_RPN_MASK	(~((1ULL << PTE_RPN_SHIFT) - 1))
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
 #else
 #define PTE_RPN_MASK	(~((1UL << PTE_RPN_SHIFT) - 1))
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
 #endif
 
 /*
arch/powerpc/include/asm/book3s/64/kup-radix.h +2 -0
index 28716e2f13e3..a39e2d193fdc 100644
@@ -63,6 +63,8 @@
 
 #else /* !__ASSEMBLY__ */
 
+#include <linux/jump_label.h>
+
 DECLARE_STATIC_KEY_FALSE(uaccess_flush_key);
 
 #ifdef CONFIG_PPC_KUAP
arch/powerpc/include/asm/nohash/32/pgtable.h +2 -0
index b9e134d0f03a..5f5049c1ddb7 100644
@@ -153,8 +153,10 @@ int map_kernel_page(unsigned long va, phys_addr_t pa, pgprot_t prot);
  */
 #if defined(CONFIG_PPC32) && defined(CONFIG_PTE_64BIT)
 #define PTE_RPN_MASK	(~((1ULL << PTE_RPN_SHIFT) - 1))
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
 #else
 #define PTE_RPN_MASK	(~((1UL << PTE_RPN_SHIFT) - 1))
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
 #endif
 
 /*
arch/powerpc/kernel/exceptions-64s.S +7 -6
index f63a3d3bca3d..4d01f09ecf80 100644
@@ -1000,8 +1000,6 @@ TRAMP_REAL_BEGIN(system_reset_idle_wake)
  * Vectors for the FWNMI option.  Share common code.
  */
 TRAMP_REAL_BEGIN(system_reset_fwnmi)
-	/* XXX: fwnmi guest could run a nested/PR guest, so why no test?  */
-	__IKVM_REAL(system_reset)=0
 	GEN_INT_ENTRY system_reset, virt=0
 
 #endif /* CONFIG_PPC_PSERIES */
@@ -1412,6 +1410,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
  *   If none is found, do a Linux page fault. Linux page faults can happen in
  *   kernel mode due to user copy operations of course.
  *
+ *   KVM: The KVM HDSI handler may perform a load with MSR[DR]=1 in guest
+ *   MMU context, which may cause a DSI in the host, which must go to the
+ *   KVM handler. MSR[IR] is not enabled, so the real-mode handler will
+ *   always be used regardless of AIL setting.
+ *
  * - Radix MMU
  *   The hardware loads from the Linux page table directly, so a fault goes
  *   immediately to Linux page fault.
@@ -1422,10 +1425,8 @@ INT_DEFINE_BEGIN(data_access)
 	IVEC=0x300
 	IDAR=1
 	IDSISR=1
-#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
 	IKVM_SKIP=1
 	IKVM_REAL=1
-#endif
 INT_DEFINE_END(data_access)
 
 EXC_REAL_BEGIN(data_access, 0x300, 0x80)
@@ -1464,6 +1465,8 @@ ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_TYPE_RADIX)
  *   ppc64_bolted_size (first segment). The kernel handler must avoid stomping
  *   on user-handler data structures.
  *
+ *   KVM: Same as 0x300, DSLB must test for KVM guest.
+ *
  * A dedicated save area EXSLB is used (XXX: but it actually need not be
  * these days, we could use EXGEN).
  */
@@ -1472,10 +1475,8 @@ INT_DEFINE_BEGIN(data_access_slb)
 	IAREA=PACA_EXSLB
 	IRECONCILE=0
 	IDAR=1
-#ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
 	IKVM_SKIP=1
 	IKVM_REAL=1
-#endif
 INT_DEFINE_END(data_access_slb)
 
 EXC_REAL_BEGIN(data_access_slb, 0x380, 0x80)
arch/powerpc/kvm/book3s_xive_native.c +7 -0
index bdea91df1497..eed17b1ef772 100644
@@ -251,6 +251,13 @@ static vm_fault_t xive_native_esb_fault(struct vm_fault *vmf)
 	}
 
 	state = &sb->irq_state[src];
+
+	/* Some sanity checking */
+	if (!state->valid) {
+		pr_devel("%s: source %lx invalid !\n", __func__, irq);
+		return VM_FAULT_SIGBUS;
+	}
+
 	kvmppc_xive_select_irq(state, &hw_num, &xd);
 
 	arch_spin_lock(&sb->lock);
arch/riscv/include/asm/pgtable-32.h +2 -0
index b0ab66e5fdb1..5b2e79e5bfa5 100644
@@ -14,4 +14,6 @@
 #define PGDIR_SIZE      (_AC(1, UL) << PGDIR_SHIFT)
 #define PGDIR_MASK      (~(PGDIR_SIZE - 1))
 
+#define MAX_POSSIBLE_PHYSMEM_BITS 34
+
 #endif /* _ASM_RISCV_PGTABLE_32_H */
arch/riscv/include/asm/vdso/processor.h +2 -0
index 82a5693b1861..134388cbaaa1 100644
@@ -4,6 +4,8 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/barrier.h>
+
 static inline void cpu_relax(void)
 {
 #ifdef __riscv_muldiv
arch/riscv/kernel/setup.c +1 -0
index 2c6dd329312b..3de5234b6de5 100644
@@ -69,6 +69,7 @@ void __init setup_arch(char **cmdline_p)
 
 	*cmdline_p = boot_command_line;
 
+	jump_label_init();
 	parse_early_param();
 
 	setup_bootmem();
arch/riscv/kernel/vdso/Makefile +1 -1
index cb8f9e4cfcbf..0cfd6da784f8 100644
@@ -44,7 +44,7 @@ SYSCFLAGS_vdso.so.dbg = $(c_flags)
 $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
 	$(call if_changed,vdsold)
 SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
-	-Wl,--build-id -Wl,--hash-style=both
+	-Wl,--build-id=sha1 -Wl,--hash-style=both
 
 # We also create a special relocatable object that should mirror the symbol
 # table and layout of the linked DSO. With ld --just-symbols we can then
arch/s390/kernel/asm-offsets.c +5 -5
index 5d8cc1864566..62a18dee4c36 100644
@@ -53,11 +53,11 @@ int main(void)
 	/* stack_frame offsets */
 	OFFSET(__SF_BACKCHAIN, stack_frame, back_chain);
 	OFFSET(__SF_GPRS, stack_frame, gprs);
-	OFFSET(__SF_EMPTY, stack_frame, empty1);
-	OFFSET(__SF_SIE_CONTROL, stack_frame, empty1[0]);
-	OFFSET(__SF_SIE_SAVEAREA, stack_frame, empty1[1]);
-	OFFSET(__SF_SIE_REASON, stack_frame, empty1[2]);
-	OFFSET(__SF_SIE_FLAGS, stack_frame, empty1[3]);
+	OFFSET(__SF_EMPTY, stack_frame, empty1[0]);
+	OFFSET(__SF_SIE_CONTROL, stack_frame, empty1[1]);
+	OFFSET(__SF_SIE_SAVEAREA, stack_frame, empty1[2]);
+	OFFSET(__SF_SIE_REASON, stack_frame, empty1[3]);
+	OFFSET(__SF_SIE_FLAGS, stack_frame, empty1[4]);
 	BLANK();
 	/* timeval/timezone offsets for use by vdso */
 	OFFSET(__VDSO_UPD_COUNT, vdso_data, tb_update_count);
arch/s390/kernel/entry.S +2 -0
index 3349750f930e..ca55db082353 100644
@@ -1072,6 +1072,7 @@ EXPORT_SYMBOL(save_fpu_regs)
  *	%r4
  */
 load_fpu_regs:
+	stnsm	__SF_EMPTY(%r15),0xfc
 	lg	%r4,__LC_CURRENT
 	aghi	%r4,__TASK_thread
 	TSTMSK	__LC_CPU_FLAGS,_CIF_FPU
@@ -1103,6 +1104,7 @@ load_fpu_regs:
 .Lload_fpu_regs_done:
 	ni	__LC_CPU_FLAGS+7,255-_CIF_FPU
 .Lload_fpu_regs_exit:
+	ssm	__SF_EMPTY(%r15)
 	BR_EX	%r14
 .Lload_fpu_regs_end:
 ENDPROC(load_fpu_regs)
arch/s390/kvm/kvm-s390.c +1 -3
index 6b74b92c1a58..425d3d75320b 100644
@@ -2312,7 +2312,7 @@ static int kvm_s390_handle_pv(struct kvm *kvm, struct kvm_pv_cmd *cmd)
 		struct kvm_s390_pv_unp unp = {};
 
 		r = -EINVAL;
-		if (!kvm_s390_pv_is_protected(kvm))
+		if (!kvm_s390_pv_is_protected(kvm) || !mm_is_protected(kvm->mm))
 			break;
 
 		r = -EFAULT;
@@ -3564,7 +3564,6 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu)
 		vcpu->arch.sie_block->pp = 0;
 		vcpu->arch.sie_block->fpf &= ~FPF_BPBC;
 		vcpu->arch.sie_block->todpr = 0;
-		vcpu->arch.sie_block->cpnc = 0;
 	}
 }
 
@@ -3582,7 +3581,6 @@ static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu)
 
 	regs->etoken = 0;
 	regs->etoken_extension = 0;
-	regs->diag318 = 0;
 }
 
 int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
arch/s390/kvm/pv.c +2 -1
index eb99e2f95ebe..f5847f9dec7c 100644
@@ -208,7 +208,6 @@ int kvm_s390_pv_init_vm(struct kvm *kvm, u16 *rc, u16 *rrc)
 		return -EIO;
 	}
 	kvm->arch.gmap->guest_handle = uvcb.guest_handle;
-	atomic_set(&kvm->mm->context.is_protected, 1);
 	return 0;
 }
 
@@ -228,6 +227,8 @@ int kvm_s390_pv_set_sec_parms(struct kvm *kvm, void *hdr, u64 length, u16 *rc,
 	*rrc = uvcb.header.rrc;
 	KVM_UV_EVENT(kvm, 3, "PROTVIRT VM SET PARMS: rc %x rrc %x",
 		     *rc, *rrc);
+	if (!cc)
+		atomic_set(&kvm->mm->context.is_protected, 1);
 	return cc ? -EINVAL : 0;
 }
 
arch/s390/mm/gmap.c +2 -0
index 373542ca1113..78dbba6a4500 100644
@@ -2690,6 +2690,8 @@ static const struct mm_walk_ops reset_acc_walk_ops = {
 #include <linux/sched/mm.h>
 void s390_reset_acc(struct mm_struct *mm)
 {
+	if (!mm_is_protected(mm))
+		return;
 	/*
 	 * we might be called during
 	 * reset:                             we walk the pages and clear
arch/x86/events/intel/cstate.c +3 -3
index 442e1ed4acd4..4eb7ee5fed72 100644
@@ -107,14 +107,14 @@
 MODULE_LICENSE("GPL");
 
 #define DEFINE_CSTATE_FORMAT_ATTR(_var, _name, _format)		\
-static ssize_t __cstate_##_var##_show(struct kobject *kobj,	\
-				struct kobj_attribute *attr,	\
+static ssize_t __cstate_##_var##_show(struct device *dev,	\
+				struct device_attribute *attr,	\
 				char *page)			\
 {								\
 	BUILD_BUG_ON(sizeof(_format) >= PAGE_SIZE);		\
 	return sprintf(page, _format "\n");			\
 }								\
-static struct kobj_attribute format_attr_##_var =		\
+static struct device_attribute format_attr_##_var =		\
 	__ATTR(_name, 0444, __cstate_##_var##_show, NULL)
 
 static ssize_t cstate_get_attr_cpumask(struct device *dev,
arch/x86/events/intel/uncore.c +2 -2
index d5c6d3b340c5..803601baa753 100644
@@ -92,8 +92,8 @@ struct pci2phy_map *__find_pci2phy_map(int segment)
 	return map;
 }
 
-ssize_t uncore_event_show(struct kobject *kobj,
-			  struct kobj_attribute *attr, char *buf)
+ssize_t uncore_event_show(struct device *dev,
+			  struct device_attribute *attr, char *buf)
 {
 	struct uncore_event_desc *event =
 		container_of(attr, struct uncore_event_desc, attr);
arch/x86/events/intel/uncore.h +6 -6
index 105fdc69825e..c5744783e05d 100644
@@ -157,7 +157,7 @@ struct intel_uncore_box {
 #define UNCORE_BOX_FLAG_CFL8_CBOX_MSR_OFFS	2
 
 struct uncore_event_desc {
-	struct kobj_attribute attr;
+	struct device_attribute attr;
 	const char *config;
 };
 
@@ -179,8 +179,8 @@ struct pci2phy_map {
 struct pci2phy_map *__find_pci2phy_map(int segment);
 int uncore_pcibus_to_physid(struct pci_bus *bus);
 
-ssize_t uncore_event_show(struct kobject *kobj,
-			  struct kobj_attribute *attr, char *buf);
+ssize_t uncore_event_show(struct device *dev,
+			  struct device_attribute *attr, char *buf);
 
 static inline struct intel_uncore_pmu *dev_to_uncore_pmu(struct device *dev)
 {
@@ -201,14 +201,14 @@ extern int __uncore_max_dies;
 }
 
 #define DEFINE_UNCORE_FORMAT_ATTR(_var, _name, _format)			\
-static ssize_t __uncore_##_var##_show(struct kobject *kobj,		\
-				struct kobj_attribute *attr,		\
+static ssize_t __uncore_##_var##_show(struct device *dev,		\
+				struct device_attribute *attr,		\
 				char *page)				\
 {									\
 	BUILD_BUG_ON(sizeof(_format) >= PAGE_SIZE);			\
 	return sprintf(page, _format "\n");				\
 }									\
-static struct kobj_attribute format_attr_##_var =			\
+static struct device_attribute format_attr_##_var =			\
 	__ATTR(_name, 0444, __uncore_##_var##_show, NULL)
 
 static inline bool uncore_pmc_fixed(int idx)
arch/x86/events/rapl.c +1 -13
index 67b411f7e8c4..abaed3621225 100644
@@ -93,18 +93,6 @@ static const char *const rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
  * any other bit is reserved
  */
 #define RAPL_EVENT_MASK	0xFFULL
-
-#define DEFINE_RAPL_FORMAT_ATTR(_var, _name, _format)		\
-static ssize_t __rapl_##_var##_show(struct kobject *kobj,	\
-				struct kobj_attribute *attr,	\
-				char *page)			\
-{								\
-	BUILD_BUG_ON(sizeof(_format) >= PAGE_SIZE);		\
-	return sprintf(page, _format "\n");			\
-}								\
-static struct kobj_attribute format_attr_##_var =		\
-	__ATTR(_name, 0444, __rapl_##_var##_show, NULL)
-
 #define RAPL_CNTR_WIDTH 32
 
 #define RAPL_EVENT_ATTR_STR(_name, v, str)					\
@@ -441,7 +429,7 @@ static struct attribute_group rapl_pmu_events_group = {
 	.attrs = attrs_empty,
 };
 
-DEFINE_RAPL_FORMAT_ATTR(event, event, "config:0-7");
+PMU_FORMAT_ATTR(event, "config:0-7");
 static struct attribute *rapl_formats_attr[] = {
 	&format_attr_event.attr,
 	NULL,
arch/x86/include/asm/kvm_host.h +1 -0
index 5303dbc5c9bc..7b54213551c6 100644
@@ -1603,6 +1603,7 @@ int kvm_test_age_hva(struct kvm *kvm, unsigned long hva);
 int kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte);
 int kvm_cpu_has_injectable_intr(struct kvm_vcpu *v);
 int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu);
+int kvm_cpu_has_extint(struct kvm_vcpu *v);
 int kvm_arch_interrupt_allowed(struct kvm_vcpu *vcpu);
 int kvm_cpu_get_interrupt(struct kvm_vcpu *v);
 void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event);
arch/x86/kernel/cpu/bugs.c +2 -2
index 581fb7223ad0..d41b70fe4918 100644
@@ -739,11 +739,13 @@ spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)
 	if (boot_cpu_has(X86_FEATURE_IBPB)) {
 		setup_force_cpu_cap(X86_FEATURE_USE_IBPB);
 
+		spectre_v2_user_ibpb = mode;
 		switch (cmd) {
 		case SPECTRE_V2_USER_CMD_FORCE:
 		case SPECTRE_V2_USER_CMD_PRCTL_IBPB:
 		case SPECTRE_V2_USER_CMD_SECCOMP_IBPB:
 			static_branch_enable(&switch_mm_always_ibpb);
+			spectre_v2_user_ibpb = SPECTRE_V2_USER_STRICT;
 			break;
 		case SPECTRE_V2_USER_CMD_PRCTL:
 		case SPECTRE_V2_USER_CMD_AUTO:
@@ -757,8 +759,6 @@ spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)
 		pr_info("mitigation: Enabling %s Indirect Branch Prediction Barrier\n",
 			static_key_enabled(&switch_mm_always_ibpb) ?
 			"always-on" : "conditional");
-
-		spectre_v2_user_ibpb = mode;
 	}
 
 	/*
arch/x86/kernel/cpu/mce/core.c +4 -2
index de29c4a267c0..35a6eb03a6a0 100644
@@ -1363,8 +1363,10 @@ noinstr void do_machine_check(struct pt_regs *regs)
 	 * When there's any problem use only local no_way_out state.
 	 */
 	if (!lmce) {
-		if (mce_end(order) < 0)
-			no_way_out = worst >= MCE_PANIC_SEVERITY;
+		if (mce_end(order) < 0) {
+			if (!no_way_out)
+				no_way_out = worst >= MCE_PANIC_SEVERITY;
+		}
 	} else {
 		/*
 		 * If there was a fatal machine check we should have
arch/x86/kernel/cpu/resctrl/rdtgroup.c +26 -39

166 lines not on this page · raw message

arch/x86/kernel/dumpstack.c +19 -4
index ea8d51ec251b..4da8345d34bb 100644
@@ -77,6 +77,9 @@ static int copy_code(struct pt_regs *regs, u8 *buf, unsigned long src,
 	if (!user_mode(regs))
 		return copy_from_kernel_nofault(buf, (u8 *)src, nbytes);
 
+	/* The user space code from other tasks cannot be accessed. */
+	if (regs != task_pt_regs(current))
+		return -EPERM;
 	/*
 	 * Make sure userspace isn't trying to trick us into dumping kernel
 	 * memory by pointing the userspace instruction pointer at it.
@@ -84,6 +87,12 @@ static int copy_code(struct pt_regs *regs, u8 *buf, unsigned long src,
 	if (__chk_range_not_ok(src, nbytes, TASK_SIZE_MAX))
 		return -EINVAL;
 
+	/*
+	 * Even if named copy_from_user_nmi() this can be invoked from
+	 * other contexts and will not try to resolve a pagefault, which is
+	 * the correct thing to do here as this code can be called from any
+	 * context.
+	 */
 	return copy_from_user_nmi(buf, (void __user *)src, nbytes);
 }
 
@@ -114,13 +123,19 @@ void show_opcodes(struct pt_regs *regs, const char *loglvl)
 	u8 opcodes[OPCODE_BUFSIZE];
 	unsigned long prologue = regs->ip - PROLOGUE_SIZE;
 
-	if (copy_code(regs, opcodes, prologue, sizeof(opcodes))) {
-		printk("%sCode: Unable to access opcode bytes at RIP 0x%lx.\n",
-		       loglvl, prologue);
-	} else {
+	switch (copy_code(regs, opcodes, prologue, sizeof(opcodes))) {
+	case 0:
 		printk("%sCode: %" __stringify(PROLOGUE_SIZE) "ph <%02x> %"
 		       __stringify(EPILOGUE_SIZE) "ph\n", loglvl, opcodes,
 		       opcodes[PROLOGUE_SIZE], opcodes + PROLOGUE_SIZE + 1);
+		break;
+	case -EPERM:
+		/* No access to the user space stack of other tasks. Ignore. */
+		break;
+	default:
+		printk("%sCode: Unable to access opcode bytes at RIP 0x%lx.\n",
+		       loglvl, prologue);
+		break;
 	}
 }
 
arch/x86/kernel/tboot.c +1 -4
index 420be871d9d4..ae64f98ec2ab 100644
@@ -514,13 +514,10 @@ int tboot_force_iommu(void)
 	if (!tboot_enabled())
 		return 0;
 
-	if (no_iommu || swiotlb || dmar_disabled)
+	if (no_iommu || dmar_disabled)
 		pr_warn("Forcing Intel-IOMMU to enabled\n");
 
 	dmar_disabled = 0;
-#ifdef CONFIG_SWIOTLB
-	swiotlb = 0;
-#endif
 	no_iommu = 0;
 
 	return 1;
arch/x86/kvm/irq.c +34 -51

118 lines not on this page · raw message

arch/x86/kvm/lapic.c +1 -1
index 8055a486d843..1fc1a8e8cce0 100644
@@ -2461,7 +2461,7 @@ int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu)
 	struct kvm_lapic *apic = vcpu->arch.apic;
 	u32 ppr;
 
-	if (!kvm_apic_hw_enabled(apic))
+	if (!kvm_apic_present(vcpu))
 		return -1;
 
 	__apic_update_ppr(apic, &ppr);
arch/x86/kvm/x86.c +10 -8
index bacfc9e94a62..6e5ed3dc4f29 100644
@@ -3839,21 +3839,23 @@ static int kvm_vcpu_ioctl_set_lapic(struct kvm_vcpu *vcpu,
 
 static int kvm_cpu_accept_dm_intr(struct kvm_vcpu *vcpu)
 {
+	/*
+	 * We can accept userspace's request for interrupt injection
+	 * as long as we have a place to store the interrupt number.
+	 * The actual injection will happen when the CPU is able to
+	 * deliver the interrupt.
+	 */
+	if (kvm_cpu_has_extint(vcpu))
+		return false;
+
+	/* Acknowledging ExtINT does not happen if LINT0 is masked.  */
 	return (!lapic_in_kernel(vcpu) ||
 		kvm_apic_accept_pic_intr(vcpu));
 }
 
-/*
- * if userspace requested an interrupt window, check that the
- * interrupt window is open.
- *
- * No need to exit to userspace if we already have an interrupt queued.
- */
 static int kvm_vcpu_ready_for_interrupt_injection(struct kvm_vcpu *vcpu)
 {
 	return kvm_arch_interrupt_allowed(vcpu) &&
-		!kvm_cpu_has_interrupt(vcpu) &&
-		!kvm_event_needs_reinjection(vcpu) &&
 		kvm_cpu_accept_dm_intr(vcpu);
 }
 
arch/x86/xen/spinlock.c +11 -1
index 799f4eba0a62..043c73dfd2c9 100644
@@ -93,10 +93,20 @@ void xen_init_lock_cpu(int cpu)
 
 void xen_uninit_lock_cpu(int cpu)
 {
+	int irq;
+
 	if (!xen_pvspin)
 		return;
 
-	unbind_from_irqhandler(per_cpu(lock_kicker_irq, cpu), NULL);
+	/*
+	 * When booting the kernel with 'mitigations=auto,nosmt', the secondary
+	 * CPUs are not activated, and lock_kicker_irq is not initialized.
+	 */
+	irq = per_cpu(lock_kicker_irq, cpu);
+	if (irq == -1)
+		return;
+
+	unbind_from_irqhandler(irq, NULL);
 	per_cpu(lock_kicker_irq, cpu) = -1;
 	kfree(per_cpu(irq_name, cpu));
 	per_cpu(irq_name, cpu) = NULL;
arch/xtensa/include/asm/uaccess.h +1 -1
index b9758119feca..5c9fb8005aa8 100644
@@ -302,7 +302,7 @@ strncpy_from_user(char *dst, const char __user *src, long count)
 	return -EFAULT;
 }
 #else
-long strncpy_from_user(char *dst, const char *src, long count);
+long strncpy_from_user(char *dst, const char __user *src, long count);
 #endif
 
 /*
block/keyslot-manager.c +7 -0
index 35abcb1ec051..86f8195d8039 100644
@@ -103,6 +103,13 @@ int blk_ksm_init(struct blk_keyslot_manager *ksm, unsigned int num_slots)
 	spin_lock_init(&ksm->idle_slots_lock);
 
 	slot_hashtable_size = roundup_pow_of_two(num_slots);
+	/*
+	 * hash_ptr() assumes bits != 0, so ensure the hash table has at least 2
+	 * buckets.  This only makes a difference when there is only 1 keyslot.
+	 */
+	if (slot_hashtable_size < 2)
+		slot_hashtable_size = 2;
+
 	ksm->log_slot_ht_size = ilog2(slot_hashtable_size);
 	ksm->slot_hashtable = kvmalloc_array(slot_hashtable_size,
 					     sizeof(ksm->slot_hashtable[0]),
drivers/bus/ti-sysc.c +19 -10
index efb088df1276..92ecf1a78ec7 100644
@@ -227,6 +227,9 @@ static int sysc_wait_softreset(struct sysc *ddata)
 	u32 sysc_mask, syss_done, rstval;
 	int syss_offset, error = 0;
 
+	if (ddata->cap->regbits->srst_shift < 0)
+		return 0;
+
 	syss_offset = ddata->offsets[SYSC_SYSSTATUS];
 	sysc_mask = BIT(ddata->cap->regbits->srst_shift);
 
@@ -970,9 +973,15 @@ static int sysc_enable_module(struct device *dev)
 			return error;
 		}
 	}
-	error = sysc_wait_softreset(ddata);
-	if (error)
-		dev_warn(ddata->dev, "OCP softreset timed out\n");
+	/*
+	 * Some modules like i2c and hdq1w have unusable reset status unless
+	 * the module reset quirk is enabled. Skip status check on enable.
+	 */
+	if (!(ddata->cfg.quirks & SYSC_MODULE_QUIRK_ENA_RESETDONE)) {
+		error = sysc_wait_softreset(ddata);
+		if (error)
+			dev_warn(ddata->dev, "OCP softreset timed out\n");
+	}
 	if (ddata->cfg.quirks & SYSC_QUIRK_OPT_CLKS_IN_RESET)
 		sysc_disable_opt_clocks(ddata);
 
@@ -1373,17 +1382,17 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
 	SYSC_QUIRK("hdmi", 0, 0, 0x10, -ENODEV, 0x50030200, 0xffffffff,
 		   SYSC_QUIRK_OPT_CLKS_NEEDED),
 	SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff,
-		   SYSC_MODULE_QUIRK_HDQ1W),
+		   SYSC_MODULE_QUIRK_HDQ1W | SYSC_MODULE_QUIRK_ENA_RESETDONE),
 	SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x0000000a, 0xffffffff,
-		   SYSC_MODULE_QUIRK_HDQ1W),
+		   SYSC_MODULE_QUIRK_HDQ1W | SYSC_MODULE_QUIRK_ENA_RESETDONE),
 	SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000036, 0x000000ff,
-		   SYSC_MODULE_QUIRK_I2C),
+		   SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
 	SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x0000003c, 0x000000ff,
-		   SYSC_MODULE_QUIRK_I2C),
+		   SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
 	SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000040, 0x000000ff,
-		   SYSC_MODULE_QUIRK_I2C),
+		   SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
 	SYSC_QUIRK("i2c", 0, 0, 0x10, 0x90, 0x5040000a, 0xfffff0f0,
-		   SYSC_MODULE_QUIRK_I2C),
+		   SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
 	SYSC_QUIRK("gpu", 0x50000000, 0x14, -ENODEV, -ENODEV, 0x00010201, 0xffffffff, 0),
 	SYSC_QUIRK("gpu", 0x50000000, 0xfe00, 0xfe10, -ENODEV, 0x40000000 , 0xffffffff,
 		   SYSC_MODULE_QUIRK_SGX),
@@ -2880,7 +2889,7 @@ static int sysc_check_active_timer(struct sysc *ddata)
 
 	if ((ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) &&
 	    (ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE))
-		return -EBUSY;
+		return -ENXIO;
 
 	return 0;
 }
drivers/cpuidle/cpuidle-tegra.c +2 -2
index e8956706a291..191966dc8d02 100644
@@ -189,7 +189,7 @@ static int tegra_cpuidle_state_enter(struct cpuidle_device *dev,
 	}
 
 	local_fiq_disable();
-	tegra_pm_set_cpu_in_lp2();
+	RCU_NONIDLE(tegra_pm_set_cpu_in_lp2());
 	cpu_pm_enter();
 
 	switch (index) {
@@ -207,7 +207,7 @@ static int tegra_cpuidle_state_enter(struct cpuidle_device *dev,
 	}
 
 	cpu_pm_exit();
-	tegra_pm_clear_cpu_in_lp2();
+	RCU_NONIDLE(tegra_pm_clear_cpu_in_lp2());
 	local_fiq_enable();
 
 	return err ?: index;
drivers/dma/pl330.c +1 -1
index 5274a0704d96..2c3c47e4f777 100644
@@ -2802,7 +2802,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,
 	 * If burst size is smaller than bus width then make sure we only
 	 * transfer one at a time to avoid a burst stradling an MFIFO entry.
 	 */
-	if (desc->rqcfg.brst_size * 8 < pl330->pcfg.data_bus_width)
+	if (burst * 8 < pl330->pcfg.data_bus_width)
 		desc->rqcfg.brst_len = 1;
 
 	desc->bytes_requested = len;
drivers/dma/xilinx/xilinx_dma.c +2 -2
index 0fc432567b85..993297d585c0 100644
@@ -517,8 +517,8 @@ struct xilinx_dma_device {
 #define to_dma_tx_descriptor(tx) \
 	container_of(tx, struct xilinx_dma_tx_descriptor, async_tx)
 #define xilinx_dma_poll_timeout(chan, reg, val, cond, delay_us, timeout_us) \
-	readl_poll_timeout(chan->xdev->regs + chan->ctrl_offset + reg, val, \
-			   cond, delay_us, timeout_us)
+	readl_poll_timeout_atomic(chan->xdev->regs + chan->ctrl_offset + reg, \
+				  val, cond, delay_us, timeout_us)
 
 /* IO accessors */
 static inline u32 dma_read(struct xilinx_dma_chan *chan, u32 reg)
drivers/firmware/efi/Kconfig +1 -1
index 3939699e62fe..929d6f05b6bb 100644
@@ -275,7 +275,7 @@ config EFI_DEV_PATH_PARSER
 
 config EFI_EARLYCON
 	def_bool y
-	depends on SERIAL_EARLYCON && !ARM && !IA64
+	depends on EFI && SERIAL_EARLYCON && !ARM && !IA64
 	select FONT_SUPPORT
 	select ARCH_USE_MEMREMAP_PROT
 
drivers/firmware/efi/efi.c +1 -1
index 3aa07c3b5136..8ead4379e6e8 100644
@@ -387,10 +387,10 @@ static int __init efisubsys_init(void)
 
 	if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE |
 				      EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)) {
-		efivar_ssdt_load();
 		error = generic_ops_register();
 		if (error)
 			goto err_put;
+		efivar_ssdt_load();
 		platform_device_register_simple("efivars", 0, NULL, 0);
 	}
 
drivers/firmware/xilinx/zynqmp.c +50 -15

116 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index b4a8da8fc8fd..1595b124c145 100644
@@ -4593,7 +4593,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev)
 	if (!amdgpu_device_supports_baco(adev->ddev))
 		return -ENOTSUPP;
 
-	if (ras && ras->supported)
+	if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
 		adev->nbio.funcs->enable_doorbell_interrupt(adev, false);
 
 	return amdgpu_dpm_baco_enter(adev);
@@ -4612,7 +4612,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
 	if (ret)
 		return ret;
 
-	if (ras && ras->supported)
+	if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
 		adev->nbio.funcs->enable_doorbell_interrupt(adev, true);
 
 	return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +6 -0
index 7c787ec598f1..d5e95e4ea5bd 100644
@@ -1571,6 +1571,12 @@ static int psp_get_fw_type(struct amdgpu_firmware_info *ucode,
 	case AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM:
 		*type = GFX_FW_TYPE_RLC_RESTORE_LIST_SRM_MEM;
 		break;
+	case AMDGPU_UCODE_ID_RLC_IRAM:
+		*type = GFX_FW_TYPE_RLC_IRAM;
+		break;
+	case AMDGPU_UCODE_ID_RLC_DRAM:
+		*type = GFX_FW_TYPE_RLC_DRAM_BOOT;
+		break;
 	case AMDGPU_UCODE_ID_SMC:
 		*type = GFX_FW_TYPE_SMU;
 		break;
drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h +4 -0
index 60bb3e8b3118..aeaaae713c59 100644
@@ -168,12 +168,16 @@ struct amdgpu_rlc {
 	u32 save_restore_list_cntl_size_bytes;
 	u32 save_restore_list_gpm_size_bytes;
 	u32 save_restore_list_srm_size_bytes;
+	u32 rlc_iram_ucode_size_bytes;
+	u32 rlc_dram_ucode_size_bytes;
 
 	u32 *register_list_format;
 	u32 *register_restore;
 	u8 *save_restore_list_cntl;
 	u8 *save_restore_list_gpm;
 	u8 *save_restore_list_srm;
+	u8 *rlc_iram_ucode;
+	u8 *rlc_dram_ucode;
 
 	bool is_rlc_v2_1;
 
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +10 -0
index 183743c5fb7b..c3cc2e8b2406 100644
@@ -500,6 +500,8 @@ static int amdgpu_ucode_init_single_fw(struct amdgpu_device *adev,
 	     ucode->ucode_id != AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL &&
 	     ucode->ucode_id != AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM &&
 	     ucode->ucode_id != AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM &&
+	     ucode->ucode_id != AMDGPU_UCODE_ID_RLC_IRAM &&
+	     ucode->ucode_id != AMDGPU_UCODE_ID_RLC_DRAM &&
 		 ucode->ucode_id != AMDGPU_UCODE_ID_DMCU_ERAM &&
 		 ucode->ucode_id != AMDGPU_UCODE_ID_DMCU_INTV &&
 		 ucode->ucode_id != AMDGPU_UCODE_ID_DMCUB)) {
@@ -556,6 +558,14 @@ static int amdgpu_ucode_init_single_fw(struct amdgpu_device *adev,
 		ucode->ucode_size = adev->gfx.rlc.save_restore_list_srm_size_bytes;
 		memcpy(ucode->kaddr, adev->gfx.rlc.save_restore_list_srm,
 		       ucode->ucode_size);
+	} else if (ucode->ucode_id == AMDGPU_UCODE_ID_RLC_IRAM) {
+		ucode->ucode_size = adev->gfx.rlc.rlc_iram_ucode_size_bytes;
+		memcpy(ucode->kaddr, adev->gfx.rlc.rlc_iram_ucode,
+		       ucode->ucode_size);
+	} else if (ucode->ucode_id == AMDGPU_UCODE_ID_RLC_DRAM) {
+		ucode->ucode_size = adev->gfx.rlc.rlc_dram_ucode_size_bytes;
+		memcpy(ucode->kaddr, adev->gfx.rlc.rlc_dram_ucode,
+		       ucode->ucode_size);
 	} else if (ucode->ucode_id == AMDGPU_UCODE_ID_CP_MES) {
 		ucode->ucode_size = le32_to_cpu(mes_hdr->mes_ucode_size_bytes);
 		memcpy(ucode->kaddr, (void *)((uint8_t *)adev->mes.fw->data +
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +11 -0
index 12a8bc8fca0b..97c78d91fc2f 100644
@@ -221,6 +221,15 @@ struct rlc_firmware_header_v2_1 {
 	uint32_t save_restore_list_srm_offset_bytes;
 };
 
+/* version_major=2, version_minor=1 */
+struct rlc_firmware_header_v2_2 {
+	struct rlc_firmware_header_v2_1 v2_1;
+	uint32_t rlc_iram_ucode_size_bytes;
+	uint32_t rlc_iram_ucode_offset_bytes;
+	uint32_t rlc_dram_ucode_size_bytes;
+	uint32_t rlc_dram_ucode_offset_bytes;
+};
+
 /* version_major=1, version_minor=0 */
 struct sdma_firmware_header_v1_0 {
 	struct common_firmware_header header;
@@ -338,6 +347,8 @@ enum AMDGPU_UCODE_ID {
 	AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL,
 	AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM,
 	AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM,
+	AMDGPU_UCODE_ID_RLC_IRAM,
+	AMDGPU_UCODE_ID_RLC_DRAM,
 	AMDGPU_UCODE_ID_RLC_G,
 	AMDGPU_UCODE_ID_STORAGE,
 	AMDGPU_UCODE_ID_SMC,
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h +1 -0
index 5eb63288d157..edbb8194ee81 100644
@@ -67,6 +67,7 @@ struct amdgpu_uvd {
 	unsigned		harvest_config;
 	/* store image width to adjust nb memory state */
 	unsigned		decode_image_width;
+	uint32_t                keyselect;
 };
 
 int amdgpu_uvd_sw_init(struct amdgpu_device *adev);
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +35 -6

77 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h +2 -2
index cbc04a5c0fe1..baf994627b0d 100644
@@ -214,7 +214,7 @@ enum psp_gfx_fw_type {
 	GFX_FW_TYPE_UVD1        = 23,   /* UVD1                     VG-20   */
 	GFX_FW_TYPE_TOC         = 24,   /* TOC                      NV-10   */
 	GFX_FW_TYPE_RLC_P                           = 25,   /* RLC P                    NV      */
-	GFX_FW_TYPE_RLX6                            = 26,   /* RLX6                     NV      */
+	GFX_FW_TYPE_RLC_IRAM                        = 26,   /* RLC_IRAM                 NV      */
 	GFX_FW_TYPE_GLOBAL_TAP_DELAYS               = 27,   /* GLOBAL TAP DELAYS        NV      */
 	GFX_FW_TYPE_SE0_TAP_DELAYS                  = 28,   /* SE0 TAP DELAYS           NV      */
 	GFX_FW_TYPE_SE1_TAP_DELAYS                  = 29,   /* SE1 TAP DELAYS           NV      */
@@ -236,7 +236,7 @@ enum psp_gfx_fw_type {
 	GFX_FW_TYPE_ACCUM_CTRL_RAM                  = 45,   /* ACCUM CTRL RAM           NV      */
 	GFX_FW_TYPE_RLCP_CAM                        = 46,   /* RLCP CAM                 NV      */
 	GFX_FW_TYPE_RLC_SPP_CAM_EXT                 = 47,   /* RLC SPP CAM EXT          NV      */
-	GFX_FW_TYPE_RLX6_DRAM_BOOT                  = 48,   /* RLX6 DRAM BOOT           NV      */
+	GFX_FW_TYPE_RLC_DRAM_BOOT                   = 48,   /* RLC DRAM BOOT            NV      */
 	GFX_FW_TYPE_VCN0_RAM                        = 49,   /* VCN_RAM                  NV + RN */
 	GFX_FW_TYPE_VCN1_RAM                        = 50,   /* VCN_RAM                  NV + RN */
 	GFX_FW_TYPE_DMUB                            = 51,   /* DMUB                          RN */
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c +11 -9
index 7cf4b11a65c5..41800fcad410 100644
@@ -277,15 +277,8 @@ static void uvd_v3_1_mc_resume(struct amdgpu_device *adev)
  */
 static int uvd_v3_1_fw_validate(struct amdgpu_device *adev)
 {
-	void *ptr;
-	uint32_t ucode_len, i;
-	uint32_t keysel;
-
-	ptr = adev->uvd.inst[0].cpu_addr;
-	ptr += 192 + 16;
-	memcpy(&ucode_len, ptr, 4);
-	ptr += ucode_len;
-	memcpy(&keysel, ptr, 4);
+	int i;
+	uint32_t keysel = adev->uvd.keyselect;
 
 	WREG32(mmUVD_FW_START, keysel);
 
@@ -550,6 +543,8 @@ static int uvd_v3_1_sw_init(void *handle)
 	struct amdgpu_ring *ring;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 	int r;
+	void *ptr;
+	uint32_t ucode_len;
 
 	/* UVD TRAP */
 	r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, 124, &adev->uvd.inst->irq);
@@ -571,6 +566,13 @@ static int uvd_v3_1_sw_init(void *handle)
 	if (r)
 		return r;
 
+	/* Retrieval firmware validate key */
+	ptr = adev->uvd.inst[0].cpu_addr;
+	ptr += 192 + 16;
+	memcpy(&ucode_len, ptr, 4);
+	ptr += ucode_len;
+	memcpy(&adev->uvd.keyselect, ptr, 4);
+
 	r = amdgpu_uvd_entity_init(adev);
 
 	return r;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index 6beccd5a0941..640cbafdde10 100644
@@ -960,7 +960,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 	amdgpu_dm_init_color_mod();
 
 #ifdef CONFIG_DRM_AMD_DC_HDCP
-	if (adev->asic_type >= CHIP_RAVEN) {
+	if (adev->dm.dc->caps.max_links > 0 && adev->asic_type >= CHIP_RAVEN) {
 		adev->dm.hdcp_workqueue = hdcp_create_workqueue(adev, &init_params.cp_psp, adev->dm.dc);
 
 		if (!adev->dm.hdcp_workqueue)
drivers/gpu/drm/mediatek/mtk_dsi.c +22 -39

79 lines not on this page · raw message

drivers/gpu/drm/nouveau/nouveau_gem.c +5 -3
index 124d3dcc5c59..98e99aa8a547 100644
@@ -570,8 +570,10 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
 			NV_PRINTK(err, cli, "validating bo list\n");
 		validate_fini(op, chan, NULL, NULL);
 		return ret;
+	} else if (ret > 0) {
+		*apply_relocs = true;
 	}
-	*apply_relocs = ret;
+
 	return 0;
 }
 
@@ -674,7 +676,6 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
 		nouveau_bo_wr32(nvbo, r->reloc_bo_offset >> 2, data);
 	}
 
-	u_free(reloc);
 	return ret;
 }
 
@@ -884,9 +885,10 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
 				break;
 			}
 		}
-		u_free(reloc);
 	}
 out_prevalid:
+	if (!IS_ERR(reloc))
+		u_free(reloc);
 	u_free(bo);
 	u_free(push);
 
drivers/hid/hid-cypress.c +39 -5

70 lines not on this page · raw message

drivers/hid/hid-ids.h +9 -0
index 79495e218b7f..a6d63a759043 100644
@@ -331,6 +331,8 @@
 #define USB_DEVICE_ID_CYPRESS_BARCODE_4	0xed81
 #define USB_DEVICE_ID_CYPRESS_TRUETOUCH	0xc001
 
+#define USB_DEVICE_ID_CYPRESS_VARMILO_VA104M_07B1   0X07b1
+
 #define USB_VENDOR_ID_DATA_MODUL	0x7374
 #define USB_VENDOR_ID_DATA_MODUL_EASYMAXTOUCH	0x1201
 
@@ -443,6 +445,10 @@
 #define USB_VENDOR_ID_FRUCTEL	0x25B6
 #define USB_DEVICE_ID_GAMETEL_MT_MODE	0x0002
 
+#define USB_VENDOR_ID_GAMEVICE	0x27F8
+#define USB_DEVICE_ID_GAMEVICE_GV186	0x0BBE
+#define USB_DEVICE_ID_GAMEVICE_KISHI	0x0BBF
+
 #define USB_VENDOR_ID_GAMERON		0x0810
 #define USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR	0x0001
 #define USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR	0x0002
@@ -485,6 +491,7 @@
 #define USB_DEVICE_ID_PENPOWER		0x00f4
 
 #define USB_VENDOR_ID_GREENASIA		0x0e8f
+#define USB_DEVICE_ID_GREENASIA_DUAL_SAT_ADAPTOR 0x3010
 #define USB_DEVICE_ID_GREENASIA_DUAL_USB_JOYPAD	0x3013
 
 #define USB_VENDOR_ID_GRETAGMACBETH	0x0971
@@ -742,6 +749,7 @@
 #define USB_VENDOR_ID_LOGITECH		0x046d
 #define USB_DEVICE_ID_LOGITECH_AUDIOHUB 0x0a0e
 #define USB_DEVICE_ID_LOGITECH_T651	0xb00c
+#define USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD	0xb309
 #define USB_DEVICE_ID_LOGITECH_C007	0xc007
 #define USB_DEVICE_ID_LOGITECH_C077	0xc077
 #define USB_DEVICE_ID_LOGITECH_RECEIVER	0xc101
@@ -1297,6 +1305,7 @@
 
 #define USB_VENDOR_ID_UGTIZER			0x2179
 #define USB_DEVICE_ID_UGTIZER_TABLET_GP0610	0x0053
+#define USB_DEVICE_ID_UGTIZER_TABLET_GT5040	0x0077
 
 #define USB_VENDOR_ID_VIEWSONIC			0x0543
 #define USB_DEVICE_ID_VIEWSONIC_PD1011		0xe621
drivers/hid/hid-input.c +3 -0
index 9770db624bfa..4dca11392459 100644
@@ -319,6 +319,9 @@ static const struct hid_device_id hid_battery_quirks[] = {
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ASUSTEK,
 		USB_DEVICE_ID_ASUSTEK_T100CHI_KEYBOARD),
 	  HID_BATTERY_QUIRK_IGNORE },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH,
+		USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD),
+	  HID_BATTERY_QUIRK_IGNORE },
 	{}
 };
 
drivers/hid/hid-ite.c +60 -1

85 lines not on this page · raw message

drivers/hid/hid-logitech-hidpp.c +6 -0
index a2991622702a..0ca723119547 100644
@@ -3997,6 +3997,9 @@ static const struct hid_device_id hidpp_devices[] = {
 	{ /* Keyboard MX5000 (Bluetooth-receiver in HID proxy mode) */
 	  LDJ_DEVICE(0xb305),
 	  .driver_data = HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS },
+	{ /* Dinovo Edge (Bluetooth-receiver in HID proxy mode) */
+	  LDJ_DEVICE(0xb309),
+	  .driver_data = HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS },
 	{ /* Keyboard MX5500 (Bluetooth-receiver in HID proxy mode) */
 	  LDJ_DEVICE(0xb30b),
 	  .driver_data = HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS },
@@ -4039,6 +4042,9 @@ static const struct hid_device_id hidpp_devices[] = {
 	{ /* MX5000 keyboard over Bluetooth */
 	  HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb305),
 	  .driver_data = HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS },
+	{ /* Dinovo Edge keyboard over Bluetooth */
+	  HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb309),
+	  .driver_data = HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS },
 	{ /* MX5500 keyboard over Bluetooth */
 	  HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb30b),
 	  .driver_data = HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS },
drivers/hid/hid-quirks.c +5 -0
index 7a2be0205dfd..bf7ecab5d9e5 100644
@@ -83,7 +83,12 @@ static const struct hid_device_id hid_quirks[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER), HID_QUIRK_NO_INIT_REPORTS },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28), HID_QUIRK_NOGET },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_FUTABA, USB_DEVICE_ID_LED_DISPLAY), HID_QUIRK_NO_INIT_REPORTS },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, USB_DEVICE_ID_GREENASIA_DUAL_SAT_ADAPTOR), HID_QUIRK_MULTI_INPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, USB_DEVICE_ID_GREENASIA_DUAL_USB_JOYPAD), HID_QUIRK_MULTI_INPUT },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_GAMEVICE, USB_DEVICE_ID_GAMEVICE_GV186),
+		HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_GAMEVICE, USB_DEVICE_ID_GAMEVICE_KISHI),
+		HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING), HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING), HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING), HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
drivers/hid/hid-sensor-hub.c +2 -1
index 94c7398b5c27..3dd7d3246737 100644
@@ -483,7 +483,8 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
 		return 1;
 
 	ptr = raw_data;
-	ptr++; /* Skip report id */
+	if (report->id)
+		ptr++; /* Skip report id */
 
 	spin_lock_irqsave(&pdata->lock, flags);
 
drivers/hid/hid-uclogic-core.c +2 -0
index 86b568037cb8..8e9c9e646cb7 100644
@@ -385,6 +385,8 @@ static const struct hid_device_id uclogic_devices[] = {
 				USB_DEVICE_ID_UCLOGIC_DRAWIMAGE_G3) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UGTIZER,
 				USB_DEVICE_ID_UGTIZER_TABLET_GP0610) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_UGTIZER,
+				USB_DEVICE_ID_UGTIZER_TABLET_GT5040) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UGEE,
 				USB_DEVICE_ID_UGEE_TABLET_G5) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UGEE,
drivers/hid/hid-uclogic-params.c +2 -0
index 7d20d1fcf8d2..d26d8cd98efc 100644
@@ -997,6 +997,8 @@ int uclogic_params_init(struct uclogic_params *params,
 		break;
 	case VID_PID(USB_VENDOR_ID_UGTIZER,
 		     USB_DEVICE_ID_UGTIZER_TABLET_GP0610):
+	case VID_PID(USB_VENDOR_ID_UGTIZER,
+		     USB_DEVICE_ID_UGTIZER_TABLET_GT5040):
 	case VID_PID(USB_VENDOR_ID_UGEE,
 		     USB_DEVICE_ID_UGEE_XPPEN_TABLET_G540):
 	case VID_PID(USB_VENDOR_ID_UGEE,
drivers/infiniband/hw/hfi1/file_ops.c +1 -3
index 8ca51e43cf53..329ee4f48d95 100644
@@ -1,4 +1,5 @@
 /*
+ * Copyright(c) 2020 Cornelis Networks, Inc.
  * Copyright(c) 2015-2020 Intel Corporation.
  *
  * This file is provided under a dual BSD/GPLv2 license.  When using or
@@ -206,8 +207,6 @@ static int hfi1_file_open(struct inode *inode, struct file *fp)
 	spin_lock_init(&fd->tid_lock);
 	spin_lock_init(&fd->invalid_lock);
 	fd->rec_cpu_num = -1; /* no cpu affinity by default */
-	fd->mm = current->mm;
-	mmgrab(fd->mm);
 	fd->dd = dd;
 	fp->private_data = fd;
 	return 0;
@@ -711,7 +710,6 @@ static int hfi1_file_close(struct inode *inode, struct file *fp)
 
 	deallocate_ctxt(uctxt);
 done:
-	mmdrop(fdata->mm);
 
 	if (atomic_dec_and_test(&dd->user_refcount))
 		complete(&dd->user_comp);
drivers/infiniband/hw/hfi1/hfi.h +1 -1
index b4c6bff60a4e..e09e8244a94c 100644
@@ -1,6 +1,7 @@
 #ifndef _HFI1_KERNEL_H
 #define _HFI1_KERNEL_H
 /*
+ * Copyright(c) 2020 Cornelis Networks, Inc.
  * Copyright(c) 2015-2020 Intel Corporation.
  *
  * This file is provided under a dual BSD/GPLv2 license.  When using or
@@ -1451,7 +1452,6 @@ struct hfi1_filedata {
 	u32 invalid_tid_idx;
 	/* protect invalid_tids array and invalid_tid_idx */
 	spinlock_t invalid_lock;
-	struct mm_struct *mm;
 };
 
 extern struct xarray hfi1_dev_table;
drivers/infiniband/hw/hfi1/mmu_rb.c +35 -33

136 lines not on this page · raw message

drivers/infiniband/hw/hfi1/mmu_rb.h +15 -1
index f04cec1e99d1..423aacc67e94 100644
@@ -1,4 +1,5 @@
 /*
+ * Copyright(c) 2020 Cornelis Networks, Inc.
  * Copyright(c) 2016 Intel Corporation.
  *
  * This file is provided under a dual BSD/GPLv2 license.  When using or
@@ -54,6 +55,7 @@ struct mmu_rb_node {
 	unsigned long len;
 	unsigned long __last;
 	struct rb_node node;
+	struct mmu_rb_handler *handler;
 	struct list_head list;
 };
 
@@ -71,7 +73,19 @@ struct mmu_rb_ops {
 		     void *evict_arg, bool *stop);
 };
 
-int hfi1_mmu_rb_register(void *ops_arg, struct mm_struct *mm,
+struct mmu_rb_handler {
+	struct mmu_notifier mn;
+	struct rb_root_cached root;
+	void *ops_arg;
+	spinlock_t lock;        /* protect the RB tree */
+	struct mmu_rb_ops *ops;
+	struct list_head lru_list;
+	struct work_struct del_work;
+	struct list_head del_list;
+	struct workqueue_struct *wq;
+};
+
+int hfi1_mmu_rb_register(void *ops_arg,
 			 struct mmu_rb_ops *ops,
 			 struct workqueue_struct *wq,
 			 struct mmu_rb_handler **handler);
drivers/infiniband/hw/hfi1/user_exp_rcv.c +8 -4
index f81ca20f4b69..b94fc7fd75a9 100644
@@ -1,4 +1,5 @@
 /*
+ * Copyright(c) 2020 Cornelis Networks, Inc.
  * Copyright(c) 2015-2018 Intel Corporation.
  *
  * This file is provided under a dual BSD/GPLv2 license.  When using or
@@ -173,15 +174,18 @@ static void unpin_rcv_pages(struct hfi1_filedata *fd,
 {
 	struct page **pages;
 	struct hfi1_devdata *dd = fd->uctxt->dd;
+	struct mm_struct *mm;
 
 	if (mapped) {
 		pci_unmap_single(dd->pcidev, node->dma_addr,
 				 node->npages * PAGE_SIZE, PCI_DMA_FROMDEVICE);
 		pages = &node->pages[idx];
+		mm = mm_from_tid_node(node);
 	} else {
 		pages = &tidbuf->pages[idx];
+		mm = current->mm;
 	}
-	hfi1_release_user_pages(fd->mm, pages, npages, mapped);
+	hfi1_release_user_pages(mm, pages, npages, mapped);
 	fd->tid_n_pinned -= npages;
 }
 
@@ -216,12 +220,12 @@ static int pin_rcv_pages(struct hfi1_filedata *fd, struct tid_user_buf *tidbuf)
 	 * pages, accept the amount pinned so far and program only that.
 	 * User space knows how to deal with partially programmed buffers.
 	 */
-	if (!hfi1_can_pin_pages(dd, fd->mm, fd->tid_n_pinned, npages)) {
+	if (!hfi1_can_pin_pages(dd, current->mm, fd->tid_n_pinned, npages)) {
 		kfree(pages);
 		return -ENOMEM;
 	}
 
-	pinned = hfi1_acquire_user_pages(fd->mm, vaddr, npages, true, pages);
+	pinned = hfi1_acquire_user_pages(current->mm, vaddr, npages, true, pages);
 	if (pinned <= 0) {
 		kfree(pages);
 		return pinned;
@@ -756,7 +760,7 @@ static int set_rcvarray_entry(struct hfi1_filedata *fd,
 
 	if (fd->use_mn) {
 		ret = mmu_interval_notifier_insert(
-			&node->notifier, fd->mm,
+			&node->notifier, current->mm,
 			tbuf->vaddr + (pageidx * PAGE_SIZE), npages * PAGE_SIZE,
 			&tid_mn_ops);
 		if (ret)
drivers/infiniband/hw/hfi1/user_exp_rcv.h +6 -0
index 332abb446861..d45c7b6988d4 100644
@@ -1,6 +1,7 @@
 #ifndef _HFI1_USER_EXP_RCV_H
 #define _HFI1_USER_EXP_RCV_H
 /*
+ * Copyright(c) 2020 - Cornelis Networks, Inc.
  * Copyright(c) 2015 - 2017 Intel Corporation.
  *
  * This file is provided under a dual BSD/GPLv2 license.  When using or
@@ -95,4 +96,9 @@ int hfi1_user_exp_rcv_clear(struct hfi1_filedata *fd,
 int hfi1_user_exp_rcv_invalid(struct hfi1_filedata *fd,
 			      struct hfi1_tid_info *tinfo);
 
+static inline struct mm_struct *mm_from_tid_node(struct tid_rb_node *node)
+{
+	return node->notifier.mm;
+}
+
 #endif /* _HFI1_USER_EXP_RCV_H */
drivers/infiniband/hw/hfi1/user_sdma.c +7 -6
index a92346e88628..4a4956f96a7e 100644
@@ -1,4 +1,5 @@
 /*
+ * Copyright(c) 2020 - Cornelis Networks, Inc.
  * Copyright(c) 2015 - 2018 Intel Corporation.
  *
  * This file is provided under a dual BSD/GPLv2 license.  When using or
@@ -188,7 +189,6 @@ int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt,
 	atomic_set(&pq->n_reqs, 0);
 	init_waitqueue_head(&pq->wait);
 	atomic_set(&pq->n_locked, 0);
-	pq->mm = fd->mm;
 
 	iowait_init(&pq->busy, 0, NULL, NULL, defer_packet_queue,
 		    activate_packet_queue, NULL, NULL);
@@ -230,7 +230,7 @@ int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt,
 
 	cq->nentries = hfi1_sdma_comp_ring_size;
 
-	ret = hfi1_mmu_rb_register(pq, pq->mm, &sdma_rb_ops, dd->pport->hfi1_wq,
+	ret = hfi1_mmu_rb_register(pq, &sdma_rb_ops, dd->pport->hfi1_wq,
 				   &pq->handler);
 	if (ret) {
 		dd_dev_err(dd, "Failed to register with MMU %d", ret);
@@ -980,13 +980,13 @@ static int pin_sdma_pages(struct user_sdma_request *req,
 
 	npages -= node->npages;
 retry:
-	if (!hfi1_can_pin_pages(pq->dd, pq->mm,
+	if (!hfi1_can_pin_pages(pq->dd, current->mm,
 				atomic_read(&pq->n_locked), npages)) {
 		cleared = sdma_cache_evict(pq, npages);
 		if (cleared >= npages)
 			goto retry;
 	}
-	pinned = hfi1_acquire_user_pages(pq->mm,
+	pinned = hfi1_acquire_user_pages(current->mm,
 					 ((unsigned long)iovec->iov.iov_base +
 					 (node->npages * PAGE_SIZE)), npages, 0,
 					 pages + node->npages);
@@ -995,7 +995,7 @@ static int pin_sdma_pages(struct user_sdma_request *req,
 		return pinned;
 	}
 	if (pinned != npages) {
-		unpin_vector_pages(pq->mm, pages, node->npages, pinned);
+		unpin_vector_pages(current->mm, pages, node->npages, pinned);
 		return -EFAULT;
 	}
 	kfree(node->pages);
@@ -1008,7 +1008,8 @@ static int pin_sdma_pages(struct user_sdma_request *req,
 static void unpin_sdma_pages(struct sdma_mmu_node *node)
 {
 	if (node->npages) {
-		unpin_vector_pages(node->pq->mm, node->pages, 0, node->npages);
+		unpin_vector_pages(mm_from_sdma_node(node), node->pages, 0,
+				   node->npages);
 		atomic_sub(node->npages, &node->pq->n_locked);
 	}
 }
drivers/infiniband/hw/hfi1/user_sdma.h +6 -1
index 9972e0e6545e..1e8c02fe8ad1 100644
@@ -1,6 +1,7 @@
 #ifndef _HFI1_USER_SDMA_H
 #define _HFI1_USER_SDMA_H
 /*
+ * Copyright(c) 2020 - Cornelis Networks, Inc.
  * Copyright(c) 2015 - 2018 Intel Corporation.
  *
  * This file is provided under a dual BSD/GPLv2 license.  When using or
@@ -133,7 +134,6 @@ struct hfi1_user_sdma_pkt_q {
 	unsigned long unpinned;
 	struct mmu_rb_handler *handler;
 	atomic_t n_locked;
-	struct mm_struct *mm;
 };
 
 struct hfi1_user_sdma_comp_q {
@@ -250,4 +250,9 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd,
 				   struct iovec *iovec, unsigned long dim,
 				   unsigned long *count);
 
+static inline struct mm_struct *mm_from_sdma_node(struct sdma_mmu_node *node)
+{
+	return node->rb.handler->mn.mm;
+}
+
 #endif /* _HFI1_USER_SDMA_H */
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +5 -4
index cee140920c57..4c02839b7b41 100644
@@ -2738,6 +2738,7 @@ static int hns_roce_v2_mw_write_mtpt(void *mb_buf, struct hns_roce_mw *mw)
 
 	roce_set_bit(mpt_entry->byte_8_mw_cnt_en, V2_MPT_BYTE_8_R_INV_EN_S, 1);
 	roce_set_bit(mpt_entry->byte_8_mw_cnt_en, V2_MPT_BYTE_8_L_INV_EN_S, 1);
+	roce_set_bit(mpt_entry->byte_8_mw_cnt_en, V2_MPT_BYTE_8_LW_EN_S, 1);
 
 	roce_set_bit(mpt_entry->byte_12_mw_pa, V2_MPT_BYTE_12_PA_S, 0);
 	roce_set_bit(mpt_entry->byte_12_mw_pa, V2_MPT_BYTE_12_MR_MW_S, 1);
@@ -4771,11 +4772,11 @@ static int hns_roce_v2_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
 					      V2_QPC_BYTE_28_AT_M,
 					      V2_QPC_BYTE_28_AT_S);
 	qp_attr->retry_cnt = roce_get_field(context.byte_212_lsn,
-					    V2_QPC_BYTE_212_RETRY_CNT_M,
-					    V2_QPC_BYTE_212_RETRY_CNT_S);
+					    V2_QPC_BYTE_212_RETRY_NUM_INIT_M,
+					    V2_QPC_BYTE_212_RETRY_NUM_INIT_S);
 	qp_attr->rnr_retry = roce_get_field(context.byte_244_rnr_rxack,
-					    V2_QPC_BYTE_244_RNR_CNT_M,
-					    V2_QPC_BYTE_244_RNR_CNT_S);
+					    V2_QPC_BYTE_244_RNR_NUM_INIT_M,
+					    V2_QPC_BYTE_244_RNR_NUM_INIT_S);
 
 done:
 	qp_attr->cur_qp_state = qp_attr->qp_state;
drivers/infiniband/hw/hns/hns_roce_hw_v2.h +1 -1
index 17f35f91f4ad..9d27dfe86821 100644
@@ -1639,7 +1639,7 @@ struct hns_roce_query_pf_caps_d {
 	__le32 rsv_uars_rsv_qps;
 };
 #define V2_QUERY_PF_CAPS_D_NUM_SRQS_S 0
-#define V2_QUERY_PF_CAPS_D_NUM_SRQS_M GENMASK(20, 0)
+#define V2_QUERY_PF_CAPS_D_NUM_SRQS_M GENMASK(19, 0)
 
 #define V2_QUERY_PF_CAPS_D_RQWQE_HOP_NUM_S 20
 #define V2_QUERY_PF_CAPS_D_RQWQE_HOP_NUM_M GENMASK(21, 20)
drivers/infiniband/hw/i40iw/i40iw_main.c +0 -5
index 58a433135a03..9023ad9c3018 100644
@@ -54,10 +54,6 @@
 #define DRV_VERSION	__stringify(DRV_VERSION_MAJOR) "."		\
 	__stringify(DRV_VERSION_MINOR) "." __stringify(DRV_VERSION_BUILD)
 
-static int push_mode;
-module_param(push_mode, int, 0644);
-MODULE_PARM_DESC(push_mode, "Low latency mode: 0=disabled (default), 1=enabled)");
-
 static int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "debug flags: 0=disabled (default), 0x7fffffff=all");
@@ -1580,7 +1576,6 @@ static enum i40iw_status_code i40iw_setup_init_state(struct i40iw_handler *hdl,
 	if (status)
 		goto exit;
 	iwdev->obj_next = iwdev->obj_mem;
-	iwdev->push_mode = push_mode;
 
 	init_waitqueue_head(&iwdev->vchnl_waitq);
 	init_waitqueue_head(&dev->vf_reqs);
drivers/infiniband/hw/i40iw/i40iw_verbs.c +7 -30
index 09caad228aa4..e40c50519664 100644
@@ -167,39 +167,16 @@ static void i40iw_dealloc_ucontext(struct ib_ucontext *context)
  */
 static int i40iw_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
 {
-	struct i40iw_ucontext *ucontext;
-	u64 db_addr_offset, push_offset, pfn;
-
-	ucontext = to_ucontext(context);
-	if (ucontext->iwdev->sc_dev.is_pf) {
-		db_addr_offset = I40IW_DB_ADDR_OFFSET;
-		push_offset = I40IW_PUSH_OFFSET;
-		if (vma->vm_pgoff)
-			vma->vm_pgoff += I40IW_PF_FIRST_PUSH_PAGE_INDEX - 1;
-	} else {
-		db_addr_offset = I40IW_VF_DB_ADDR_OFFSET;
-		push_offset = I40IW_VF_PUSH_OFFSET;
-		if (vma->vm_pgoff)
-			vma->vm_pgoff += I40IW_VF_FIRST_PUSH_PAGE_INDEX - 1;
-	}
+	struct i40iw_ucontext *ucontext = to_ucontext(context);
+	u64 dbaddr;
 
-	vma->vm_pgoff += db_addr_offset >> PAGE_SHIFT;
-
-	if (vma->vm_pgoff == (db_addr_offset >> PAGE_SHIFT)) {
-		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-	} else {
-		if ((vma->vm_pgoff - (push_offset >> PAGE_SHIFT)) % 2)
-			vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-		else
-			vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
-	}
+	if (vma->vm_pgoff || vma->vm_end - vma->vm_start != PAGE_SIZE)
+		return -EINVAL;
 
-	pfn = vma->vm_pgoff +
-	      (pci_resource_start(ucontext->iwdev->ldev->pcidev, 0) >>
-	       PAGE_SHIFT);
+	dbaddr = I40IW_DB_ADDR_OFFSET + pci_resource_start(ucontext->iwdev->ldev->pcidev, 0);
 
-	return rdma_user_mmap_io(context, vma, pfn, PAGE_SIZE,
-				 vma->vm_page_prot, NULL);
+	return rdma_user_mmap_io(context, vma, dbaddr >> PAGE_SHIFT, PAGE_SIZE,
+				 pgprot_noncached(vma->vm_page_prot), NULL);
 }
 
 /**
drivers/infiniband/hw/mthca/mthca_cq.c +6 -4
index c3cfea243af8..119b2573c9a0 100644
@@ -803,8 +803,10 @@ int mthca_init_cq(struct mthca_dev *dev, int nent,
 	}
 
 	mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL);
-	if (IS_ERR(mailbox))
+	if (IS_ERR(mailbox)) {
+		err = PTR_ERR(mailbox);
 		goto err_out_arm;
+	}
 
 	cq_context = mailbox->buf;
 
@@ -846,9 +848,9 @@ int mthca_init_cq(struct mthca_dev *dev, int nent,
 	}
 
 	spin_lock_irq(&dev->cq_table.lock);
-	if (mthca_array_set(&dev->cq_table.cq,
-			    cq->cqn & (dev->limits.num_cqs - 1),
-			    cq)) {
+	err = mthca_array_set(&dev->cq_table.cq,
+			      cq->cqn & (dev->limits.num_cqs - 1), cq);
+	if (err) {
 		spin_unlock_irq(&dev->cq_table.lock);
 		goto err_out_free_mr;
 	}
drivers/input/serio/i8042.c +11 -1
index d3eda48032e3..944cbb519c6d 100644
@@ -122,6 +122,7 @@ module_param_named(unmask_kbd_data, i8042_unmask_kbd_data, bool, 0600);
 MODULE_PARM_DESC(unmask_kbd_data, "Unconditional enable (may reveal sensitive data) of normally sanitize-filtered kbd data traffic debug log [pre-condition: i8042.debug=1 enabled]");
 #endif
 
+static bool i8042_present;
 static bool i8042_bypass_aux_irq_test;
 static char i8042_kbd_firmware_id[128];
 static char i8042_aux_firmware_id[128];
@@ -343,6 +344,9 @@ int i8042_command(unsigned char *param, int command)
 	unsigned long flags;
 	int retval;
 
+	if (!i8042_present)
+		return -1;
+
 	spin_lock_irqsave(&i8042_lock, flags);
 	retval = __i8042_command(param, command);
 	spin_unlock_irqrestore(&i8042_lock, flags);
@@ -1612,12 +1616,15 @@ static int __init i8042_init(void)
 
 	err = i8042_platform_init();
 	if (err)
-		return err;
+		return (err == -ENODEV) ? 0 : err;
 
 	err = i8042_controller_check();
 	if (err)
 		goto err_platform_exit;
 
+	/* Set this before creating the dev to allow i8042_command to work right away */
+	i8042_present = true;
+
 	pdev = platform_create_bundle(&i8042_driver, i8042_probe, NULL, 0, NULL, 0);
 	if (IS_ERR(pdev)) {
 		err = PTR_ERR(pdev);
@@ -1636,6 +1643,9 @@ static int __init i8042_init(void)
 
 static void __exit i8042_exit(void)
 {
+	if (!i8042_present)
+		return;
+
 	platform_device_unregister(i8042_platform_device);
 	platform_driver_unregister(&i8042_driver);
 	i8042_platform_exit();
drivers/iommu/intel/dmar.c +2 -1
index 93e6345f3414..48cda86f43a2 100644
@@ -964,7 +964,8 @@ static int map_iommu(struct intel_iommu *iommu, u64 phys_addr)
 		warn_invalid_dmar(phys_addr, " returns all ones");
 		goto unmap;
 	}
-	iommu->vccap = dmar_readq(iommu->reg + DMAR_VCCAP_REG);
+	if (ecap_vcs(iommu->ecap))
+		iommu->vccap = dmar_readq(iommu->reg + DMAR_VCCAP_REG);
 
 	/* the registers might be more than one page */
 	map_size = max_t(int, ecap_max_iotlb_offset(iommu->ecap),
drivers/iommu/intel/iommu.c +2 -2
index f67b7e6ddf1b..7e790655c1ab 100644
@@ -1798,7 +1798,7 @@ static void free_dmar_iommu(struct intel_iommu *iommu)
 		if (ecap_prs(iommu->ecap))
 			intel_svm_finish_prq(iommu);
 	}
-	if (ecap_vcs(iommu->ecap) && vccap_pasid(iommu->vccap))
+	if (vccap_pasid(iommu->vccap))
 		ioasid_unregister_allocator(&iommu->pasid_allocator);
 
 #endif
@@ -3177,7 +3177,7 @@ static void register_pasid_allocator(struct intel_iommu *iommu)
 	 * is active. All vIOMMU allocators will eventually be calling the same
 	 * host allocator.
 	 */
-	if (!ecap_vcs(iommu->ecap) || !vccap_pasid(iommu->vccap))
+	if (!vccap_pasid(iommu->vccap))
 		return;
 
 	pr_info("Register custom PASID allocator\n");
drivers/iommu/iommu.c +6 -4
index 609bd25bf154..6a0a79e3f564 100644
@@ -264,16 +264,18 @@ int iommu_probe_device(struct device *dev)
 	 */
 	iommu_alloc_default_domain(group, dev);
 
-	if (group->default_domain)
+	if (group->default_domain) {
 		ret = __iommu_attach_device(group->default_domain, dev);
+		if (ret) {
+			iommu_group_put(group);
+			goto err_release;
+		}
+	}
 
 	iommu_create_device_direct_mappings(group, dev);
 
 	iommu_group_put(group);
 
-	if (ret)
-		goto err_release;
-
 	if (ops->probe_finalize)
 		ops->probe_finalize(dev);
 
drivers/irqchip/irq-sni-exiu.c +1 -1
index 1d027623c776..abd011fcecf4 100644
@@ -136,7 +136,7 @@ static int exiu_domain_translate(struct irq_domain *domain,
 		if (fwspec->param_count != 2)
 			return -EINVAL;
 		*hwirq = fwspec->param[0];
-		*type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK;
+		*type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK;
 	}
 	return 0;
 }
drivers/net/bonding/bond_main.c +43 -18

106 lines not on this page · raw message

drivers/net/bonding/bond_sysfs_slave.c +1 -17
index 9b8346638f69..fd07561da034 100644
@@ -121,7 +121,6 @@ static const struct slave_attribute *slave_attrs[] = {
 };
 
 #define to_slave_attr(_at) container_of(_at, struct slave_attribute, attr)
-#define to_slave(obj)	container_of(obj, struct slave, kobj)
 
 static ssize_t slave_show(struct kobject *kobj,
 			  struct attribute *attr, char *buf)
@@ -132,28 +131,15 @@ static ssize_t slave_show(struct kobject *kobj,
 	return slave_attr->show(slave, buf);
 }
 
-static const struct sysfs_ops slave_sysfs_ops = {
+const struct sysfs_ops slave_sysfs_ops = {
 	.show = slave_show,
 };
 
-static struct kobj_type slave_ktype = {
-#ifdef CONFIG_SYSFS
-	.sysfs_ops = &slave_sysfs_ops,
-#endif
-};
-
 int bond_sysfs_slave_add(struct slave *slave)
 {
 	const struct slave_attribute **a;
 	int err;
 
-	err = kobject_init_and_add(&slave->kobj, &slave_ktype,
-				   &(slave->dev->dev.kobj), "bonding_slave");
-	if (err) {
-		kobject_put(&slave->kobj);
-		return err;
-	}
-
 	for (a = slave_attrs; *a; ++a) {
 		err = sysfs_create_file(&slave->kobj, &((*a)->attr));
 		if (err) {
@@ -171,6 +157,4 @@ void bond_sysfs_slave_del(struct slave *slave)
 
 	for (a = slave_attrs; *a; ++a)
 		sysfs_remove_file(&slave->kobj, &((*a)->attr));
-
-	kobject_put(&slave->kobj);
 }
drivers/net/can/m_can/m_can.c +2 -2
index f3fc37e96b08..d4030abad935 100644
@@ -1033,7 +1033,7 @@ static const struct can_bittiming_const m_can_bittiming_const_31X = {
 	.name = KBUILD_MODNAME,
 	.tseg1_min = 2,		/* Time segment 1 = prop_seg + phase_seg1 */
 	.tseg1_max = 256,
-	.tseg2_min = 1,		/* Time segment 2 = phase_seg2 */
+	.tseg2_min = 2,		/* Time segment 2 = phase_seg2 */
 	.tseg2_max = 128,
 	.sjw_max = 128,
 	.brp_min = 1,
@@ -1653,7 +1653,7 @@ static int m_can_open(struct net_device *dev)
 		INIT_WORK(&cdev->tx_work, m_can_tx_work_queue);
 
 		err = request_threaded_irq(dev->irq, NULL, m_can_isr,
-					   IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
+					   IRQF_ONESHOT,
 					   dev->name, dev);
 	} else {
 		err = request_irq(dev->irq, m_can_isr, IRQF_SHARED, dev->name,
drivers/net/can/usb/gs_usb.c +70 -61

265 lines not on this page · raw message

drivers/net/dsa/mv88e6xxx/chip.c +2 -0
index f0dbc05e30a4..16040b13579e 100644
@@ -2299,6 +2299,8 @@ static void mv88e6xxx_hardware_reset(struct mv88e6xxx_chip *chip)
 		usleep_range(10000, 20000);
 		gpiod_set_value_cansleep(gpiod, 0);
 		usleep_range(10000, 20000);
+
+		mv88e6xxx_g1_wait_eeprom_done(chip);
 	}
 }
 
drivers/net/dsa/mv88e6xxx/global1.c +31 -0
index f62aa83ca08d..33d443a37efc 100644
@@ -75,6 +75,37 @@ static int mv88e6xxx_g1_wait_init_ready(struct mv88e6xxx_chip *chip)
 	return mv88e6xxx_g1_wait_bit(chip, MV88E6XXX_G1_STS, bit, 1);
 }
 
+void mv88e6xxx_g1_wait_eeprom_done(struct mv88e6xxx_chip *chip)
+{
+	const unsigned long timeout = jiffies + 1 * HZ;
+	u16 val;
+	int err;
+
+	/* Wait up to 1 second for the switch to finish reading the
+	 * EEPROM.
+	 */
+	while (time_before(jiffies, timeout)) {
+		err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, &val);
+		if (err) {
+			dev_err(chip->dev, "Error reading status");
+			return;
+		}
+
+		/* If the switch is still resetting, it may not
+		 * respond on the bus, and so MDIO read returns
+		 * 0xffff. Differentiate between that, and waiting for
+		 * the EEPROM to be done by bit 0 being set.
+		 */
+		if (val != 0xffff &&
+		    val & BIT(MV88E6XXX_G1_STS_IRQ_EEPROM_DONE))
+			return;
+
+		usleep_range(1000, 2000);
+	}
+
+	dev_err(chip->dev, "Timeout waiting for EEPROM done");
+}
+
 /* Offset 0x01: Switch MAC Address Register Bytes 0 & 1
  * Offset 0x02: Switch MAC Address Register Bytes 2 & 3
  * Offset 0x03: Switch MAC Address Register Bytes 4 & 5
drivers/net/dsa/mv88e6xxx/global1.h +1 -0
index 1e3546f8b072..e05abe61fa11 100644
@@ -278,6 +278,7 @@ int mv88e6xxx_g1_set_switch_mac(struct mv88e6xxx_chip *chip, u8 *addr);
 int mv88e6185_g1_reset(struct mv88e6xxx_chip *chip);
 int mv88e6352_g1_reset(struct mv88e6xxx_chip *chip);
 int mv88e6250_g1_reset(struct mv88e6xxx_chip *chip);
+void mv88e6xxx_g1_wait_eeprom_done(struct mv88e6xxx_chip *chip);
 
 int mv88e6185_g1_ppu_enable(struct mv88e6xxx_chip *chip);
 int mv88e6185_g1_ppu_disable(struct mv88e6xxx_chip *chip);
drivers/net/ethernet/amazon/ena/ena_eth_com.c +3 -0
index ccd440589565..336f115e8091 100644
@@ -538,6 +538,7 @@ int ena_com_rx_pkt(struct ena_com_io_cq *io_cq,
 {
 	struct ena_com_rx_buf_info *ena_buf = &ena_rx_ctx->ena_bufs[0];
 	struct ena_eth_io_rx_cdesc_base *cdesc = NULL;
+	u16 q_depth = io_cq->q_depth;
 	u16 cdesc_idx = 0;
 	u16 nb_hw_desc;
 	u16 i = 0;
@@ -565,6 +566,8 @@ int ena_com_rx_pkt(struct ena_com_io_cq *io_cq,
 	do {
 		ena_buf[i].len = cdesc->length;
 		ena_buf[i].req_id = cdesc->req_id;
+		if (unlikely(ena_buf[i].req_id >= q_depth))
+			return -EIO;
 
 		if (++i >= nb_hw_desc)
 			break;
drivers/net/ethernet/amazon/ena/ena_netdev.c +30 -50

151 lines not on this page · raw message

drivers/net/ethernet/aquantia/atlantic/aq_ring.c +52 -74

126 lines not on this page · raw message

drivers/net/ethernet/broadcom/bnxt/bnxt.c +3 -1
index 2326571e8c84..50efdcf68108 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c +2 -1
index 8eb976106d0c..7e7537eabf00 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/freescale/dpaa2/Kconfig +1 -0
index feea797cde02..70aabd234337 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/freescale/enetc/enetc_qos.c +2 -12
index 1c4a535890da..9a91e3568adb 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/ibm/ibmvnic.c +14 -3
index c6ee42278fdc..81ec233926ac 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/ibm/ibmvnic.h +1 -2
index 43feb96b0a68..31d604fc7bde 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/i40e/i40e.h +1 -0
index a7e212d1caa2..6c1290137cbb 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/i40e/i40e_main.c +15 -7
index 2e433fdbf2c3..da80dccad1dd 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +15 -11
index 343177d71f70..0d76b8c79f4d 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +1 -1
index ecd834e0e121..72a5408a44d6 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c +1 -1
index cb87d31a99df..57a53a600aa5 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/fw/api/time-event.h +5 -3
index a731f28e101a..53b438d709db 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +3 -0
index c918c0887ed0..34362dc0d461 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/mvm/time-event.c +69 -34

103 lines not on this page · raw message

drivers/nfc/s3fwrn5/i2c.c +2 -2
index b4eb926d220a..d7ecff0b1c66 100644

Lines of this file are not shown. View the raw message.

drivers/nvme/host/pci.c +15 -0
index a6af96aaa0eb..3448f7ac209a 100644

Lines of this file are not shown. View the raw message.

drivers/phy/qualcomm/Kconfig +2 -2
index 928db510b86c..7f6fcb8ec5ba 100644

Lines of this file are not shown. View the raw message.

drivers/phy/tegra/xusb.c +1 -0
index de4a46fe1763..ad88d74c1884 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/thinkpad_acpi.c +1 -0
index eae3579f106f..017f090a90f6 100644

Lines of this file are not shown. View the raw message.

drivers/platform/x86/toshiba_acpi.c +1 -2
index e557d757c647..fa7232ad8c39 100644

Lines of this file are not shown. View the raw message.

drivers/ptp/ptp_clockmatrix.c +16 -33

49 lines not on this page · raw message

drivers/rtc/rtc-pcf2127.c +2 -2
index ed6316992cbb..07a5630ec841 100644

Lines of this file are not shown. View the raw message.

drivers/s390/net/qeth_core.h +6 -3
index 6b5cf9ba03e5..757d6ba817ee 100644

Lines of this file are not shown. View the raw message.

drivers/s390/net/qeth_core_main.c +54 -28

82 lines not on this page · raw message

drivers/scsi/libiscsi.c +15 -8
index 1e9c3171fa9f..f9314f1393fb 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/ufs/ufshcd.c +1 -5
index 54928a837dad..9dd32bb0ff2b 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-bcm-qspi.c +12 -22
index 9cfa15ec8b08..5743e727b5f7 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-bcm2835.c +8 -19
index 9605abaaec67..197485f2c2b2 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-bcm2835aux.c +2 -1
index fd58547110e6..1a26865c42f8 100644

Lines of this file are not shown. View the raw message.

drivers/spi/spi-imx.c +1 -0
index 9aac515b718c..91578103a3ca 100644

Lines of this file are not shown. View the raw message.

drivers/staging/ralink-gdma/Kconfig +1 -0
index 54e8029e6b1a..0017376234e2 100644

Lines of this file are not shown. View the raw message.

drivers/target/iscsi/iscsi_target.c +13 -4
index 7b56fe9f1062..2e18ec42c704 100644

Lines of this file are not shown. View the raw message.

drivers/tee/optee/call.c +2 -1
index 20b6fd7383c5..c981757ba0d4 100644

Lines of this file are not shown. View the raw message.

drivers/usb/cdns3/gadget.c +41 -39

80 lines not on this page · raw message

drivers/usb/core/devio.c +7 -7
index e96a858a1218..533236366a03 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/quirks.c +10 -0
index a1e3a037a289..fad31ccd1fa8 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_midi.c +7 -3
index 46af0aa07e2e..b2b5b0689667 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/legacy/inode.c +3 -0
index 1b430b36d0a6..71e7d10dd76b 100644

Lines of this file are not shown. View the raw message.

drivers/vdpa/Kconfig +1 -0
index d7d32b656102..358f6048dd3c 100644

Lines of this file are not shown. View the raw message.

drivers/vhost/scsi.c +143 -106

249 lines not on this page · raw message

drivers/vhost/vhost.c +6 -0
index 9ad45e1d27f0..23e7b2d62451 100644

Lines of this file are not shown. View the raw message.

drivers/vhost/vhost.h +1 -0
index 9032d3c2a9f4..3d30b3da7bcf 100644

Lines of this file are not shown. View the raw message.

drivers/video/fbdev/hyperv_fb.c +6 -1
index e36fb1a0ecdb..19b3f3416d31 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/file.c +0 -57

57 lines not on this page · raw message

fs/btrfs/inode.c +58 -0

58 lines not on this page · raw message

fs/btrfs/qgroup.c +20 -2
index db953cb947bc..9205a88f2a88 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/tests/inode-tests.c +8 -4
index 894a63a92236..a6539500a882 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/tree-checker.c +3 -0
index 8784b74f5232..ea2bb4cb5890 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/volumes.c +7 -1
index 578bbe544c8b..7c703f9c3eda 100644

Lines of this file are not shown. View the raw message.

fs/cifs/cifsacl.c +1 -0
index 23b21e943652..ef4784e72b1d 100644

Lines of this file are not shown. View the raw message.

fs/cifs/smb2ops.c +73 -15

88 lines not on this page · raw message

fs/efivarfs/inode.c +2 -0
index 96c0c86f3fff..0297ad95eb5c 100644

Lines of this file are not shown. View the raw message.

fs/efivarfs/super.c +0 -1
index f943fd0b0699..15880a68faad 100644

Lines of this file are not shown. View the raw message.

fs/io_uring.c +49 -17

66 lines not on this page · raw message

fs/proc/self.c +7 -0
index 72cd69bcaf4a..cc71ce3466dc 100644

Lines of this file are not shown. View the raw message.

include/kunit/test.h +1 -1
index 59f3144f009a..b68ba33c1693 100644

Lines of this file are not shown. View the raw message.

include/linux/firmware/xlnx-zynqmp.h +0 -4
index 5968df82b991..41a1bab98b7e 100644

Lines of this file are not shown. View the raw message.

include/linux/pgtable.h +13 -0
index 0cb5fe3afd16..cd5aa875245b 100644

Lines of this file are not shown. View the raw message.

include/linux/platform_data/ti-sysc.h +1 -0
index c59999ce044e..240dce553a0b 100644

Lines of this file are not shown. View the raw message.

include/net/bonding.h +8 -0
index 7d132cc1e584..d9d0ff3b0ad3 100644

Lines of this file are not shown. View the raw message.

include/scsi/libiscsi.h +3 -0
index c25fb86ffae9..b3bbd10eb3f0 100644

Lines of this file are not shown. View the raw message.

include/trace/events/writeback.h +4 -4
index e7cbccc7c14c..57d795365987 100644

Lines of this file are not shown. View the raw message.

kernel/locking/lockdep.c +4 -2
index 3eb35ad1b524..04134a242f3d 100644

Lines of this file are not shown. View the raw message.

mm/filemap.c +8 -0
index 6024d15998a4..abc1a1dcce97 100644

Lines of this file are not shown. View the raw message.

mm/page-writeback.c +0 -6
index 4e4ddd67b71e..a28dcf672e81 100644

Lines of this file are not shown. View the raw message.

net/batman-adv/log.c +1 -0
index a67b2b091447..c0ca5fbe5b08 100644

Lines of this file are not shown. View the raw message.

net/ipv4/fib_frontend.c +1 -1
index 86a23e4a6a50..b87140a1fa28 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/dwarf-aux.c +8 -0
index aa898014ad12..03c1a39c312a 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/stat-display.c +1 -4
index 493ec372fdec..f2709879bad9 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/synthetic-events.c +3 -0
index 89b390623b63..54ca751a2b3b 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.