Skip to contentSkip to conversation

Linux 5.4.9

DISCUSSION Greg KH 1 participant 2 messages Jan 9, 2020 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 5.4.9 kernel.

All users of the 5.4 kernel series must upgrade.

The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.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

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

 Documentation/admin-guide/kernel-parameters.txt                         |    2 
 Documentation/devicetree/bindings/clock/renesas,rcar-usb2-clock-sel.txt |    2 
 Makefile                                                                |    2 
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts                     |    4 
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts              |    3 
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts                   |    3 
 arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi                         |   37 ++
 arch/arm64/include/asm/pgtable-prot.h                                   |    5 
 arch/arm64/include/asm/pgtable.h                                        |   10 
 arch/arm64/mm/fault.c                                                   |    2 
 arch/arm64/mm/mmu.c                                                     |    4 
 arch/ia64/mm/init.c                                                     |    4 
 arch/mips/Kconfig                                                       |    2 
 arch/mips/include/asm/thread_info.h                                     |   20 +
 arch/mips/net/ebpf_jit.c                                                |    2 
 arch/powerpc/mm/mem.c                                                   |   30 +-
 arch/powerpc/mm/slice.c                                                 |    4 
 arch/riscv/kernel/ftrace.c                                              |    2 
 arch/s390/kernel/perf_cpum_sf.c                                         |   22 +
 arch/s390/kernel/smp.c                                                  |   80 ++++--
 arch/s390/mm/init.c                                                     |    4 
 arch/sh/mm/init.c                                                       |    4 
 arch/x86/events/intel/bts.c                                             |   16 -
 arch/x86/mm/init_32.c                                                   |    4 
 arch/x86/mm/init_64.c                                                   |    4 
 block/bio.c                                                             |   39 ++
 block/compat_ioctl.c                                                    |   13 
 drivers/acpi/sysfs.c                                                    |    6 
 drivers/ata/ahci_brcm.c                                                 |  133 +++++++---
 drivers/ata/libahci_platform.c                                          |    6 
 drivers/ata/libata-core.c                                               |   24 +
 drivers/ata/sata_fsl.c                                                  |    2 
 drivers/ata/sata_mv.c                                                   |    2 
 drivers/ata/sata_nv.c                                                   |    2 
 drivers/block/xen-blkback/blkback.c                                     |    2 
 drivers/block/xen-blkback/xenbus.c                                      |   10 
 drivers/bluetooth/btusb.c                                               |    3 
 drivers/clocksource/timer-riscv.c                                       |    2 
 drivers/devfreq/devfreq.c                                               |   30 +-
 drivers/dma/dma-jz4780.c                                                |    3 
 drivers/dma/virt-dma.c                                                  |    3 
 drivers/firewire/net.c                                                  |    6 
 drivers/firmware/arm_scmi/bus.c                                         |    8 
 drivers/firmware/efi/rci2-table.c                                       |    3 
 drivers/gpio/gpio-xtensa.c                                              |    7 
 drivers/gpio/gpiolib.c                                                  |    8 
 drivers/gpu/drm/amd/amdgpu/df_v3_6.c                                    |   38 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c                                   |   22 +
 drivers/gpu/drm/amd/display/dc/core/dc_link.c                           |    2 
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c                        |    9 
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c                   |   13 
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c             |   12 
 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c                   |    2 
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c                              |    1 
 drivers/gpu/drm/amd/powerplay/arcturus_ppt.c                            |    8 
 drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h                          |    1 
 drivers/gpu/drm/amd/powerplay/navi10_ppt.c                              |    3 
 drivers/gpu/drm/amd/powerplay/vega20_ppt.c                              |    3 
 drivers/gpu/drm/i915/gt/intel_lrc.c                                     |    3 
 drivers/gpu/drm/mcde/mcde_dsi.c                                         |    6 
 drivers/gpu/drm/msm/msm_gpu.c                                           |    1 
 drivers/gpu/drm/nouveau/dispnv50/disp.c                                 |    6 
 drivers/gpu/drm/nouveau/nouveau_connector.c                             |   28 +-
 drivers/gpu/drm/nouveau/nouveau_connector.h                             |  116 ++++----
 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c                                  |    2 
 drivers/hid/i2c-hid/i2c-hid-core.c                                      |   12 
 drivers/iio/accel/st_accel_core.c                                       |    8 
 drivers/iio/adc/max9611.c                                               |   16 -
 drivers/infiniband/core/cma.c                                           |    1 
 drivers/infiniband/core/counters.c                                      |    3 
 drivers/infiniband/hw/mlx4/main.c                                       |    9 
 drivers/infiniband/hw/mlx5/main.c                                       |   13 
 drivers/infiniband/sw/rxe/rxe_recv.c                                    |    2 
 drivers/infiniband/sw/rxe/rxe_req.c                                     |    6 
 drivers/infiniband/sw/rxe/rxe_resp.c                                    |    7 
 drivers/iommu/intel-svm.c                                               |    6 
 drivers/md/raid1.c                                                      |    2 
 drivers/md/raid5.c                                                      |    2 
 drivers/media/cec/cec-adap.c                                            |   40 ++-
 drivers/media/usb/b2c2/flexcop-usb.c                                    |    2 
 drivers/media/usb/dvb-usb/af9005.c                                      |    5 
 drivers/media/usb/pulse8-cec/pulse8-cec.c                               |   17 -
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c                           |   23 +
 drivers/nvme/host/fc.c                                                  |   32 ++
 drivers/nvme/host/pci.c                                                 |   14 -
 drivers/nvme/target/fcloop.c                                            |    1 
 drivers/of/overlay.c                                                    |   37 +-
 drivers/pci/pci.c                                                       |   18 +
 drivers/phy/renesas/phy-rcar-gen3-usb2.c                                |    2 
 drivers/platform/x86/pmc_atom.c                                         |    8 
 drivers/regulator/ab8500.c                                              |   17 -
 drivers/regulator/axp20x-regulator.c                                    |   11 
 drivers/regulator/bd70528-regulator.c                                   |    1 
 drivers/scsi/libsas/sas_discover.c                                      |   11 
 drivers/scsi/lpfc/lpfc_bsg.c                                            |   15 -
 drivers/scsi/lpfc/lpfc_hbadisc.c                                        |   88 ++++--
 drivers/scsi/lpfc/lpfc_nvme.c                                           |    2 
 drivers/scsi/lpfc/lpfc_sli.c                                            |    2 
 drivers/scsi/qla2xxx/qla_def.h                                          |    1 
 drivers/scsi/qla2xxx/qla_init.c                                         |   11 
 drivers/scsi/qla2xxx/qla_iocb.c                                         |   22 +
 drivers/scsi/qla2xxx/qla_isr.c                                          |    4 
 drivers/scsi/qla2xxx/qla_mbx.c                                          |    3 
 drivers/scsi/qla2xxx/qla_nvme.c                                         |    1 
 drivers/scsi/qla2xxx/qla_target.c                                       |    3 
 drivers/scsi/qla2xxx/tcm_qla2xxx.c                                      |    1 
 drivers/scsi/qla4xxx/ql4_os.c                                           |    1 
 drivers/scsi/scsi_transport_iscsi.c                                     |    7 
 drivers/spi/spi-fsl-dspi.c                                              |   15 -
 drivers/spi/spi-uniphier.c                                              |   31 +-
 drivers/staging/wlan-ng/Kconfig                                         |    1 
 drivers/tty/serial/msm_serial.c                                         |   13 
 drivers/usb/gadget/function/f_ecm.c                                     |    6 
 drivers/usb/gadget/function/f_rndis.c                                   |    1 
 drivers/watchdog/Kconfig                                                |    1 
 drivers/xen/balloon.c                                                   |    3 
 fs/afs/dynroot.c                                                        |    3 
 fs/afs/mntpt.c                                                          |    6 
 fs/afs/server.c                                                         |   21 -
 fs/afs/super.c                                                          |    1 
 fs/btrfs/async-thread.c                                                 |   58 ----
 fs/btrfs/async-thread.h                                                 |   33 --
 fs/btrfs/block-group.c                                                  |    3 
 fs/btrfs/delayed-inode.c                                                |    4 
 fs/btrfs/disk-io.c                                                      |   34 --
 fs/btrfs/extent_io.c                                                    |    2 
 fs/btrfs/inode.c                                                        |   67 ++---
 fs/btrfs/ordered-data.c                                                 |    1 
 fs/btrfs/qgroup.c                                                       |    1 
 fs/btrfs/raid56.c                                                       |    5 
 fs/btrfs/reada.c                                                        |    3 
 fs/btrfs/scrub.c                                                        |   14 -
 fs/btrfs/volumes.c                                                      |    3 
 fs/buffer.c                                                             |   25 -
 fs/cifs/dfs_cache.c                                                     |    3 
 fs/cifs/inode.c                                                         |    2 
 fs/cifs/smb2pdu.c                                                       |   41 ++-
 fs/compat_ioctl.c                                                       |    3 
 fs/io_uring.c                                                           |    4 
 fs/locks.c                                                              |    2 
 fs/nfsd/nfs4state.c                                                     |   15 -
 fs/ocfs2/dlmglue.c                                                      |    1 
 fs/pstore/ram.c                                                         |   13 
 fs/ubifs/tnc_commit.c                                                   |   34 ++
 fs/xfs/libxfs/xfs_bmap.c                                                |    2 
 fs/xfs/scrub/common.h                                                   |    9 
 include/linux/ahci_platform.h                                           |    2 
 include/linux/bio.h                                                     |    1 
 include/linux/dmaengine.h                                               |    5 
 include/linux/libata.h                                                  |    1 
 include/linux/memory_hotplug.h                                          |    7 
 include/linux/nvme-fc-driver.h                                          |    4 
 include/linux/pci.h                                                     |    2 
 include/linux/regulator/ab8500.h                                        |    1 
 include/net/neighbour.h                                                 |    2 
 include/net/sch_generic.h                                               |    6 
 include/net/sock.h                                                      |    4 
 kernel/bpf/verifier.c                                                   |   43 +--
 kernel/cred.c                                                           |    6 
 kernel/exit.c                                                           |   12 
 kernel/module.c                                                         |    2 
 kernel/power/snapshot.c                                                 |    9 
 kernel/seccomp.c                                                        |    7 
 kernel/taskstats.c                                                      |   30 +-
 kernel/trace/ftrace.c                                                   |    6 
 kernel/trace/trace.c                                                    |    8 
 kernel/trace/trace_events.c                                             |    8 
 kernel/trace/trace_events_filter.c                                      |    2 
 kernel/trace/trace_events_hist.c                                        |   21 +
 kernel/trace/tracing_map.c                                              |    4 
 lib/ubsan.c                                                             |   64 +---
 mm/filemap.c                                                            |   21 -
 mm/gup_benchmark.c                                                      |    8 
 mm/hugetlb.c                                                            |   51 +++
 mm/internal.h                                                           |   21 +
 mm/memory.c                                                             |   38 ++
 mm/memory_hotplug.c                                                     |   31 +-
 mm/memremap.c                                                           |    2 
 mm/migrate.c                                                            |   23 +
 mm/mmap.c                                                               |    6 
 mm/oom_kill.c                                                           |    2 
 mm/shmem.c                                                              |   11 
 mm/sparse.c                                                             |    4 
 mm/zsmalloc.c                                                           |    5 
 net/bluetooth/hci_conn.c                                                |    4 
 net/bluetooth/l2cap_core.c                                              |    4 
 net/core/dev.c                                                          |    2 
 net/core/neighbour.c                                                    |    4 
 net/core/sock.c                                                         |    2 
 net/core/sysctl_net_core.c                                              |    2 
 net/ethernet/eth.c                                                      |    7 
 net/hsr/hsr_debugfs.c                                                   |   16 -
 net/hsr/hsr_device.c                                                    |   26 +
 net/hsr/hsr_framereg.c                                                  |   73 +++--
 net/hsr/hsr_framereg.h                                                  |    6 
 net/hsr/hsr_main.c                                                      |    2 
 net/hsr/hsr_main.h                                                      |   16 -
 net/ipv4/tcp.c                                                          |   14 -
 net/ipv4/tcp_bbr.c                                                      |    3 
 net/ipv4/tcp_output.c                                                   |    4 
 net/netfilter/nf_queue.c                                                |    2 
 net/netfilter/nft_tproxy.c                                              |    4 
 net/sched/sch_generic.c                                                 |    2 
 net/socket.c                                                            |    4 
 net/sunrpc/cache.c                                                      |    6 
 samples/seccomp/user-trap.c                                             |    4 
 samples/trace_printk/trace-printk.c                                     |    1 
 scripts/gcc-plugins/Kconfig                                             |    9 
 security/apparmor/apparmorfs.c                                          |    2 
 security/apparmor/domain.c                                              |   82 +++---
 security/apparmor/policy.c                                              |    4 
 sound/core/pcm_native.c                                                 |    3 
 sound/firewire/motu/motu-proc.c                                         |    2 
 sound/isa/cs423x/cs4236.c                                               |    3 
 sound/pci/hda/hda_controller.c                                          |    2 
 sound/pci/hda/hda_intel.c                                               |   17 -
 sound/pci/hda/patch_realtek.c                                           |   61 +++-
 sound/pci/ice1712/ice1724.c                                             |    9 
 sound/usb/card.h                                                        |    1 
 sound/usb/pcm.c                                                         |   25 +
 sound/usb/quirks-table.h                                                |    3 
 sound/usb/quirks.c                                                      |   11 
 sound/usb/usbaudio.h                                                    |    3 
 tools/perf/util/machine.c                                               |    2 
 tools/testing/selftests/rseq/param_test.c                               |   18 -
 tools/testing/selftests/seccomp/seccomp_bpf.c                           |   15 +
 usr/gen_initramfs_list.sh                                               |    2 
 227 files changed, 1764 insertions(+), 1029 deletions(-)

Adrian Hunter (1):
perf callchain: Fix segfault in thread__resolve_callchain_sample()

Al Viro (1):
fix compat handling of FICLONERANGE, FIDEDUPERANGE and FS_IOC_FIEMAP

Alastair D'Silva (1):
powerpc: Chunk calls to flush_dcache_range in arch_*_memory

Aleksandr Yashkin (1):
pstore/ram: Write new dumps to start of recycled zones

Alex Deucher (5):
drm/amdgpu: add header line for power profile on Arcturus drm/amdgpu/smu: add metrics table lock drm/amdgpu/smu: add metrics table lock for arcturus (v2) drm/amdgpu/smu: add metrics table lock for navi (v2) drm/amdgpu/smu: add metrics table lock for vega20 (v2)

Alexander Lobakin (2):
MIPS: BPF: eBPF JIT: check for MIPS ISA compliance in Kconfig net, sysctl: Fix compiler warning when only cBPF is present

Alexander Shishkin (1):
perf/x86/intel/bts: Fix the use of page_private()

Amir Goldstein (1):
locks: print unsigned ino in /proc/locks

Anand Moon (1):
arm64: dts: meson: odroid-c2: Disable usb_otg bus to avoid power failed warning

Andy Whitcroft (1):
PM / hibernate: memory_bm_find_bit(): Tighten node optimisation

Ard Biesheuvel (1):
efi: Don't attempt to map RCI2 config table if it doesn't exist

Arnd Bergmann (5):
gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again
compat_ioctl: block: handle Persistent Reservations
compat_ioctl: block: handle BLKREPORTZONE/BLKRESETZONE
compat_ioctl: block: handle BLKGETZONESZ/BLKGETNRZONES drm/msm: include linux/sched/task.h

Axel Lin (2):

      regulator: axp20x: Fix axp20x_set_ramp_delay
      regulator: bd70528: Remove .set_ramp_delay for bd70528_ldo_ops

Ben Skeggs (1):
drm/nouveau/kms/nv50-: fix panel scaling

Bo Wu (2):
scsi: lpfc: Fix memory leak on lpfc_bsg_write_ebuf_set func
scsi: iscsi: Avoid potential deadlock in iscsi_if_rx func

Catalin Marinas (1):
arm64: Revert support for execute-only user mappings

Chanho Min (1):
mm/zsmalloc.c: fix the migrated zspage statistics.

Chen-Yu Tsai (1):

      regulator: axp20x: Fix AXP22x ELDO2 regulator enable bitmask

Chris Chiu (1):
ALSA: hda/realtek - Enable the bass speaker of ASUS UX431FLC

Chris Mason (1):
Btrfs: only associate the locked page with one async_chunk struct

Chris Wilson (1):
drm/i915/execlists: Fix annotation for decoupling virtual request

Christian Brauner (1):
taskstats: fix data-race

Christian Hewitt (2):
arm64: dts: meson-gxl-s905x-khadas-vim: fix uart_A bluetooth node
arm64: dts: meson-gxm-khadas-vim2: fix uart_A bluetooth node

Chuhong Yuan (1):
RDMA/cma: add missed unregister_pernet_subsys in init failure

Colin Ian King (2):
ALSA: cs4236: fix error return comparison of an unsigned integer
media: flexcop-usb: ensure -EIO is returned on error condition

Dan Carpenter (2):
scsi: iscsi: qla4xxx: fix double free in probe
Bluetooth: delete a stray unlock

Daniel Borkmann (1):
bpf: Fix precision tracking for unbounded scalars

Darrick J. Wong (1):
xfs: periodically yield scrub threads to the scheduler

David Galiffi (1):
drm/amd/display: Fixed kernel panic when booting with DP-to-HDMI dongle

David Hildenbrand (1):
mm/memory_hotplug: shrink zones when offlining memory

David Howells (3):
afs: Fix SELinux setting security label on /afs
afs: Fix mountpoint parsing
afs: Fix creation calls in the dynamic root to fail with EOPNOTSUPP

Deepa Dinamani (1):
fs: cifs: Fix atime update check vs mtime

EJ Hsu (1):
usb: gadget: fix wrong endpoint desc

Eric Dumazet (4):

      tcp: fix data-race in tcp_recvmsg()
      net/sched: annotate lockless accesses to qdisc->empty
      net: add annotations on hh->hh_len lockless accesses
      net: annotate lockless accesses to sk->sk_pacing_shift

Eric Yang (1):
drm/amd/display: update dispclk and dppclk vco frequency

Filipe Manana (1):
Btrfs: fix infinite loop during nocow writeback due to race

Florian Fainelli (4):
ata: libahci_platform: Export again ahci_platform_<en/dis>able_phys()
ata: ahci_brcm: Fix AHCI resources management
ata: ahci_brcm: Add missing clock management during recovery
ata: ahci_brcm: BCM7425 AHCI requires AHCI_HFLAG_DELAY_ENGINE

Frank Rowand (1):
of: overlay: add_changeset_property() memory leak

Gang He (1):
ocfs2: fix the crash due to call ocfs2_get_dlm_debug once less

Geert Uytterhoeven (3):
iio: adc: max9611: Fix too short conversion time delay
dt-bindings: clock: renesas: rcar-usb2-clock-sel: Fix typo in example
phy: renesas: rcar-gen3-usb2: Use platform_get_irq_optional() for optional irq

Greg Kroah-Hartman (1):

      Linux 5.4.9

Guchun Chen (1):
drm/amdgpu: add check before enabling/disabling broadcast mode

Guoqing Jiang (1):
raid5: need to set STRIPE_HANDLE for batch head

Hans Verkuil (4):
media: pulse8-cec: fix lost cec_transmit_attempt_done() call
media: cec: CEC 2.0-only bcast messages were ignored
media: cec: avoid decrementing transmit_queue_sz if it is 0
media: cec: check 'transmit_in_progress', not 'transmitting'

Hans de Goede (2):
drm/nouveau: Move the declaration of struct nouveau_conn_atom up a bit drm/nouveau: Fix drm-core using atomic code-paths on pre-nv50 hardware

Heiko Carstens (1):
s390/smp: fix physical to logical CPU map for SMT

Hui Wang (1):
ALSA: usb-audio: set the interface format after resume on Dell WD19

Ilya Dryomov (1):
mm/oom: fix pgtables units mismatch in Killed process message

Ilya Leoshkevich (1):
mm/sparse.c: mark populate_section_memmap as __meminit

James Smart (3):
nvme_fc: add module to ops template to allow module references
nvme-fc: fix double-free scenarios on hw queues
scsi: lpfc: Fix rpi release when deleting vport

Jaroslav Kysela (1):
ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen

Jason Yan (1):
scsi: libsas: stop discovering if oob mode is disconnected

Jeffrey Hugo (1):
arm64: dts: qcom: msm8998-clamshell: Remove retention idle state

Jens Axboe (2):
net: make socket read/write_iter() honor IOCB_NOWAIT
io_uring: use current task creds instead of allocating a new one

Johan Hovold (1):
ALSA: usb-audio: fix set_format altsetting sanity check

Johannes Weiner (1):
mm: drop mmap_sem before calling balance_dirty_pages() in write fault

John Johansen (1):
apparmor: fix aa_xattrs_match() may sleep while holding a RCU lock

Juergen Gross (1):
xen/balloon: fix ballooned page accounting without hotplug enabled

Julien Grall (1):
lib/ubsan: don't serialize UBSAN report

Kai-Heng Feng (3):
PCI: Add a helper to check Power Resource Requirements _PR3 existence
ALSA: hda: Allow HDA to be runtime suspended when dGPU is not bound to a driver
HID: i2c-hid: Reset ALPS touchpads on resume

Kailang Yang (2):
ALSA: hda/realtek - Add Bass Speaker and fixed dac for bass speaker
ALSA: hda/realtek - Add headset Mic no shutup for ALC283

Kay Friedrich (1):
staging/wlan-ng: add CRC32 dependency in Kconfig

Kees Cook (1):
pstore/ram: Fix error-path memory leak in persistent_ram_new() callers

Keita Suzuki (1):
tracing: Avoid memory leak in process_system_preds()

Keith Busch (2):
nvme/pci: Fix write and poll queue types
nvme/pci: Fix read queue count

Kirill A. Shutemov (1):
shmem: pin the file in shmem_fault() if mmap_sem is dropped

Konstantin Khorenko (1):
kernel/module.c: wakeup processes in module_wq on module unload

Kunihiko Hayashi (1):
spi: uniphier: Fix FIFO threshold

Leo (Hanghong) Ma (1):
drm/amd/display: Change the delay time before enabling FEC

Leo Yan (1):
tty: serial: msm_serial: Fix lockup for sysrq and oops

Leonard Crestez (4):
PM / devfreq: Fix devfreq_notifier_call returning errno PM / devfreq: Set scaling_max_freq to max on OPP notifier error PM / devfreq: Don't fail devfreq_dev_release if not in list PM / devfreq: Check NULL governor in available_governors_show

Lu Baolu (1):
iommu/vt-d: Remove incorrect PSI capability check

Lukas Wunner (1):
dmaengine: Fix access to uninitialized dma_slave_caps

Maor Gottlieb (1):
IB/mlx5: Fix steering rule of drop and count

Marc Dionne (1):
afs: Fix afs_find_server lookups for ipv4 peers

Marco Oliverio (1):
netfilter: nf_queue: enqueue skbs with NULL dst

Mark Zhang (1):
RDMA/counter: Prevent auto-binding a QP which are not tracked with res

Masahiro Yamada (1):
gen_initramfs_list.sh: fix 'bad variable name' error

Masashi Honma (2):
ath9k_htc: Modify byte order for an error message
ath9k_htc: Discard undersized packets

Mathieu Desnoyers (1):
rseq/selftests: Fix: Namespace gettid() for compatibility with glibc 2.30

Max Filippov (1):
gpio: xtensa: fix driver build

Michael Ellerman (1):
powerpc/mm: Mark get_slice_psize() & slice_addr_is_low() as notrace

Michael Haener (1):
platform/x86: pmc_atom: Add Siemens CONNECT X300 to critclk_systems DMI table

Ming Lei (1):
block: add bio_truncate to fix guard_bio_eod

Navid Emamdoost (3):
mm/gup: fix memory leak in __gup_benchmark_ioctl
Bluetooth: Fix memory leak in hci_connect_le_scan
media: usb: fix memory leak in af9005_identify_state

Nikola Cornij (2):
drm/amd/display: Map DSC resources 1-to-1 if numbers of OPPs and DSCs are equal drm/amd/display: Reset steer fifo before unblanking the stream

Oliver Neukum (1):
Bluetooth: btusb: fix PM leak in error case of setup

Omar Sandoval (2):
xfs: don't check for AG deadlock for realtime files in bunmapi
btrfs: get rid of unique workqueue helper functions

Parav Pandit (1):
IB/mlx4: Follow mirror sequence of device add during device removal

Paul Burton (2):
MIPS: BPF: Disable MIPS32 eBPF JIT
MIPS: Avoid VDSO ABI breakage due to global register variable

Paul Cercueil (1):
dmaengine: dma-jz4780: Also break descriptor chains on JZ4725B

Paul Durrant (1):
xen-blkback: prevent premature module unload

Paulo Alcantara (SUSE) (2):
cifs: Fix potential softlockups while refreshing DFS cache
cifs: Fix lookup of root ses in DFS referral cache

Pavel Tikhomirov (1):
sunrpc: fix crash when cache_head become valid before update

Peter Ujfalusi (1):
dmaengine: virt-dma: Fix access after free in vchan_complete()

Phil Sutter (1):
netfilter: nft_tproxy: Fix port selector on Big Endian

Pierre-Eric Pelloux-Prayer (1):
drm/amdgpu: add cache flush workaround to gfx8 emit_fence

Prateek Sood (1):
tracing: Fix lock inversion in trace_event_enable_tgid_record()

Quinn Tran (1):
scsi: qla2xxx: Use explicit LOGO in target mode

Roman Bolshakov (7):
scsi: qla2xxx: Drop superfluous INIT_WORK of del_work
scsi: qla2xxx: Don't call qlt_async_event twice
scsi: qla2xxx: Fix PLOGI payload and ELS IOCB dump length
scsi: qla2xxx: Configure local loop for N2N target
scsi: qla2xxx: Send Notify ACK after N2N PLOGI
scsi: qla2xxx: Don't defer relogin unconditonally
scsi: qla2xxx: Ignore PORT UPDATE after N2N PLOGI

Russell King (1):
gpiolib: fix up emulated open drain outputs

Sargun Dhillon (4):
selftests/seccomp: Zero out seccomp_notif
seccomp: Check that seccomp_notif is zeroed out by the user samples/seccomp: Zero out members based on seccomp_notif_sizes selftests/seccomp: Catch garbage on SECCOMP_IOCTL_NOTIF_RECV

Sascha Hauer (1):
libata: Fix retrieving of active qcs

Scott Mayhew (1):
nfsd4: fix up replay_matches_cache()

SeongJae Park (1):
xen/blkback: Avoid unmapping unmapped grant pages

Shakeel Butt (1):
memcg: account security cred as well to kmemcg

Stefan Mavrodiev (1):
drm/sun4i: hdmi: Remove duplicate cleanup calls

Stephan Gerhold (2):
drm/mcde: dsi: Fix invalid pointer dereference if panel cannot be found
regulator: ab8500: Remove AB8505 USB regulator

Steve Wise (1):
rxe: correctly calculate iCRC for unaligned payloads

Steven Rostedt (VMware) (1):
tracing: Have the histogram compare functions convert to u64 first

Sven Schnelle (2):
tracing: Fix endianness bug in histogram trigger samples/trace_printk: Wait for IRQ work to finish

Taehee Yoo (3):
hsr: avoid debugfs warning message when module is remove
hsr: fix error handling routine in hsr_dev_finalize()
hsr: fix a race condition in node list insertion and deletion

Takashi Iwai (6):
PCI: Fix missing inline for pci_pr3_present()
ALSA: hda - Downgrade error message for single-cmd fallback
ALSA: ice1724: Fix sleep-in-atomic in Infrasonic Quartet support code
ALSA: hda - Apply sync-write workaround to old Intel platforms, too
ALSA: pcm: Yet another missing check of non-cached buffer type
ALSA: firewire-motu: Correct a typo in the clock proc string

Thomas Richter (2):
s390/cpum_sf: Adjust sampling interval to avoid hitting sample limits s390/cpum_sf: Avoid SBD overflow condition in irq handler

Vladimir Oltean (1):
spi: spi-fsl-dspi: Fix 16-bit word order in 32-bit XSPI mode

Waiman Long (1):
mm/hugetlb: defer freeing of huge pages if in non-task context

Wen Yang (2):
ftrace: Avoid potential division by zero in function profiler
firmware: arm_scmi: Avoid double free in error flow

Yang Shi (1):
mm: move_pages: return valid node id in status if the page is already on the target node

YueHaibing (2):
iio: st_accel: Fix unused variable warning
watchdog: tqmx86_wdt: Fix build error

Yunfeng Ye (1):

      ACPI: sysfs: Change ACPI_MASKABLE_GPE_MAX to 0x100

Zhihao Cheng (1):
ubifs: ubifs_tnc_start_commit: Fix OOB in layout_in_gaps

Zhiqiang Liu (1):
md: raid1: check rdev before reference in raid1_sync_request func

Zong Li (2):
clocksource: riscv: add notrace to riscv_sched_clock
riscv: ftrace: correct the condition logic in function graph tracer

chenqiwu (1):
exit: panic before exit_mm() on global init exit

author maintainer
#1 lore raw
Documentation/admin-guide/kernel-parameters.txt +1 -1
index f5a551e4332d..5594c8bf1dcd 100644
@@ -113,7 +113,7 @@
 			the GPE dispatcher.
 			This facility can be used to prevent such uncontrolled
 			GPE floodings.
-			Format: <int>
+			Format: <byte>
 
 	acpi_no_auto_serialize	[HW,ACPI]
 			Disable auto-serialization of AML methods
Documentation/devicetree/bindings/clock/renesas,rcar-usb2-clock-sel.txt +1 -1
index e96e085271c1..83f6c6a7c41c 100644
@@ -46,7 +46,7 @@ Required properties:
 Example (R-Car H3):
 
 	usb2_clksel: clock-controller@e6590630 {
-		compatible = "renesas,r8a77950-rcar-usb2-clock-sel",
+		compatible = "renesas,r8a7795-rcar-usb2-clock-sel",
 			     "renesas,rcar-gen3-usb2-clock-sel";
 		reg = <0 0xe6590630 0 0x02>;
 		clocks = <&cpg CPG_MOD 703>, <&usb_extal>, <&usb_xtal>;
Makefile +1 -1
index 1adee1b06f3d..3ba15c3528c8 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 4
-SUBLEVEL = 8
+SUBLEVEL = 9
 EXTRAVERSION =
 NAME = Kleptomaniac Octopus
 
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +2 -2
index 6039adda12ee..b0b12e389835 100644
@@ -296,7 +296,7 @@
 };
 
 &usb0_phy {
-	status = "okay";
+	status = "disabled";
 	phy-supply = <&usb_otg_pwr>;
 };
 
@@ -306,7 +306,7 @@
 };
 
 &usb0 {
-	status = "okay";
+	status = "disabled";
 };
 
 &usb1 {
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +3 -0
index 2a5cd303123d..8d6f316a5c7b 100644
@@ -192,6 +192,9 @@
 	bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+		max-speed = <2000000>;
+		clocks = <&wifi32k>;
+		clock-names = "lpo";
 	};
 };
 
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +3 -0
index f25ddd18a607..4d67eb715b91 100644
@@ -409,6 +409,9 @@
 	bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+		max-speed = <2000000>;
+		clocks = <&wifi32k>;
+		clock-names = "lpo";
 	};
 };
 
arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi +37 -0
index 9682d4dd7496..1bae90705746 100644
@@ -23,6 +23,43 @@
 	};
 };
 
+/*
+ * The laptop FW does not appear to support the retention state as it is
+ * not advertised as enabled in ACPI, and enabling it in DT can cause boot
+ * hangs.
+ */
+&CPU0 {
+	cpu-idle-states = <&LITTLE_CPU_SLEEP_1>;
+};
+
+&CPU1 {
+	cpu-idle-states = <&LITTLE_CPU_SLEEP_1>;
+};
+
+&CPU2 {
+	cpu-idle-states = <&LITTLE_CPU_SLEEP_1>;
+};
+
+&CPU3 {
+	cpu-idle-states = <&LITTLE_CPU_SLEEP_1>;
+};
+
+&CPU4 {
+	cpu-idle-states = <&BIG_CPU_SLEEP_1>;
+};
+
+&CPU5 {
+	cpu-idle-states = <&BIG_CPU_SLEEP_1>;
+};
+
+&CPU6 {
+	cpu-idle-states = <&BIG_CPU_SLEEP_1>;
+};
+
+&CPU7 {
+	cpu-idle-states = <&BIG_CPU_SLEEP_1>;
+};
+
 &qusb2phy {
 	status = "okay";
 
arch/arm64/include/asm/pgtable-prot.h +2 -3
index 8dc6c5cdabe6..baf52baaa2a5 100644
@@ -85,13 +85,12 @@
 #define PAGE_SHARED_EXEC	__pgprot(_PAGE_DEFAULT | PTE_USER | PTE_RDONLY | PTE_NG | PTE_PXN | PTE_WRITE)
 #define PAGE_READONLY		__pgprot(_PAGE_DEFAULT | PTE_USER | PTE_RDONLY | PTE_NG | PTE_PXN | PTE_UXN)
 #define PAGE_READONLY_EXEC	__pgprot(_PAGE_DEFAULT | PTE_USER | PTE_RDONLY | PTE_NG | PTE_PXN)
-#define PAGE_EXECONLY		__pgprot(_PAGE_DEFAULT | PTE_RDONLY | PTE_NG | PTE_PXN)
 
 #define __P000  PAGE_NONE
 #define __P001  PAGE_READONLY
 #define __P010  PAGE_READONLY
 #define __P011  PAGE_READONLY
-#define __P100  PAGE_EXECONLY
+#define __P100  PAGE_READONLY_EXEC
 #define __P101  PAGE_READONLY_EXEC
 #define __P110  PAGE_READONLY_EXEC
 #define __P111  PAGE_READONLY_EXEC
@@ -100,7 +99,7 @@
 #define __S001  PAGE_READONLY
 #define __S010  PAGE_SHARED
 #define __S011  PAGE_SHARED
-#define __S100  PAGE_EXECONLY
+#define __S100  PAGE_READONLY_EXEC
 #define __S101  PAGE_READONLY_EXEC
 #define __S110  PAGE_SHARED_EXEC
 #define __S111  PAGE_SHARED_EXEC
arch/arm64/include/asm/pgtable.h +3 -7
index 565aa45ef134..13ebe2bad79f 100644
@@ -96,12 +96,8 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
 #define pte_dirty(pte)		(pte_sw_dirty(pte) || pte_hw_dirty(pte))
 
 #define pte_valid(pte)		(!!(pte_val(pte) & PTE_VALID))
-/*
- * Execute-only user mappings do not have the PTE_USER bit set. All valid
- * kernel mappings have the PTE_UXN bit set.
- */
 #define pte_valid_not_user(pte) \
-	((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_UXN)) == (PTE_VALID | PTE_UXN))
+	((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) \
@@ -117,8 +113,8 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
 
 /*
  * p??_access_permitted() is true for valid user mappings (subject to the
- * write permission check) other than user execute-only which do not have the
- * PTE_USER bit set. PROT_NONE mappings do not have the PTE_VALID bit set.
+ * write permission check). PROT_NONE mappings do not have the PTE_VALID bit
+ * set.
  */
 #define pte_access_permitted(pte, write) \
 	(pte_valid_user(pte) && (!(write) || pte_write(pte)))
arch/arm64/mm/fault.c +1 -1
index 9fc6db0bcbad..d26e6cd28953 100644
@@ -454,7 +454,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
 	const struct fault_info *inf;
 	struct mm_struct *mm = current->mm;
 	vm_fault_t fault, major = 0;
-	unsigned long vm_flags = VM_READ | VM_WRITE;
+	unsigned long vm_flags = VM_READ | VM_WRITE | VM_EXEC;
 	unsigned int mm_flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
 
 	if (kprobe_page_fault(regs, esr))
arch/arm64/mm/mmu.c +1 -3
index 60c929f3683b..d10247fab0fd 100644
@@ -1069,7 +1069,6 @@ void arch_remove_memory(int nid, u64 start, u64 size,
 {
 	unsigned long start_pfn = start >> PAGE_SHIFT;
 	unsigned long nr_pages = size >> PAGE_SHIFT;
-	struct zone *zone;
 
 	/*
 	 * FIXME: Cleanup page tables (also in arch_add_memory() in case
@@ -1078,7 +1077,6 @@ void arch_remove_memory(int nid, u64 start, u64 size,
 	 * unplug. ARCH_ENABLE_MEMORY_HOTREMOVE must not be
 	 * unlocked yet.
 	 */
-	zone = page_zone(pfn_to_page(start_pfn));
-	__remove_pages(zone, start_pfn, nr_pages, altmap);
+	__remove_pages(start_pfn, nr_pages, altmap);
 }
 #endif
arch/ia64/mm/init.c +1 -3
index bf9df2625bc8..a6dd80a2c939 100644
@@ -689,9 +689,7 @@ void arch_remove_memory(int nid, u64 start, u64 size,
 {
 	unsigned long start_pfn = start >> PAGE_SHIFT;
 	unsigned long nr_pages = size >> PAGE_SHIFT;
-	struct zone *zone;
 
-	zone = page_zone(pfn_to_page(start_pfn));
-	__remove_pages(zone, start_pfn, nr_pages, altmap);
+	__remove_pages(start_pfn, nr_pages, altmap);
 }
 #endif
arch/mips/Kconfig +1 -1
index a0bd9bdb5f83..e5c2d47608fe 100644
@@ -46,7 +46,7 @@ config MIPS
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES
 	select HAVE_ASM_MODVERSIONS
-	select HAVE_EBPF_JIT if (!CPU_MICROMIPS)
+	select HAVE_EBPF_JIT if 64BIT && !CPU_MICROMIPS && TARGET_ISA_REV >= 2
 	select HAVE_CONTEXT_TRACKING
 	select HAVE_COPY_THREAD_TLS
 	select HAVE_C_RECORDMCOUNT
arch/mips/include/asm/thread_info.h +19 -1
index 4993db40482c..ee26f9a4575d 100644
@@ -49,8 +49,26 @@ struct thread_info {
 	.addr_limit	= KERNEL_DS,		\
 }
 
-/* How to get the thread information struct from C.  */
+/*
+ * A pointer to the struct thread_info for the currently executing thread is
+ * held in register $28/$gp.
+ *
+ * We declare __current_thread_info as a global register variable rather than a
+ * local register variable within current_thread_info() because clang doesn't
+ * support explicit local register variables.
+ *
+ * When building the VDSO we take care not to declare the global register
+ * variable because this causes GCC to not preserve the value of $28/$gp in
+ * functions that change its value (which is common in the PIC VDSO when
+ * accessing the GOT). Since the VDSO shouldn't be accessing
+ * __current_thread_info anyway we declare it extern in order to cause a link
+ * failure if it's referenced.
+ */
+#ifdef __VDSO__
+extern struct thread_info *__current_thread_info;
+#else
 register struct thread_info *__current_thread_info __asm__("$28");
+#endif
 
 static inline struct thread_info *current_thread_info(void)
 {
arch/mips/net/ebpf_jit.c +1 -1
index 46b76751f3a5..a2405d5f7d1e 100644
@@ -1803,7 +1803,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
 	unsigned int image_size;
 	u8 *image_ptr;
 
-	if (!prog->jit_requested || MIPS_ISA_REV < 2)
+	if (!prog->jit_requested)
 		return prog;
 
 	tmp = bpf_jit_blind_constants(prog);
arch/powerpc/mm/mem.c +26 -4
index be941d382c8d..460afa415434 100644
@@ -104,6 +104,27 @@ int __weak remove_section_mapping(unsigned long start, unsigned long end)
 	return -ENODEV;
 }
 
+#define FLUSH_CHUNK_SIZE SZ_1G
+/**
+ * flush_dcache_range_chunked(): Write any modified data cache blocks out to
+ * memory and invalidate them, in chunks of up to FLUSH_CHUNK_SIZE
+ * Does not invalidate the corresponding instruction cache blocks.
+ *
+ * @start: the start address
+ * @stop: the stop address (exclusive)
+ * @chunk: the max size of the chunks
+ */
+static void flush_dcache_range_chunked(unsigned long start, unsigned long stop,
+				       unsigned long chunk)
+{
+	unsigned long i;
+
+	for (i = start; i < stop; i += chunk) {
+		flush_dcache_range(i, min(stop, start + chunk));
+		cond_resched();
+	}
+}
+
 int __ref arch_add_memory(int nid, u64 start, u64 size,
 			struct mhp_restrictions *restrictions)
 {
@@ -120,7 +141,8 @@ int __ref arch_add_memory(int nid, u64 start, u64 size,
 			start, start + size, rc);
 		return -EFAULT;
 	}
-	flush_dcache_range(start, start + size);
+
+	flush_dcache_range_chunked(start, start + size, FLUSH_CHUNK_SIZE);
 
 	return __add_pages(nid, start_pfn, nr_pages, restrictions);
 }
@@ -130,14 +152,14 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size,
 {
 	unsigned long start_pfn = start >> PAGE_SHIFT;
 	unsigned long nr_pages = size >> PAGE_SHIFT;
-	struct page *page = pfn_to_page(start_pfn) + vmem_altmap_offset(altmap);
 	int ret;
 
-	__remove_pages(page_zone(page), start_pfn, nr_pages, altmap);
+	__remove_pages(start_pfn, nr_pages, altmap);
 
 	/* Remove htab bolted mappings for this section of memory */
 	start = (unsigned long)__va(start);
-	flush_dcache_range(start, start + size);
+	flush_dcache_range_chunked(start, start + size, FLUSH_CHUNK_SIZE);
+
 	ret = remove_section_mapping(start, start + size);
 	WARN_ON_ONCE(ret);
 
arch/powerpc/mm/slice.c +2 -2
index 42bbcd47cc85..dffe1a45b6ed 100644
@@ -50,7 +50,7 @@ static void slice_print_mask(const char *label, const struct slice_mask *mask) {
 
 #endif
 
-static inline bool slice_addr_is_low(unsigned long addr)
+static inline notrace bool slice_addr_is_low(unsigned long addr)
 {
 	u64 tmp = (u64)addr;
 
@@ -659,7 +659,7 @@ unsigned long arch_get_unmapped_area_topdown(struct file *filp,
 				       mm_ctx_user_psize(&current->mm->context), 1);
 }
 
-unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr)
+unsigned int notrace get_slice_psize(struct mm_struct *mm, unsigned long addr)
 {
 	unsigned char *psizes;
 	int index, mask_index;
arch/riscv/kernel/ftrace.c +1 -1
index b94d8db5ddcc..c40fdcdeb950 100644
@@ -142,7 +142,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
 	 */
 	old = *parent;
 
-	if (function_graph_enter(old, self_addr, frame_pointer, parent))
+	if (!function_graph_enter(old, self_addr, frame_pointer, parent))
 		*parent = return_hooker;
 }
 
arch/s390/kernel/perf_cpum_sf.c +16 -6
index 7511b71d2931..fdb8083e7870 100644
@@ -1313,18 +1313,28 @@ static void hw_perf_event_update(struct perf_event *event, int flush_all)
 		 */
 		if (flush_all && done)
 			break;
-
-		/* If an event overflow happened, discard samples by
-		 * processing any remaining sample-data-blocks.
-		 */
-		if (event_overflow)
-			flush_all = 1;
 	}
 
 	/* Account sample overflows in the event hardware structure */
 	if (sampl_overflow)
 		OVERFLOW_REG(hwc) = DIV_ROUND_UP(OVERFLOW_REG(hwc) +
 						 sampl_overflow, 1 + num_sdb);
+
+	/* Perf_event_overflow() and perf_event_account_interrupt() limit
+	 * the interrupt rate to an upper limit. Roughly 1000 samples per
+	 * task tick.
+	 * Hitting this limit results in a large number
+	 * of throttled REF_REPORT_THROTTLE entries and the samples
+	 * are dropped.
+	 * Slightly increase the interval to avoid hitting this limit.
+	 */
+	if (event_overflow) {
+		SAMPL_RATE(hwc) += DIV_ROUND_UP(SAMPL_RATE(hwc), 10);
+		debug_sprintf_event(sfdbg, 1, "%s: rate adjustment %ld\n",
+				    __func__,
+				    DIV_ROUND_UP(SAMPL_RATE(hwc), 10));
+	}
+
 	if (sampl_overflow || event_overflow)
 		debug_sprintf_event(sfdbg, 4, "hw_perf_event_update: "
 				    "overflow stats: sample=%llu event=%llu\n",
arch/s390/kernel/smp.c +54 -26

107 lines not on this page · raw message

arch/s390/mm/init.c +1 -3
index a124f19f7b3c..c1d96e588152 100644
@@ -291,10 +291,8 @@ void arch_remove_memory(int nid, u64 start, u64 size,
 {
 	unsigned long start_pfn = start >> PAGE_SHIFT;
 	unsigned long nr_pages = size >> PAGE_SHIFT;
-	struct zone *zone;
 
-	zone = page_zone(pfn_to_page(start_pfn));
-	__remove_pages(zone, start_pfn, nr_pages, altmap);
+	__remove_pages(start_pfn, nr_pages, altmap);
 	vmem_remove_mapping(start, size);
 }
 #endif /* CONFIG_MEMORY_HOTPLUG */
arch/sh/mm/init.c +1 -3
index dfdbaa50946e..d1b1ff2be17a 100644
@@ -434,9 +434,7 @@ void arch_remove_memory(int nid, u64 start, u64 size,
 {
 	unsigned long start_pfn = PFN_DOWN(start);
 	unsigned long nr_pages = size >> PAGE_SHIFT;
-	struct zone *zone;
 
-	zone = page_zone(pfn_to_page(start_pfn));
-	__remove_pages(zone, start_pfn, nr_pages, altmap);
+	__remove_pages(start_pfn, nr_pages, altmap);
 }
 #endif /* CONFIG_MEMORY_HOTPLUG */
arch/x86/events/intel/bts.c +11 -5
index 5ee3fed881d3..741540d849f3 100644
@@ -63,9 +63,17 @@ struct bts_buffer {
 
 static struct pmu bts_pmu;
 
+static int buf_nr_pages(struct page *page)
+{
+	if (!PagePrivate(page))
+		return 1;
+
+	return 1 << page_private(page);
+}
+
 static size_t buf_size(struct page *page)
 {
-	return 1 << (PAGE_SHIFT + page_private(page));
+	return buf_nr_pages(page) * PAGE_SIZE;
 }
 
 static void *
@@ -83,9 +91,7 @@ bts_buffer_setup_aux(struct perf_event *event, void **pages,
 	/* count all the high order buffers */
 	for (pg = 0, nbuf = 0; pg < nr_pages;) {
 		page = virt_to_page(pages[pg]);
-		if (WARN_ON_ONCE(!PagePrivate(page) && nr_pages > 1))
-			return NULL;
-		pg += 1 << page_private(page);
+		pg += buf_nr_pages(page);
 		nbuf++;
 	}
 
@@ -109,7 +115,7 @@ bts_buffer_setup_aux(struct perf_event *event, void **pages,
 		unsigned int __nr_pages;
 
 		page = virt_to_page(pages[pg]);
-		__nr_pages = PagePrivate(page) ? 1 << page_private(page) : 1;
+		__nr_pages = buf_nr_pages(page);
 		buf->buf[nbuf].page = page;
 		buf->buf[nbuf].offset = offset;
 		buf->buf[nbuf].displacement = (pad ? BTS_RECORD_SIZE - pad : 0);
arch/x86/mm/init_32.c +1 -3
index 930edeb41ec3..0a74407ef92e 100644
@@ -865,10 +865,8 @@ void arch_remove_memory(int nid, u64 start, u64 size,
 {
 	unsigned long start_pfn = start >> PAGE_SHIFT;
 	unsigned long nr_pages = size >> PAGE_SHIFT;
-	struct zone *zone;
 
-	zone = page_zone(pfn_to_page(start_pfn));
-	__remove_pages(zone, start_pfn, nr_pages, altmap);
+	__remove_pages(start_pfn, nr_pages, altmap);
 }
 #endif
 
arch/x86/mm/init_64.c +1 -3
index a6b5c653727b..b8541d77452c 100644
@@ -1212,10 +1212,8 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size,
 {
 	unsigned long start_pfn = start >> PAGE_SHIFT;
 	unsigned long nr_pages = size >> PAGE_SHIFT;
-	struct page *page = pfn_to_page(start_pfn) + vmem_altmap_offset(altmap);
-	struct zone *zone = page_zone(page);
 
-	__remove_pages(zone, start_pfn, nr_pages, altmap);
+	__remove_pages(start_pfn, nr_pages, altmap);
 	kernel_physical_mapping_remove(start, start + size);
 }
 #endif /* CONFIG_MEMORY_HOTPLUG */
block/bio.c +39 -0
index 43df756b68c4..c822ceb7c4de 100644
@@ -535,6 +535,45 @@ void zero_fill_bio_iter(struct bio *bio, struct bvec_iter start)
 }
 EXPORT_SYMBOL(zero_fill_bio_iter);
 
+void bio_truncate(struct bio *bio, unsigned new_size)
+{
+	struct bio_vec bv;
+	struct bvec_iter iter;
+	unsigned int done = 0;
+	bool truncated = false;
+
+	if (new_size >= bio->bi_iter.bi_size)
+		return;
+
+	if (bio_data_dir(bio) != READ)
+		goto exit;
+
+	bio_for_each_segment(bv, bio, iter) {
+		if (done + bv.bv_len > new_size) {
+			unsigned offset;
+
+			if (!truncated)
+				offset = new_size - done;
+			else
+				offset = 0;
+			zero_user(bv.bv_page, offset, bv.bv_len - offset);
+			truncated = true;
+		}
+		done += bv.bv_len;
+	}
+
+ exit:
+	/*
+	 * Don't touch bvec table here and make it really immutable, since
+	 * fs bio user has to retrieve all pages via bio_for_each_segment_all
+	 * in its .end_bio() callback.
+	 *
+	 * It is enough to truncate bio by updating .bi_size since we can make
+	 * correct bvec with the updated .bi_size for drivers.
+	 */
+	bio->bi_iter.bi_size = new_size;
+}
+
 /**
  * bio_put - release a reference to a bio
  * @bio:   bio to release reference to
block/compat_ioctl.c +13 -0
index 6ca015f92766..7f053468b50d 100644
@@ -6,6 +6,7 @@
 #include <linux/compat.h>
 #include <linux/elevator.h>
 #include <linux/hdreg.h>
+#include <linux/pr.h>
 #include <linux/slab.h>
 #include <linux/syscalls.h>
 #include <linux/types.h>
@@ -354,6 +355,10 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
 	 * but we call blkdev_ioctl, which gets the lock for us
 	 */
 	case BLKRRPART:
+	case BLKREPORTZONE:
+	case BLKRESETZONE:
+	case BLKGETZONESZ:
+	case BLKGETNRZONES:
 		return blkdev_ioctl(bdev, mode, cmd,
 				(unsigned long)compat_ptr(arg));
 	case BLKBSZSET_32:
@@ -401,6 +406,14 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
 	case BLKTRACETEARDOWN: /* compatible */
 		ret = blk_trace_ioctl(bdev, cmd, compat_ptr(arg));
 		return ret;
+	case IOC_PR_REGISTER:
+	case IOC_PR_RESERVE:
+	case IOC_PR_RELEASE:
+	case IOC_PR_PREEMPT:
+	case IOC_PR_PREEMPT_ABORT:
+	case IOC_PR_CLEAR:
+		return blkdev_ioctl(bdev, mode, cmd,
+				(unsigned long)compat_ptr(arg));
 	default:
 		if (disk->fops->compat_ioctl)
 			ret = disk->fops->compat_ioctl(bdev, mode, cmd, arg);
drivers/acpi/sysfs.c +3 -3
index 75948a3f1a20..c60d2c6d31d6 100644
@@ -819,14 +819,14 @@ static ssize_t counter_set(struct kobject *kobj,
  * interface:
  *   echo unmask > /sys/firmware/acpi/interrupts/gpe00
  */
-#define ACPI_MASKABLE_GPE_MAX	0xFF
+#define ACPI_MASKABLE_GPE_MAX	0x100
 static DECLARE_BITMAP(acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) __initdata;
 
 static int __init acpi_gpe_set_masked_gpes(char *val)
 {
 	u8 gpe;
 
-	if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX)
+	if (kstrtou8(val, 0, &gpe))
 		return -EINVAL;
 	set_bit(gpe, acpi_masked_gpes_map);
 
@@ -838,7 +838,7 @@ void __init acpi_gpe_apply_masked_gpes(void)
 {
 	acpi_handle handle;
 	acpi_status status;
-	u8 gpe;
+	u16 gpe;
 
 	for_each_set_bit(gpe, acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) {
 		status = acpi_get_gpe_device(gpe, &handle);
drivers/ata/ahci_brcm.c +94 -39

214 lines not on this page · raw message

drivers/ata/libahci_platform.c +4 -2
index 8befce036af8..129556fcf6be 100644
@@ -43,7 +43,7 @@ EXPORT_SYMBOL_GPL(ahci_platform_ops);
  * RETURNS:
  * 0 on success otherwise a negative error code
  */
-static int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
+int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
 {
 	int rc, i;
 
@@ -74,6 +74,7 @@ static int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
 	}
 	return rc;
 }
+EXPORT_SYMBOL_GPL(ahci_platform_enable_phys);
 
 /**
  * ahci_platform_disable_phys - Disable PHYs
@@ -81,7 +82,7 @@ static int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
  *
  * This function disables all PHYs found in hpriv->phys.
  */
-static void ahci_platform_disable_phys(struct ahci_host_priv *hpriv)
+void ahci_platform_disable_phys(struct ahci_host_priv *hpriv)
 {
 	int i;
 
@@ -90,6 +91,7 @@ static void ahci_platform_disable_phys(struct ahci_host_priv *hpriv)
 		phy_exit(hpriv->phys[i]);
 	}
 }
+EXPORT_SYMBOL_GPL(ahci_platform_disable_phys);
 
 /**
  * ahci_platform_enable_clks - Enable platform clocks
drivers/ata/libata-core.c +24 -0
index 74c9b3032d46..84b183a6424e 100644
@@ -5325,6 +5325,30 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
 	}
 }
 
+/**
+ *	ata_qc_get_active - get bitmask of active qcs
+ *	@ap: port in question
+ *
+ *	LOCKING:
+ *	spin_lock_irqsave(host lock)
+ *
+ *	RETURNS:
+ *	Bitmask of active qcs
+ */
+u64 ata_qc_get_active(struct ata_port *ap)
+{
+	u64 qc_active = ap->qc_active;
+
+	/* ATA_TAG_INTERNAL is sent to hw as tag 0 */
+	if (qc_active & (1ULL << ATA_TAG_INTERNAL)) {
+		qc_active |= (1 << 0);
+		qc_active &= ~(1ULL << ATA_TAG_INTERNAL);
+	}
+
+	return qc_active;
+}
+EXPORT_SYMBOL_GPL(ata_qc_get_active);
+
 /**
  *	ata_qc_complete_multiple - Complete multiple qcs successfully
  *	@ap: port in question
drivers/ata/sata_fsl.c +1 -1
index 8e9cb198fcd1..ca6c706e9c25 100644
@@ -1278,7 +1278,7 @@ static void sata_fsl_host_intr(struct ata_port *ap)
 				     i, ioread32(hcr_base + CC),
 				     ioread32(hcr_base + CA));
 		}
-		ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask);
+		ata_qc_complete_multiple(ap, ata_qc_get_active(ap) ^ done_mask);
 		return;
 
 	} else if ((ap->qc_active & (1ULL << ATA_TAG_INTERNAL))) {
drivers/ata/sata_mv.c +1 -1
index ad385a113391..bde695a32097 100644
@@ -2827,7 +2827,7 @@ static void mv_process_crpb_entries(struct ata_port *ap, struct mv_port_priv *pp
 	}
 
 	if (work_done) {
-		ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask);
+		ata_qc_complete_multiple(ap, ata_qc_get_active(ap) ^ done_mask);
 
 		/* Update the software queue position index in hardware */
 		writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) |
drivers/ata/sata_nv.c +1 -1
index 56946012d113..7510303111fa 100644
@@ -984,7 +984,7 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance)
 					check_commands = 0;
 				check_commands &= ~(1 << pos);
 			}
-			ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask);
+			ata_qc_complete_multiple(ap, ata_qc_get_active(ap) ^ done_mask);
 		}
 	}
 
drivers/block/xen-blkback/blkback.c +2 -0
index fd1e19f1a49f..3666afa639d1 100644
@@ -936,6 +936,8 @@ static int xen_blkbk_map(struct xen_blkif_ring *ring,
 out_of_memory:
 	pr_alert("%s: out of memory\n", __func__);
 	put_free_pages(ring, pages_to_gnt, segs_to_map);
+	for (i = last_map; i < num; i++)
+		pages[i]->handle = BLKBACK_INVALID_HANDLE;
 	return -ENOMEM;
 }
 
drivers/block/xen-blkback/xenbus.c +10 -0
index b90dbcd99c03..c4cd68116e7f 100644
@@ -171,6 +171,15 @@ static struct xen_blkif *xen_blkif_alloc(domid_t domid)
 	blkif->domid = domid;
 	atomic_set(&blkif->refcnt, 1);
 	init_completion(&blkif->drain_complete);
+
+	/*
+	 * Because freeing back to the cache may be deferred, it is not
+	 * safe to unload the module (and hence destroy the cache) until
+	 * this has completed. To prevent premature unloading, take an
+	 * extra module reference here and release only when the object
+	 * has been freed back to the cache.
+	 */
+	__module_get(THIS_MODULE);
 	INIT_WORK(&blkif->free_work, xen_blkif_deferred_free);
 
 	return blkif;
@@ -320,6 +329,7 @@ static void xen_blkif_free(struct xen_blkif *blkif)
 
 	/* Make sure everything is drained before shutting down */
 	kmem_cache_free(xen_blkif_cachep, blkif);
+	module_put(THIS_MODULE);
 }
 
 int __init xen_blkif_interface_init(void)
drivers/bluetooth/btusb.c +2 -1
index 23e606aaaea4..04cf767d0708 100644
@@ -1200,7 +1200,7 @@ static int btusb_open(struct hci_dev *hdev)
 	if (data->setup_on_usb) {
 		err = data->setup_on_usb(hdev);
 		if (err < 0)
-			return err;
+			goto setup_fail;
 	}
 
 	data->intf->needs_remote_wakeup = 1;
@@ -1239,6 +1239,7 @@ static int btusb_open(struct hci_dev *hdev)
 
 failed:
 	clear_bit(BTUSB_INTR_RUNNING, &data->flags);
+setup_fail:
 	usb_autopm_put_interface(data->intf);
 	return err;
 }
drivers/clocksource/timer-riscv.c +1 -1
index 470c7ef02ea4..4b04ffbe5e7e 100644
@@ -41,7 +41,7 @@ static unsigned long long riscv_clocksource_rdtime(struct clocksource *cs)
 	return get_cycles64();
 }
 
-static u64 riscv_sched_clock(void)
+static u64 notrace riscv_sched_clock(void)
 {
 	return get_cycles64();
 }
drivers/devfreq/devfreq.c +15 -15
index 3a1484e7a3ae..c64d20fdc187 100644
@@ -551,26 +551,30 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type,
 				 void *devp)
 {
 	struct devfreq *devfreq = container_of(nb, struct devfreq, nb);
-	int ret;
+	int err = -EINVAL;
 
 	mutex_lock(&devfreq->lock);
 
 	devfreq->scaling_min_freq = find_available_min_freq(devfreq);
-	if (!devfreq->scaling_min_freq) {
-		mutex_unlock(&devfreq->lock);
-		return -EINVAL;
-	}
+	if (!devfreq->scaling_min_freq)
+		goto out;
 
 	devfreq->scaling_max_freq = find_available_max_freq(devfreq);
 	if (!devfreq->scaling_max_freq) {
-		mutex_unlock(&devfreq->lock);
-		return -EINVAL;
+		devfreq->scaling_max_freq = ULONG_MAX;
+		goto out;
 	}
 
-	ret = update_devfreq(devfreq);
+	err = update_devfreq(devfreq);
+
+out:
 	mutex_unlock(&devfreq->lock);
+	if (err)
+		dev_err(devfreq->dev.parent,
+			"failed to update frequency from OPP notifier (%d)\n",
+			err);
 
-	return ret;
+	return NOTIFY_OK;
 }
 
 /**
@@ -584,11 +588,6 @@ static void devfreq_dev_release(struct device *dev)
 	struct devfreq *devfreq = to_devfreq(dev);
 
 	mutex_lock(&devfreq_list_lock);
-	if (IS_ERR(find_device_devfreq(devfreq->dev.parent))) {
-		mutex_unlock(&devfreq_list_lock);
-		dev_warn(&devfreq->dev, "releasing devfreq which doesn't exist\n");
-		return;
-	}
 	list_del(&devfreq->node);
 	mutex_unlock(&devfreq_list_lock);
 
@@ -643,6 +642,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
 	devfreq->dev.parent = dev;
 	devfreq->dev.class = devfreq_class;
 	devfreq->dev.release = devfreq_dev_release;
+	INIT_LIST_HEAD(&devfreq->node);
 	devfreq->profile = profile;
 	strncpy(devfreq->governor_name, governor_name, DEVFREQ_NAME_LEN);
 	devfreq->previous_freq = profile->initial_freq;
@@ -1196,7 +1196,7 @@ static ssize_t available_governors_show(struct device *d,
 	 * The devfreq with immutable governor (e.g., passive) shows
 	 * only own governor.
 	 */
-	if (df->governor->immutable) {
+	if (df->governor && df->governor->immutable) {
 		count = scnprintf(&buf[count], DEVFREQ_NAME_LEN,
 				  "%s ", df->governor_name);
 	/*
drivers/dma/dma-jz4780.c +2 -1
index cafb1cc065bb..bf95f1d551c5 100644
@@ -1004,7 +1004,8 @@ static const struct jz4780_dma_soc_data jz4740_dma_soc_data = {
 static const struct jz4780_dma_soc_data jz4725b_dma_soc_data = {
 	.nb_channels = 6,
 	.transfer_ord_max = 5,
-	.flags = JZ_SOC_DATA_PER_CHAN_PM | JZ_SOC_DATA_NO_DCKES_DCKEC,
+	.flags = JZ_SOC_DATA_PER_CHAN_PM | JZ_SOC_DATA_NO_DCKES_DCKEC |
+		 JZ_SOC_DATA_BREAK_LINKS,
 };
 
 static const struct jz4780_dma_soc_data jz4770_dma_soc_data = {
drivers/dma/virt-dma.c +1 -2
index ec4adf4260a0..256fc662c500 100644
@@ -104,9 +104,8 @@ static void vchan_complete(unsigned long arg)
 		dmaengine_desc_get_callback(&vd->tx, &cb);
 
 		list_del(&vd->node);
-		vchan_vdesc_fini(vd);
-
 		dmaengine_desc_callback_invoke(&cb, &vd->tx_result);
+		vchan_vdesc_fini(vd);
 	}
 }
 
drivers/firewire/net.c +5 -1
index b132ab9ad607..715e491dfbc3 100644
@@ -250,7 +250,11 @@ static int fwnet_header_cache(const struct neighbour *neigh,
 	h = (struct fwnet_header *)((u8 *)hh->hh_data + HH_DATA_OFF(sizeof(*h)));
 	h->h_proto = type;
 	memcpy(h->h_dest, neigh->ha, net->addr_len);
-	hh->hh_len = FWNET_HLEN;
+
+	/* Pairs with the READ_ONCE() in neigh_resolve_output(),
+	 * neigh_hh_output() and neigh_update_hhs().
+	 */
+	smp_store_release(&hh->hh_len, FWNET_HLEN);
 
 	return 0;
 }
drivers/firmware/arm_scmi/bus.c +4 -4
index 92f843eaf1e0..7a30952b463d 100644
@@ -135,8 +135,10 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol)
 		return NULL;
 
 	id = ida_simple_get(&scmi_bus_id, 1, 0, GFP_KERNEL);
-	if (id < 0)
-		goto free_mem;
+	if (id < 0) {
+		kfree(scmi_dev);
+		return NULL;
+	}
 
 	scmi_dev->id = id;
 	scmi_dev->protocol_id = protocol;
@@ -154,8 +156,6 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol)
 put_dev:
 	put_device(&scmi_dev->dev);
 	ida_simple_remove(&scmi_bus_id, id);
-free_mem:
-	kfree(scmi_dev);
 	return NULL;
 }
 
drivers/firmware/efi/rci2-table.c +3 -0
index 76b0c354a027..de1a9a1f9f14 100644
@@ -81,6 +81,9 @@ static int __init efi_rci2_sysfs_init(void)
 	struct kobject *tables_kobj;
 	int ret = -ENOMEM;
 
+	if (rci2_table_phys == EFI_INVALID_TABLE_ADDR)
+		return 0;
+
 	rci2_base = memremap(rci2_table_phys,
 			     sizeof(struct rci2_table_global_hdr),
 			     MEMREMAP_WB);
drivers/gpio/gpio-xtensa.c +3 -4
index 43d3fa5f511a..0fb2211f9573 100644
@@ -44,15 +44,14 @@ static inline unsigned long enable_cp(unsigned long *cpenable)
 	unsigned long flags;
 
 	local_irq_save(flags);
-	RSR_CPENABLE(*cpenable);
-	WSR_CPENABLE(*cpenable | BIT(XCHAL_CP_ID_XTIOP));
-
+	*cpenable = xtensa_get_sr(cpenable);
+	xtensa_set_sr(*cpenable | BIT(XCHAL_CP_ID_XTIOP), cpenable);
 	return flags;
 }
 
 static inline void disable_cp(unsigned long flags, unsigned long cpenable)
 {
-	WSR_CPENABLE(cpenable);
+	xtensa_set_sr(cpenable, cpenable);
 	local_irq_restore(flags);
 }
 
drivers/gpio/gpiolib.c +8 -0
index 104ed299d5ea..99d19f80440e 100644
@@ -220,6 +220,14 @@ int gpiod_get_direction(struct gpio_desc *desc)
 	chip = gpiod_to_chip(desc);
 	offset = gpio_chip_hwgpio(desc);
 
+	/*
+	 * Open drain emulation using input mode may incorrectly report
+	 * input here, fix that up.
+	 */
+	if (test_bit(FLAG_OPEN_DRAIN, &desc->flags) &&
+	    test_bit(FLAG_IS_OUT, &desc->flags))
+		return 0;
+
 	if (!chip->get_direction)
 		return -ENOTSUPP;
 
drivers/gpu/drm/amd/amdgpu/df_v3_6.c +22 -16
index 5850c8e34caa..97d11d792351 100644
@@ -261,23 +261,29 @@ static void df_v3_6_update_medium_grain_clock_gating(struct amdgpu_device *adev,
 {
 	u32 tmp;
 
-	/* Put DF on broadcast mode */
-	adev->df_funcs->enable_broadcast_mode(adev, true);
-
-	if (enable && (adev->cg_flags & AMD_CG_SUPPORT_DF_MGCG)) {
-		tmp = RREG32_SOC15(DF, 0, mmDF_PIE_AON0_DfGlobalClkGater);
-		tmp &= ~DF_PIE_AON0_DfGlobalClkGater__MGCGMode_MASK;
-		tmp |= DF_V3_6_MGCG_ENABLE_15_CYCLE_DELAY;
-		WREG32_SOC15(DF, 0, mmDF_PIE_AON0_DfGlobalClkGater, tmp);
-	} else {
-		tmp = RREG32_SOC15(DF, 0, mmDF_PIE_AON0_DfGlobalClkGater);
-		tmp &= ~DF_PIE_AON0_DfGlobalClkGater__MGCGMode_MASK;
-		tmp |= DF_V3_6_MGCG_DISABLE;
-		WREG32_SOC15(DF, 0, mmDF_PIE_AON0_DfGlobalClkGater, tmp);
-	}
+	if (adev->cg_flags & AMD_CG_SUPPORT_DF_MGCG) {
+		/* Put DF on broadcast mode */
+		adev->df_funcs->enable_broadcast_mode(adev, true);
+
+		if (enable) {
+			tmp = RREG32_SOC15(DF, 0,
+					mmDF_PIE_AON0_DfGlobalClkGater);
+			tmp &= ~DF_PIE_AON0_DfGlobalClkGater__MGCGMode_MASK;
+			tmp |= DF_V3_6_MGCG_ENABLE_15_CYCLE_DELAY;
+			WREG32_SOC15(DF, 0,
+					mmDF_PIE_AON0_DfGlobalClkGater, tmp);
+		} else {
+			tmp = RREG32_SOC15(DF, 0,
+					mmDF_PIE_AON0_DfGlobalClkGater);
+			tmp &= ~DF_PIE_AON0_DfGlobalClkGater__MGCGMode_MASK;
+			tmp |= DF_V3_6_MGCG_DISABLE;
+			WREG32_SOC15(DF, 0,
+					mmDF_PIE_AON0_DfGlobalClkGater, tmp);
+		}
 
-	/* Exit broadcast mode */
-	adev->df_funcs->enable_broadcast_mode(adev, false);
+		/* Exit broadcast mode */
+		adev->df_funcs->enable_broadcast_mode(adev, false);
+	}
 }
 
 static void df_v3_6_get_clockgating_state(struct amdgpu_device *adev,
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +19 -3
index 87dd55e9d72b..cc88ba76a8d4 100644
@@ -6184,7 +6184,23 @@ static void gfx_v8_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr,
 	bool write64bit = flags & AMDGPU_FENCE_FLAG_64BIT;
 	bool int_sel = flags & AMDGPU_FENCE_FLAG_INT;
 
-	/* EVENT_WRITE_EOP - flush caches, send int */
+	/* Workaround for cache flush problems. First send a dummy EOP
+	 * event down the pipe with seq one below.
+	 */
+	amdgpu_ring_write(ring, PACKET3(PACKET3_EVENT_WRITE_EOP, 4));
+	amdgpu_ring_write(ring, (EOP_TCL1_ACTION_EN |
+				 EOP_TC_ACTION_EN |
+				 EOP_TC_WB_ACTION_EN |
+				 EVENT_TYPE(CACHE_FLUSH_AND_INV_TS_EVENT) |
+				 EVENT_INDEX(5)));
+	amdgpu_ring_write(ring, addr & 0xfffffffc);
+	amdgpu_ring_write(ring, (upper_32_bits(addr) & 0xffff) |
+				DATA_SEL(1) | INT_SEL(0));
+	amdgpu_ring_write(ring, lower_32_bits(seq - 1));
+	amdgpu_ring_write(ring, upper_32_bits(seq - 1));
+
+	/* Then send the real EOP event down the pipe:
+	 * EVENT_WRITE_EOP - flush caches, send int */
 	amdgpu_ring_write(ring, PACKET3(PACKET3_EVENT_WRITE_EOP, 4));
 	amdgpu_ring_write(ring, (EOP_TCL1_ACTION_EN |
 				 EOP_TC_ACTION_EN |
@@ -6926,7 +6942,7 @@ static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_gfx = {
 		5 +  /* COND_EXEC */
 		7 +  /* PIPELINE_SYNC */
 		VI_FLUSH_GPU_TLB_NUM_WREG * 5 + 9 + /* VM_FLUSH */
-		8 +  /* FENCE for VM_FLUSH */
+		12 +  /* FENCE for VM_FLUSH */
 		20 + /* GDS switch */
 		4 + /* double SWITCH_BUFFER,
 		       the first COND_EXEC jump to the place just
@@ -6938,7 +6954,7 @@ static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_gfx = {
 		31 + /*	DE_META */
 		3 + /* CNTX_CTRL */
 		5 + /* HDP_INVL */
-		8 + 8 + /* FENCE x2 */
+		12 + 12 + /* FENCE x2 */
 		2, /* SWITCH_BUFFER */
 	.emit_ib_size =	4, /* gfx_v8_0_ring_emit_ib_gfx */
 	.emit_ib = gfx_v8_0_ring_emit_ib_gfx,
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1 -1
index 067f5579f452..793aa8e8ec9a 100644
@@ -373,7 +373,7 @@ bool dc_link_is_dp_sink_present(struct dc_link *link)
 
 	if (GPIO_RESULT_OK != dal_ddc_open(
 		ddc, GPIO_MODE_INPUT, GPIO_DDC_CONFIG_TYPE_MODE_I2C)) {
-		dal_gpio_destroy_ddc(&ddc);
+		dal_ddc_close(ddc);
 
 		return present;
 	}
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +8 -1
index 5a583707d198..0ab890c927ec 100644
@@ -3492,7 +3492,14 @@ void dp_set_fec_enable(struct dc_link *link, bool enable)
 	if (link_enc->funcs->fec_set_enable &&
 			link->dpcd_caps.fec_cap.bits.FEC_CAPABLE) {
 		if (link->fec_state == dc_link_fec_ready && enable) {
-			msleep(1);
+			/* Accord to DP spec, FEC enable sequence can first
+			 * be transmitted anytime after 1000 LL codes have
+			 * been transmitted on the link after link training
+			 * completion. Using 1 lane RBR should have the maximum
+			 * time for transmitting 1000 LL codes which is 6.173 us.
+			 * So use 7 microseconds delay instead.
+			 */
+			udelay(7);
 			link_enc->funcs->fec_set_enable(link_enc, true);
 			link->fec_state = dc_link_fec_enabled;
 		} else if (link->fec_state == dc_link_fec_enabled && !enable) {
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +10 -3
index 78b2cc2e122f..3b7769a3e67e 100644
@@ -1419,13 +1419,20 @@ enum dc_status dcn20_build_mapped_resource(const struct dc *dc, struct dc_state
 
 static void acquire_dsc(struct resource_context *res_ctx,
 			const struct resource_pool *pool,
-			struct display_stream_compressor **dsc)
+			struct display_stream_compressor **dsc,
+			int pipe_idx)
 {
 	int i;
 
 	ASSERT(*dsc == NULL);
 	*dsc = NULL;
 
+	if (pool->res_cap->num_dsc == pool->res_cap->num_opp) {
+		*dsc = pool->dscs[pipe_idx];
+		res_ctx->is_dsc_acquired[pipe_idx] = true;
+		return;
+	}
+
 	/* Find first free DSC */
 	for (i = 0; i < pool->res_cap->num_dsc; i++)
 		if (!res_ctx->is_dsc_acquired[i]) {
@@ -1468,7 +1475,7 @@ static enum dc_status add_dsc_to_stream_resource(struct dc *dc,
 		if (pipe_ctx->stream != dc_stream)
 			continue;
 
-		acquire_dsc(&dc_ctx->res_ctx, pool, &pipe_ctx->stream_res.dsc);
+		acquire_dsc(&dc_ctx->res_ctx, pool, &pipe_ctx->stream_res.dsc, i);
 
 		/* The number of DSCs can be less than the number of pipes */
 		if (!pipe_ctx->stream_res.dsc) {
@@ -1669,7 +1676,7 @@ static bool dcn20_split_stream_for_odm(
 	next_odm_pipe->stream_res.opp = pool->opps[next_odm_pipe->pipe_idx];
 #ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
 	if (next_odm_pipe->stream->timing.flags.DSC == 1) {
-		acquire_dsc(res_ctx, pool, &next_odm_pipe->stream_res.dsc);
+		acquire_dsc(res_ctx, pool, &next_odm_pipe->stream_res.dsc, next_odm_pipe->pipe_idx);
 		ASSERT(next_odm_pipe->stream_res.dsc);
 		if (next_odm_pipe->stream_res.dsc == NULL)
 			return false;
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c +10 -2
index 5ab9d6240498..e95025b1d14d 100644
@@ -492,15 +492,23 @@ void enc2_stream_encoder_dp_unblank(
 				DP_VID_N_MUL, n_multiply);
 	}
 
-	/* set DIG_START to 0x1 to reset FIFO */
+	/* make sure stream is disabled before resetting steer fifo */
+	REG_UPDATE(DP_VID_STREAM_CNTL, DP_VID_STREAM_ENABLE, false);
+	REG_WAIT(DP_VID_STREAM_CNTL, DP_VID_STREAM_STATUS, 0, 10, 5000);
 
+	/* set DIG_START to 0x1 to reset FIFO */
 	REG_UPDATE(DIG_FE_CNTL, DIG_START, 1);
+	udelay(1);
 
 	/* write 0 to take the FIFO out of reset */
 
 	REG_UPDATE(DIG_FE_CNTL, DIG_START, 0);
 
-	/* switch DP encoder to CRTC data */
+	/* switch DP encoder to CRTC data, but reset it the fifo first. It may happen
+	 * that it overflows during mode transition, and sometimes doesn't recover.
+	 */
+	REG_UPDATE(DP_STEER_FIFO, DP_STEER_FIFO_RESET, 1);
+	udelay(10);
 
 	REG_UPDATE(DP_STEER_FIFO, DP_STEER_FIFO_RESET, 0);
 
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +1 -1
index de182185fe1f..b0e5e64df212 100644
@@ -258,7 +258,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn2_1_soc = {
 	.vmm_page_size_bytes = 4096,
 	.dram_clock_change_latency_us = 23.84,
 	.return_bus_width_bytes = 64,
-	.dispclk_dppclk_vco_speed_mhz = 3550,
+	.dispclk_dppclk_vco_speed_mhz = 3600,
 	.xfc_bus_transport_time_us = 4,
 	.xfc_xbuf_latency_tolerance_us = 4,
 	.use_urgent_burst_bw = 1,
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +1 -0
index 58c091ab67b2..a066e9297777 100644
@@ -844,6 +844,7 @@ static int smu_sw_init(void *handle)
 	smu->smu_baco.platform_support = false;
 
 	mutex_init(&smu->sensor_lock);
+	mutex_init(&smu->metrics_lock);
 
 	smu->watermarks_bitmap = 0;
 	smu->power_profile_mode = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +8 -0
index d493a3f8c07a..08a717a34bd6 100644
@@ -910,18 +910,21 @@ static int arcturus_get_metrics_table(struct smu_context *smu,
 	struct smu_table_context *smu_table= &smu->smu_table;
 	int ret = 0;
 
+	mutex_lock(&smu->metrics_lock);
 	if (!smu_table->metrics_time ||
 	     time_after(jiffies, smu_table->metrics_time + HZ / 1000)) {
 		ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS, 0,
 				(void *)smu_table->metrics_table, false);
 		if (ret) {
 			pr_info("Failed to export SMU metrics table!\n");
+			mutex_unlock(&smu->metrics_lock);
 			return ret;
 		}
 		smu_table->metrics_time = jiffies;
 	}
 
 	memcpy(metrics_table, smu_table->metrics_table, sizeof(SmuMetrics_t));
+	mutex_unlock(&smu->metrics_lock);
 
 	return ret;
 }
@@ -1388,12 +1391,17 @@ static int arcturus_get_power_profile_mode(struct smu_context *smu,
 					"VR",
 					"COMPUTE",
 					"CUSTOM"};
+	static const char *title[] = {
+			"PROFILE_INDEX(NAME)"};
 	uint32_t i, size = 0;
 	int16_t workload_type = 0;
 
 	if (!smu->pm_enabled || !buf)
 		return -EINVAL;
 
+	size += sprintf(buf + size, "%16s\n",
+			title[0]);
+
 	for (i = 0; i <= PP_SMC_POWER_PROFILE_CUSTOM; i++) {
 		/*
 		 * Conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h +1 -0
index 23171a4d9a31..5ad9a7878f6b 100644
@@ -345,6 +345,7 @@ struct smu_context
 	const struct pptable_funcs	*ppt_funcs;
 	struct mutex			mutex;
 	struct mutex			sensor_lock;
+	struct mutex			metrics_lock;
 	uint64_t pool_size;
 
 	struct smu_table_context	smu_table;
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +3 -0
index 328e258a6895..7d913a06ebac 100644
@@ -547,17 +547,20 @@ static int navi10_get_metrics_table(struct smu_context *smu,
 	struct smu_table_context *smu_table= &smu->smu_table;
 	int ret = 0;
 
+	mutex_lock(&smu->metrics_lock);
 	if (!smu_table->metrics_time || time_after(jiffies, smu_table->metrics_time + msecs_to_jiffies(100))) {
 		ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS, 0,
 				(void *)smu_table->metrics_table, false);
 		if (ret) {
 			pr_info("Failed to export SMU metrics table!\n");
+			mutex_unlock(&smu->metrics_lock);
 			return ret;
 		}
 		smu_table->metrics_time = jiffies;
 	}
 
 	memcpy(metrics_table, smu_table->metrics_table, sizeof(SmuMetrics_t));
+	mutex_unlock(&smu->metrics_lock);
 
 	return ret;
 }
drivers/gpu/drm/amd/powerplay/vega20_ppt.c +3 -0
index 92c393f613d3..3c3f719971f7 100644
@@ -1691,17 +1691,20 @@ static int vega20_get_metrics_table(struct smu_context *smu,
 	struct smu_table_context *smu_table= &smu->smu_table;
 	int ret = 0;
 
+	mutex_lock(&smu->metrics_lock);
 	if (!smu_table->metrics_time || time_after(jiffies, smu_table->metrics_time + HZ / 1000)) {
 		ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS, 0,
 				(void *)smu_table->metrics_table, false);
 		if (ret) {
 			pr_info("Failed to export SMU metrics table!\n");
+			mutex_unlock(&smu->metrics_lock);
 			return ret;
 		}
 		smu_table->metrics_time = jiffies;
 	}
 
 	memcpy(metrics_table, smu_table->metrics_table, sizeof(SmuMetrics_t));
+	mutex_unlock(&smu->metrics_lock);
 
 	return ret;
 }
drivers/gpu/drm/i915/gt/intel_lrc.c +2 -1
index 06a506c29463..d564bfcab6a3 100644
@@ -525,7 +525,8 @@ __unwind_incomplete_requests(struct intel_engine_cs *engine)
 			 */
 			if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
 				     &rq->fence.flags)) {
-				spin_lock(&rq->lock);
+				spin_lock_nested(&rq->lock,
+						 SINGLE_DEPTH_NESTING);
 				i915_request_cancel_breadcrumb(rq);
 				spin_unlock(&rq->lock);
 			}
drivers/gpu/drm/mcde/mcde_dsi.c +4 -2
index f9c9e32b299c..35bb825d1918 100644
@@ -935,11 +935,13 @@ static int mcde_dsi_bind(struct device *dev, struct device *master,
 	for_each_available_child_of_node(dev->of_node, child) {
 		panel = of_drm_find_panel(child);
 		if (IS_ERR(panel)) {
-			dev_err(dev, "failed to find panel try bridge (%lu)\n",
+			dev_err(dev, "failed to find panel try bridge (%ld)\n",
 				PTR_ERR(panel));
+			panel = NULL;
+
 			bridge = of_drm_find_bridge(child);
 			if (IS_ERR(bridge)) {
-				dev_err(dev, "failed to find bridge (%lu)\n",
+				dev_err(dev, "failed to find bridge (%ld)\n",
 					PTR_ERR(bridge));
 				return PTR_ERR(bridge);
 			}
drivers/gpu/drm/msm/msm_gpu.c +1 -0
index a052364a5d74..edd45f434ccd 100644
@@ -16,6 +16,7 @@
 #include <linux/pm_opp.h>
 #include <linux/devfreq.h>
 #include <linux/devcoredump.h>
+#include <linux/sched/task.h>
 
 /*
  * Power Management:
drivers/gpu/drm/nouveau/dispnv50/disp.c +3 -3
index b5b1a34f896f..d735ea7e2d88 100644
@@ -326,9 +326,9 @@ nv50_outp_atomic_check_view(struct drm_encoder *encoder,
 			 * same size as the native one (e.g. different
 			 * refresh rate)
 			 */
-			if (adjusted_mode->hdisplay == native_mode->hdisplay &&
-			    adjusted_mode->vdisplay == native_mode->vdisplay &&
-			    adjusted_mode->type & DRM_MODE_TYPE_DRIVER)
+			if (mode->hdisplay == native_mode->hdisplay &&
+			    mode->vdisplay == native_mode->vdisplay &&
+			    mode->type & DRM_MODE_TYPE_DRIVER)
 				break;
 			mode = native_mode;
 			asyc->scaler.full = true;
drivers/gpu/drm/nouveau/nouveau_connector.c +21 -7
index a442a955f98c..eb31c5b6c8e9 100644
@@ -245,14 +245,22 @@ nouveau_conn_atomic_duplicate_state(struct drm_connector *connector)
 void
 nouveau_conn_reset(struct drm_connector *connector)
 {
+	struct nouveau_connector *nv_connector = nouveau_connector(connector);
 	struct nouveau_conn_atom *asyc;
 
-	if (WARN_ON(!(asyc = kzalloc(sizeof(*asyc), GFP_KERNEL))))
-		return;
+	if (drm_drv_uses_atomic_modeset(connector->dev)) {
+		if (WARN_ON(!(asyc = kzalloc(sizeof(*asyc), GFP_KERNEL))))
+			return;
+
+		if (connector->state)
+			nouveau_conn_atomic_destroy_state(connector,
+							  connector->state);
+
+		__drm_atomic_helper_connector_reset(connector, &asyc->state);
+	} else {
+		asyc = &nv_connector->properties_state;
+	}
 
-	if (connector->state)
-		nouveau_conn_atomic_destroy_state(connector, connector->state);
-	__drm_atomic_helper_connector_reset(connector, &asyc->state);
 	asyc->dither.mode = DITHERING_MODE_AUTO;
 	asyc->dither.depth = DITHERING_DEPTH_AUTO;
 	asyc->scaler.mode = DRM_MODE_SCALE_NONE;
@@ -276,8 +284,14 @@ void
 nouveau_conn_attach_properties(struct drm_connector *connector)
 {
 	struct drm_device *dev = connector->dev;
-	struct nouveau_conn_atom *armc = nouveau_conn_atom(connector->state);
 	struct nouveau_display *disp = nouveau_display(dev);
+	struct nouveau_connector *nv_connector = nouveau_connector(connector);
+	struct nouveau_conn_atom *armc;
+
+	if (drm_drv_uses_atomic_modeset(connector->dev))
+		armc = nouveau_conn_atom(connector->state);
+	else
+		armc = &nv_connector->properties_state;
 
 	/* Init DVI-I specific properties. */
 	if (connector->connector_type == DRM_MODE_CONNECTOR_DVII)
@@ -749,9 +763,9 @@ static int
 nouveau_connector_set_property(struct drm_connector *connector,
 			       struct drm_property *property, uint64_t value)
 {
-	struct nouveau_conn_atom *asyc = nouveau_conn_atom(connector->state);
 	struct nouveau_connector *nv_connector = nouveau_connector(connector);
 	struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder;
+	struct nouveau_conn_atom *asyc = &nv_connector->properties_state;
 	struct drm_encoder *encoder = to_drm_encoder(nv_encoder);
 	int ret;
 
drivers/gpu/drm/nouveau/nouveau_connector.h +61 -55

140 lines not on this page · raw message

drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +0 -2
index eb8071a4d6d0..9c3bdfd20337 100644
@@ -683,8 +683,6 @@ static void sun4i_hdmi_unbind(struct device *dev, struct device *master,
 	struct sun4i_hdmi *hdmi = dev_get_drvdata(dev);
 
 	cec_unregister_adapter(hdmi->cec_adap);
-	drm_connector_cleanup(&hdmi->connector);
-	drm_encoder_cleanup(&hdmi->encoder);
 	i2c_del_adapter(hdmi->i2c);
 	i2c_put_adapter(hdmi->ddc_i2c);
 	clk_disable_unprepare(hdmi->mod_clk);
drivers/hid/i2c-hid/i2c-hid-core.c +11 -1
index 7608ee053114..ac44bf752ff1 100644
@@ -48,6 +48,7 @@
 #define I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV	BIT(0)
 #define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET	BIT(1)
 #define I2C_HID_QUIRK_BOGUS_IRQ			BIT(4)
+#define I2C_HID_QUIRK_RESET_ON_RESUME		BIT(5)
 
 /* flags */
 #define I2C_HID_STARTED		0
@@ -174,6 +175,8 @@ static const struct i2c_hid_quirks {
 		I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
 	{ USB_VENDOR_ID_ELAN, HID_ANY_ID,
 		 I2C_HID_QUIRK_BOGUS_IRQ },
+	{ USB_VENDOR_ID_ALPS_JP, HID_ANY_ID,
+		 I2C_HID_QUIRK_RESET_ON_RESUME },
 	{ 0, 0 }
 };
 
@@ -1214,8 +1217,15 @@ static int i2c_hid_resume(struct device *dev)
 	 * solves "incomplete reports" on Raydium devices 2386:3118 and
 	 * 2386:4B33 and fixes various SIS touchscreens no longer sending
 	 * data after a suspend/resume.
+	 *
+	 * However some ALPS touchpads generate IRQ storm without reset, so
+	 * let's still reset them here.
 	 */
-	ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
+	if (ihid->quirks & I2C_HID_QUIRK_RESET_ON_RESUME)
+		ret = i2c_hid_hwreset(client);
+	else
+		ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
+
 	if (ret)
 		return ret;
 
drivers/iio/accel/st_accel_core.c +6 -2
index 2e37f8a6d8cf..be661396095c 100644
@@ -993,6 +993,7 @@ static const struct iio_trigger_ops st_accel_trigger_ops = {
 #define ST_ACCEL_TRIGGER_OPS NULL
 #endif
 
+#ifdef CONFIG_ACPI
 static const struct iio_mount_matrix *
 get_mount_matrix(const struct iio_dev *indio_dev,
 		 const struct iio_chan_spec *chan)
@@ -1013,7 +1014,6 @@ static const struct iio_chan_spec_ext_info mount_matrix_ext_info[] = {
 static int apply_acpi_orientation(struct iio_dev *indio_dev,
 				  struct iio_chan_spec *channels)
 {
-#ifdef CONFIG_ACPI
 	struct st_sensor_data *adata = iio_priv(indio_dev);
 	struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
 	struct acpi_device *adev;
@@ -1141,10 +1141,14 @@ static int apply_acpi_orientation(struct iio_dev *indio_dev,
 out:
 	kfree(buffer.pointer);
 	return ret;
+}
 #else /* !CONFIG_ACPI */
+static int apply_acpi_orientation(struct iio_dev *indio_dev,
+				  struct iio_chan_spec *channels)
+{
 	return 0;
-#endif
 }
+#endif
 
 /*
  * st_accel_get_settings() - get sensor settings from device name
drivers/iio/adc/max9611.c +10 -6
index da073d72f649..e480529b3f04 100644
@@ -89,6 +89,12 @@
 #define MAX9611_TEMP_SCALE_NUM		1000000
 #define MAX9611_TEMP_SCALE_DIV		2083
 
+/*
+ * Conversion time is 2 ms (typically) at Ta=25 degreeC
+ * No maximum value is known, so play it safe.
+ */
+#define MAX9611_CONV_TIME_US_RANGE	3000, 3300
+
 struct max9611_dev {
 	struct device *dev;
 	struct i2c_client *i2c_client;
@@ -236,11 +242,9 @@ static int max9611_read_single(struct max9611_dev *max9611,
 		return ret;
 	}
 
-	/*
-	 * need a delay here to make register configuration
-	 * stabilize. 1 msec at least, from empirical testing.
-	 */
-	usleep_range(1000, 2000);
+	/* need a delay here to make register configuration stabilize. */
+
+	usleep_range(MAX9611_CONV_TIME_US_RANGE);
 
 	ret = i2c_smbus_read_word_swapped(max9611->i2c_client, reg_addr);
 	if (ret < 0) {
@@ -507,7 +511,7 @@ static int max9611_init(struct max9611_dev *max9611)
 			MAX9611_REG_CTRL2, 0);
 		return ret;
 	}
-	usleep_range(1000, 2000);
+	usleep_range(MAX9611_CONV_TIME_US_RANGE);
 
 	return 0;
 }
drivers/infiniband/core/cma.c +1 -0
index d78f67623f24..50052e9a1731 100644
@@ -4736,6 +4736,7 @@ static int __init cma_init(void)
 err:
 	unregister_netdevice_notifier(&cma_nb);
 	ib_sa_unregister_client(&sa_client);
+	unregister_pernet_subsys(&cma_pernet_operations);
 err_wq:
 	destroy_workqueue(cma_wq);
 	return ret;
drivers/infiniband/core/counters.c +3 -0
index 680ad27f497d..023478107f0e 100644
@@ -282,6 +282,9 @@ int rdma_counter_bind_qp_auto(struct ib_qp *qp, u8 port)
 	struct rdma_counter *counter;
 	int ret;
 
+	if (!qp->res.valid)
+		return 0;
+
 	if (!rdma_is_port_valid(dev, port))
 		return -EINVAL;
 
drivers/infiniband/hw/mlx4/main.c +5 -4
index 8d2f1e38b891..907d99822bf0 100644
@@ -3008,16 +3008,17 @@ static void mlx4_ib_remove(struct mlx4_dev *dev, void *ibdev_ptr)
 	ibdev->ib_active = false;
 	flush_workqueue(wq);
 
-	mlx4_ib_close_sriov(ibdev);
-	mlx4_ib_mad_cleanup(ibdev);
-	ib_unregister_device(&ibdev->ib_dev);
-	mlx4_ib_diag_cleanup(ibdev);
 	if (ibdev->iboe.nb.notifier_call) {
 		if (unregister_netdevice_notifier(&ibdev->iboe.nb))
 			pr_warn("failure unregistering notifier\n");
 		ibdev->iboe.nb.notifier_call = NULL;
 	}
 
+	mlx4_ib_close_sriov(ibdev);
+	mlx4_ib_mad_cleanup(ibdev);
+	ib_unregister_device(&ibdev->ib_dev);
+	mlx4_ib_diag_cleanup(ibdev);
+
 	mlx4_qp_release_range(dev, ibdev->steer_qpn_base,
 			      ibdev->steer_qpn_count);
 	kfree(ibdev->ib_uc_qpns_bitmap);
drivers/infiniband/hw/mlx5/main.c +6 -7
index 831539419c30..e1cfbedefcbc 100644
@@ -3548,10 +3548,6 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,
 	}
 
 	INIT_LIST_HEAD(&handler->list);
-	if (dst) {
-		memcpy(&dest_arr[0], dst, sizeof(*dst));
-		dest_num++;
-	}
 
 	for (spec_index = 0; spec_index < flow_attr->num_of_specs; spec_index++) {
 		err = parse_flow_attr(dev->mdev, spec,
@@ -3564,6 +3560,11 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,
 		ib_flow += ((union ib_flow_spec *)ib_flow)->size;
 	}
 
+	if (dst && !(flow_act.action & MLX5_FLOW_CONTEXT_ACTION_DROP)) {
+		memcpy(&dest_arr[0], dst, sizeof(*dst));
+		dest_num++;
+	}
+
 	if (!flow_is_multicast_only(flow_attr))
 		set_underlay_qp(dev, spec, underlay_qpn);
 
@@ -3604,10 +3605,8 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,
 	}
 
 	if (flow_act.action & MLX5_FLOW_CONTEXT_ACTION_DROP) {
-		if (!(flow_act.action & MLX5_FLOW_CONTEXT_ACTION_COUNT)) {
+		if (!dest_num)
 			rule_dst = NULL;
-			dest_num = 0;
-		}
 	} else {
 		if (is_egress)
 			flow_act.action |= MLX5_FLOW_CONTEXT_ACTION_ALLOW;
drivers/infiniband/sw/rxe/rxe_recv.c +1 -1
index f9a492ed900b..831ad578a7b2 100644
@@ -389,7 +389,7 @@ void rxe_rcv(struct sk_buff *skb)
 
 	calc_icrc = rxe_icrc_hdr(pkt, skb);
 	calc_icrc = rxe_crc32(rxe, calc_icrc, (u8 *)payload_addr(pkt),
-			      payload_size(pkt));
+			      payload_size(pkt) + bth_pad(pkt));
 	calc_icrc = (__force u32)cpu_to_be32(~calc_icrc);
 	if (unlikely(calc_icrc != pack_icrc)) {
 		if (skb->protocol == htons(ETH_P_IPV6))
drivers/infiniband/sw/rxe/rxe_req.c +6 -0
index c5d9b558fa90..e5031172c019 100644
@@ -500,6 +500,12 @@ static int fill_packet(struct rxe_qp *qp, struct rxe_send_wqe *wqe,
 			if (err)
 				return err;
 		}
+		if (bth_pad(pkt)) {
+			u8 *pad = payload_addr(pkt) + paylen;
+
+			memset(pad, 0, bth_pad(pkt));
+			crc = rxe_crc32(rxe, crc, pad, bth_pad(pkt));
+		}
 	}
 	p = payload_addr(pkt) + paylen + bth_pad(pkt);
 
drivers/infiniband/sw/rxe/rxe_resp.c +7 -0
index 1cbfbd98eb22..c4a8195bf670 100644
@@ -732,6 +732,13 @@ static enum resp_states read_reply(struct rxe_qp *qp,
 	if (err)
 		pr_err("Failed copying memory\n");
 
+	if (bth_pad(&ack_pkt)) {
+		struct rxe_dev *rxe = to_rdev(qp->ibqp.device);
+		u8 *pad = payload_addr(&ack_pkt) + payload;
+
+		memset(pad, 0, bth_pad(&ack_pkt));
+		icrc = rxe_crc32(rxe, icrc, pad, bth_pad(&ack_pkt));
+	}
 	p = payload_addr(&ack_pkt) + payload + bth_pad(&ack_pkt);
 	*p = ~icrc;
 
drivers/iommu/intel-svm.c +1 -5
index 9b159132405d..dca88f9fdf29 100644
@@ -104,11 +104,7 @@ static void intel_flush_svm_range_dev (struct intel_svm *svm, struct intel_svm_d
 {
 	struct qi_desc desc;
 
-	/*
-	 * Do PASID granu IOTLB invalidation if page selective capability is
-	 * not available.
-	 */
-	if (pages == -1 || !cap_pgsel_inv(svm->iommu->cap)) {
+	if (pages == -1) {
 		desc.qw0 = QI_EIOTLB_PASID(svm->pasid) |
 			QI_EIOTLB_DID(sdev->did) |
 			QI_EIOTLB_GRAN(QI_GRAN_NONG_PASID) |
drivers/md/raid1.c +1 -1
index bb29aeefcbd0..c7137f50bd1d 100644
@@ -2781,7 +2781,7 @@ static sector_t raid1_sync_request(struct mddev *mddev, sector_t sector_nr,
 				write_targets++;
 			}
 		}
-		if (bio->bi_end_io) {
+		if (rdev && bio->bi_end_io) {
 			atomic_inc(&rdev->nr_pending);
 			bio->bi_iter.bi_sector = sector_nr + rdev->data_offset;
 			bio_set_dev(bio, rdev->bdev);
drivers/md/raid5.c +1 -1
index 12a8ce83786e..36cd7c2fbf40 100644
@@ -5726,7 +5726,7 @@ static bool raid5_make_request(struct mddev *mddev, struct bio * bi)
 				do_flush = false;
 			}
 
-			if (!sh->batch_head)
+			if (!sh->batch_head || sh == sh->batch_head)
 				set_bit(STRIPE_HANDLE, &sh->state);
 			clear_bit(STRIPE_DELAYED, &sh->state);
 			if ((!sh->batch_head || sh == sh->batch_head) &&
drivers/media/cec/cec-adap.c +27 -13
index 5ef7daeb8cbd..b14c09cd9593 100644
@@ -378,7 +378,8 @@ static void cec_data_cancel(struct cec_data *data, u8 tx_status)
 	} else {
 		list_del_init(&data->list);
 		if (!(data->msg.tx_status & CEC_TX_STATUS_OK))
-			data->adap->transmit_queue_sz--;
+			if (!WARN_ON(!data->adap->transmit_queue_sz))
+				data->adap->transmit_queue_sz--;
 	}
 
 	if (data->msg.tx_status & CEC_TX_STATUS_OK) {
@@ -430,6 +431,14 @@ static void cec_flush(struct cec_adapter *adap)
 		 * need to do anything special in that case.
 		 */
 	}
+	/*
+	 * If something went wrong and this counter isn't what it should
+	 * be, then this will reset it back to 0. Warn if it is not 0,
+	 * since it indicates a bug, either in this framework or in a
+	 * CEC driver.
+	 */
+	if (WARN_ON(adap->transmit_queue_sz))
+		adap->transmit_queue_sz = 0;
 }
 
 /*
@@ -454,7 +463,7 @@ int cec_thread_func(void *_adap)
 		bool timeout = false;
 		u8 attempts;
 
-		if (adap->transmitting) {
+		if (adap->transmit_in_progress) {
 			int err;
 
 			/*
@@ -489,7 +498,7 @@ int cec_thread_func(void *_adap)
 			goto unlock;
 		}
 
-		if (adap->transmitting && timeout) {
+		if (adap->transmit_in_progress && timeout) {
 			/*
 			 * If we timeout, then log that. Normally this does
 			 * not happen and it is an indication of a faulty CEC
@@ -498,14 +507,18 @@ int cec_thread_func(void *_adap)
 			 * so much traffic on the bus that the adapter was
 			 * unable to transmit for CEC_XFER_TIMEOUT_MS (2.1s).
 			 */
-			pr_warn("cec-%s: message %*ph timed out\n", adap->name,
-				adap->transmitting->msg.len,
-				adap->transmitting->msg.msg);
+			if (adap->transmitting) {
+				pr_warn("cec-%s: message %*ph timed out\n", adap->name,
+					adap->transmitting->msg.len,
+					adap->transmitting->msg.msg);
+				/* Just give up on this. */
+				cec_data_cancel(adap->transmitting,
+						CEC_TX_STATUS_TIMEOUT);
+			} else {
+				pr_warn("cec-%s: transmit timed out\n", adap->name);
+			}
 			adap->transmit_in_progress = false;
 			adap->tx_timeouts++;
-			/* Just give up on this. */
-			cec_data_cancel(adap->transmitting,
-					CEC_TX_STATUS_TIMEOUT);
 			goto unlock;
 		}
 
@@ -520,7 +533,8 @@ int cec_thread_func(void *_adap)
 		data = list_first_entry(&adap->transmit_queue,
 					struct cec_data, list);
 		list_del_init(&data->list);
-		adap->transmit_queue_sz--;
+		if (!WARN_ON(!data->adap->transmit_queue_sz))
+			adap->transmit_queue_sz--;
 
 		/* Make this the current transmitting message */
 		adap->transmitting = data;
@@ -1083,11 +1097,11 @@ void cec_received_msg_ts(struct cec_adapter *adap,
 			valid_la = false;
 		else if (!cec_msg_is_broadcast(msg) && !(dir_fl & DIRECTED))
 			valid_la = false;
-		else if (cec_msg_is_broadcast(msg) && !(dir_fl & BCAST1_4))
+		else if (cec_msg_is_broadcast(msg) && !(dir_fl & BCAST))
 			valid_la = false;
 		else if (cec_msg_is_broadcast(msg) &&
-			 adap->log_addrs.cec_version >= CEC_OP_CEC_VERSION_2_0 &&
-			 !(dir_fl & BCAST2_0))
+			 adap->log_addrs.cec_version < CEC_OP_CEC_VERSION_2_0 &&
+			 !(dir_fl & BCAST1_4))
 			valid_la = false;
 	}
 	if (valid_la && min_len) {
drivers/media/usb/b2c2/flexcop-usb.c +1 -1
index d1331f828108..039963a7765b 100644
@@ -295,7 +295,7 @@ static int flexcop_usb_i2c_req(struct flexcop_i2c_adapter *i2c,
 
 	mutex_unlock(&fc_usb->data_mutex);
 
-	return 0;
+	return ret;
 }
 
 /* actual bus specific access functions,
drivers/media/usb/dvb-usb/af9005.c +3 -2
index 02697d86e8c1..ac93e88d7038 100644
@@ -976,8 +976,9 @@ static int af9005_identify_state(struct usb_device *udev,
 	else if (reply == 0x02)
 		*cold = 0;
 	else
-		return -EIO;
-	deb_info("Identify state cold = %d\n", *cold);
+		ret = -EIO;
+	if (!ret)
+		deb_info("Identify state cold = %d\n", *cold);
 
 err:
 	kfree(buf);
drivers/media/usb/pulse8-cec/pulse8-cec.c +13 -4
index ac88ade94cda..59609556d969 100644
@@ -116,6 +116,7 @@ struct pulse8 {
 	unsigned int vers;
 	struct completion cmd_done;
 	struct work_struct work;
+	u8 work_result;
 	struct delayed_work ping_eeprom_work;
 	struct cec_msg rx_msg;
 	u8 data[DATA_SIZE];
@@ -137,8 +138,10 @@ static void pulse8_irq_work_handler(struct work_struct *work)
 {
 	struct pulse8 *pulse8 =
 		container_of(work, struct pulse8, work);
+	u8 result = pulse8->work_result;
 
-	switch (pulse8->data[0] & 0x3f) {
+	pulse8->work_result = 0;
+	switch (result & 0x3f) {
 	case MSGCODE_FRAME_DATA:
 		cec_received_msg(pulse8->adap, &pulse8->rx_msg);
 		break;
@@ -172,12 +175,12 @@ static irqreturn_t pulse8_interrupt(struct serio *serio, unsigned char data,
 		pulse8->escape = false;
 	} else if (data == MSGEND) {
 		struct cec_msg *msg = &pulse8->rx_msg;
+		u8 msgcode = pulse8->buf[0];
 
 		if (debug)
 			dev_info(pulse8->dev, "received: %*ph\n",
 				 pulse8->idx, pulse8->buf);
-		pulse8->data[0] = pulse8->buf[0];
-		switch (pulse8->buf[0] & 0x3f) {
+		switch (msgcode & 0x3f) {
 		case MSGCODE_FRAME_START:
 			msg->len = 1;
 			msg->msg[0] = pulse8->buf[1];
@@ -186,14 +189,20 @@ static irqreturn_t pulse8_interrupt(struct serio *serio, unsigned char data,
 			if (msg->len == CEC_MAX_MSG_SIZE)
 				break;
 			msg->msg[msg->len++] = pulse8->buf[1];
-			if (pulse8->buf[0] & MSGCODE_FRAME_EOM)
+			if (msgcode & MSGCODE_FRAME_EOM) {
+				WARN_ON(pulse8->work_result);
+				pulse8->work_result = msgcode;
 				schedule_work(&pulse8->work);
+				break;
+			}
 			break;
 		case MSGCODE_TRANSMIT_SUCCEEDED:
 		case MSGCODE_TRANSMIT_FAILED_LINE:
 		case MSGCODE_TRANSMIT_FAILED_ACK:
 		case MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA:
 		case MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE:
+			WARN_ON(pulse8->work_result);
+			pulse8->work_result = msgcode;
 			schedule_work(&pulse8->work);
 			break;
 		case MSGCODE_HIGH_ERROR:
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +19 -4
index 4e8e80ac8341..9cec5c216e1f 100644
@@ -973,6 +973,8 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
 	struct ath_htc_rx_status *rxstatus;
 	struct ath_rx_status rx_stats;
 	bool decrypt_error = false;
+	__be16 rs_datalen;
+	bool is_phyerr;
 
 	if (skb->len < HTC_RX_FRAME_HEADER_SIZE) {
 		ath_err(common, "Corrupted RX frame, dropping (len: %d)\n",
@@ -982,11 +984,24 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
 
 	rxstatus = (struct ath_htc_rx_status *)skb->data;
 
-	if (be16_to_cpu(rxstatus->rs_datalen) -
-	    (skb->len - HTC_RX_FRAME_HEADER_SIZE) != 0) {
+	rs_datalen = be16_to_cpu(rxstatus->rs_datalen);
+	if (unlikely(rs_datalen -
+	    (skb->len - HTC_RX_FRAME_HEADER_SIZE) != 0)) {
 		ath_err(common,
 			"Corrupted RX data len, dropping (dlen: %d, skblen: %d)\n",
-			rxstatus->rs_datalen, skb->len);
+			rs_datalen, skb->len);
+		goto rx_next;
+	}
+
+	is_phyerr = rxstatus->rs_status & ATH9K_RXERR_PHY;
+	/*
+	 * Discard zero-length packets and packets smaller than an ACK
+	 * which are not PHY_ERROR (short radar pulses have a length of 3)
+	 */
+	if (unlikely(!rs_datalen || (rs_datalen < 10 && !is_phyerr))) {
+		ath_warn(common,
+			 "Short RX data len, dropping (dlen: %d)\n",
+			 rs_datalen);
 		goto rx_next;
 	}
 
@@ -1011,7 +1026,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
 	 * Process PHY errors and return so that the packet
 	 * can be dropped.
 	 */
-	if (rx_stats.rs_status & ATH9K_RXERR_PHY) {
+	if (unlikely(is_phyerr)) {
 		/* TODO: Not using DFS processing now. */
 		if (ath_cmn_process_fft(&priv->spec_priv, hdr,
 				    &rx_stats, rx_status->mactime)) {
drivers/nvme/host/fc.c +27 -5
index 265f89e11d8b..59474bd0c728 100644
@@ -342,7 +342,8 @@ nvme_fc_register_localport(struct nvme_fc_port_info *pinfo,
 	    !template->ls_req || !template->fcp_io ||
 	    !template->ls_abort || !template->fcp_abort ||
 	    !template->max_hw_queues || !template->max_sgl_segments ||
-	    !template->max_dif_sgl_segments || !template->dma_boundary) {
+	    !template->max_dif_sgl_segments || !template->dma_boundary ||
+	    !template->module) {
 		ret = -EINVAL;
 		goto out_reghost_failed;
 	}
@@ -2015,6 +2016,7 @@ nvme_fc_ctrl_free(struct kref *ref)
 {
 	struct nvme_fc_ctrl *ctrl =
 		container_of(ref, struct nvme_fc_ctrl, ref);
+	struct nvme_fc_lport *lport = ctrl->lport;
 	unsigned long flags;
 
 	if (ctrl->ctrl.tagset) {
@@ -2041,6 +2043,7 @@ nvme_fc_ctrl_free(struct kref *ref)
 	if (ctrl->ctrl.opts)
 		nvmf_free_options(ctrl->ctrl.opts);
 	kfree(ctrl);
+	module_put(lport->ops->module);
 }
 
 static void
@@ -2907,10 +2910,22 @@ nvme_fc_reconnect_or_delete(struct nvme_fc_ctrl *ctrl, int status)
 static void
 __nvme_fc_terminate_io(struct nvme_fc_ctrl *ctrl)
 {
-	nvme_stop_keep_alive(&ctrl->ctrl);
+	/*
+	 * if state is connecting - the error occurred as part of a
+	 * reconnect attempt. The create_association error paths will
+	 * clean up any outstanding io.
+	 *
+	 * if it's a different state - ensure all pending io is
+	 * terminated. Given this can delay while waiting for the
+	 * aborted io to return, we recheck adapter state below
+	 * before changing state.
+	 */
+	if (ctrl->ctrl.state != NVME_CTRL_CONNECTING) {
+		nvme_stop_keep_alive(&ctrl->ctrl);
 
-	/* will block will waiting for io to terminate */
-	nvme_fc_delete_association(ctrl);
+		/* will block will waiting for io to terminate */
+		nvme_fc_delete_association(ctrl);
+	}
 
 	if (ctrl->ctrl.state != NVME_CTRL_CONNECTING &&
 	    !nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING))
@@ -3056,10 +3071,15 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
 		goto out_fail;
 	}
 
+	if (!try_module_get(lport->ops->module)) {
+		ret = -EUNATCH;
+		goto out_free_ctrl;
+	}
+
 	idx = ida_simple_get(&nvme_fc_ctrl_cnt, 0, 0, GFP_KERNEL);
 	if (idx < 0) {
 		ret = -ENOSPC;
-		goto out_free_ctrl;
+		goto out_mod_put;
 	}
 
 	ctrl->ctrl.opts = opts;
@@ -3212,6 +3232,8 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
 out_free_ida:
 	put_device(ctrl->dev);
 	ida_simple_remove(&nvme_fc_ctrl_cnt, ctrl->cnum);
+out_mod_put:
+	module_put(lport->ops->module);
 out_free_ctrl:
 	kfree(ctrl);
 out_fail:
drivers/nvme/host/pci.c +5 -9
index 869f462e6b6e..14d513087a14 100644
@@ -68,14 +68,14 @@ static int io_queue_depth = 1024;
 module_param_cb(io_queue_depth, &io_queue_depth_ops, &io_queue_depth, 0644);
 MODULE_PARM_DESC(io_queue_depth, "set io queue depth, should >= 2");
 
-static int write_queues;
-module_param(write_queues, int, 0644);
+static unsigned int write_queues;
+module_param(write_queues, uint, 0644);
 MODULE_PARM_DESC(write_queues,
 	"Number of queues to use for writes. If not set, reads and writes "
 	"will share a queue set.");
 
-static int poll_queues;
-module_param(poll_queues, int, 0644);
+static unsigned int poll_queues;
+module_param(poll_queues, uint, 0644);
 MODULE_PARM_DESC(poll_queues, "Number of queues to use for polled IO.");
 
 struct nvme_dev;
@@ -2060,7 +2060,6 @@ static int nvme_setup_irqs(struct nvme_dev *dev, unsigned int nr_io_queues)
 		.priv		= dev,
 	};
 	unsigned int irq_queues, this_p_queues;
-	unsigned int nr_cpus = num_possible_cpus();
 
 	/*
 	 * Poll queues don't need interrupts, but we need at least one IO
@@ -2071,10 +2070,7 @@ static int nvme_setup_irqs(struct nvme_dev *dev, unsigned int nr_io_queues)
 		this_p_queues = nr_io_queues - 1;
 		irq_queues = 1;
 	} else {
-		if (nr_cpus < nr_io_queues - this_p_queues)
-			irq_queues = nr_cpus + 1;
-		else
-			irq_queues = nr_io_queues - this_p_queues + 1;
+		irq_queues = nr_io_queues - this_p_queues + 1;
 	}
 	dev->io_queues[HCTX_TYPE_POLL] = this_p_queues;
 
drivers/nvme/target/fcloop.c +1 -0
index b50b53db3746..1c50af6219f3 100644
@@ -850,6 +850,7 @@ fcloop_targetport_delete(struct nvmet_fc_target_port *targetport)
 #define FCLOOP_DMABOUND_4G		0xFFFFFFFF
 
 static struct nvme_fc_port_template fctemplate = {
+	.module			= THIS_MODULE,
 	.localport_delete	= fcloop_localport_delete,
 	.remoteport_delete	= fcloop_remoteport_delete,
 	.create_queue		= fcloop_create_queue,
drivers/of/overlay.c +20 -17
index c423e94baf0f..9617b7df7c4d 100644
@@ -305,7 +305,6 @@ static int add_changeset_property(struct overlay_changeset *ovcs,
 {
 	struct property *new_prop = NULL, *prop;
 	int ret = 0;
-	bool check_for_non_overlay_node = false;
 
 	if (target->in_livetree)
 		if (!of_prop_cmp(overlay_prop->name, "name") ||
@@ -318,6 +317,25 @@ static int add_changeset_property(struct overlay_changeset *ovcs,
 	else
 		prop = NULL;
 
+	if (prop) {
+		if (!of_prop_cmp(prop->name, "#address-cells")) {
+			if (!of_prop_val_eq(prop, overlay_prop)) {
+				pr_err("ERROR: changing value of #address-cells is not allowed in %pOF\n",
+				       target->np);
+				ret = -EINVAL;
+			}
+			return ret;
+
+		} else if (!of_prop_cmp(prop->name, "#size-cells")) {
+			if (!of_prop_val_eq(prop, overlay_prop)) {
+				pr_err("ERROR: changing value of #size-cells is not allowed in %pOF\n",
+				       target->np);
+				ret = -EINVAL;
+			}
+			return ret;
+		}
+	}
+
 	if (is_symbols_prop) {
 		if (prop)
 			return -EINVAL;
@@ -330,33 +348,18 @@ static int add_changeset_property(struct overlay_changeset *ovcs,
 		return -ENOMEM;
 
 	if (!prop) {
-		check_for_non_overlay_node = true;
 		if (!target->in_livetree) {
 			new_prop->next = target->np->deadprops;
 			target->np->deadprops = new_prop;
 		}
 		ret = of_changeset_add_property(&ovcs->cset, target->np,
 						new_prop);
-	} else if (!of_prop_cmp(prop->name, "#address-cells")) {
-		if (!of_prop_val_eq(prop, new_prop)) {
-			pr_err("ERROR: changing value of #address-cells is not allowed in %pOF\n",
-			       target->np);
-			ret = -EINVAL;
-		}
-	} else if (!of_prop_cmp(prop->name, "#size-cells")) {
-		if (!of_prop_val_eq(prop, new_prop)) {
-			pr_err("ERROR: changing value of #size-cells is not allowed in %pOF\n",
-			       target->np);
-			ret = -EINVAL;
-		}
 	} else {
-		check_for_non_overlay_node = true;
 		ret = of_changeset_update_property(&ovcs->cset, target->np,
 						   new_prop);
 	}
 
-	if (check_for_non_overlay_node &&
-	    !of_node_check_flag(target->np, OF_OVERLAY))
+	if (!of_node_check_flag(target->np, OF_OVERLAY))
 		pr_err("WARNING: memory leak will occur if overlay removed, property: %pOF/%s\n",
 		       target->np, new_prop->name);
 
drivers/pci/pci.c +18 -0
index a97e2571a527..fcfaadc774ee 100644
@@ -5854,6 +5854,24 @@ int pci_set_vga_state(struct pci_dev *dev, bool decode,
 	return 0;
 }
 
+#ifdef CONFIG_ACPI
+bool pci_pr3_present(struct pci_dev *pdev)
+{
+	struct acpi_device *adev;
+
+	if (acpi_disabled)
+		return false;
+
+	adev = ACPI_COMPANION(&pdev->dev);
+	if (!adev)
+		return false;
+
+	return adev->power.flags.power_resources &&
+		acpi_has_method(adev->handle, "_PR3");
+}
+EXPORT_SYMBOL_GPL(pci_pr3_present);
+#endif
+
 /**
  * pci_add_dma_alias - Add a DMA devfn alias for a device
  * @dev: the PCI device for which alias is added
drivers/phy/renesas/phy-rcar-gen3-usb2.c +1 -1
index 6fd1390fd06e..bfb22f868857 100644
@@ -615,7 +615,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
 		return PTR_ERR(channel->base);
 
 	/* call request_irq for OTG */
-	irq = platform_get_irq(pdev, 0);
+	irq = platform_get_irq_optional(pdev, 0);
 	if (irq >= 0) {
 		INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
 		irq = devm_request_irq(dev, irq, rcar_gen3_phy_usb2_irq,
drivers/platform/x86/pmc_atom.c +8 -0
index 07d1b911e72f..52ef1419b671 100644
@@ -429,6 +429,14 @@ static const struct dmi_system_id critclk_systems[] = {
 			DMI_MATCH(DMI_PRODUCT_VERSION, "6AV7882-0"),
 		},
 	},
+	{
+		.ident = "CONNECT X300",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "SIEMENS AG"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "A5E45074588"),
+		},
+	},
+
 	{ /*sentinel*/ }
 };
 
drivers/regulator/ab8500.c +0 -17
index efb2f01a9101..f60e1b26c2d2 100644
@@ -953,23 +953,6 @@ static struct ab8500_regulator_info
 		.update_val_idle	= 0x82,
 		.update_val_normal	= 0x02,
 	},
-	[AB8505_LDO_USB] = {
-		.desc = {
-			.name           = "LDO-USB",
-			.ops            = &ab8500_regulator_mode_ops,
-			.type           = REGULATOR_VOLTAGE,
-			.id             = AB8505_LDO_USB,
-			.owner          = THIS_MODULE,
-			.n_voltages     = 1,
-			.volt_table	= fixed_3300000_voltage,
-		},
-		.update_bank            = 0x03,
-		.update_reg             = 0x82,
-		.update_mask            = 0x03,
-		.update_val		= 0x01,
-		.update_val_idle	= 0x03,
-		.update_val_normal	= 0x01,
-	},
 	[AB8505_LDO_AUDIO] = {
 		.desc = {
 			.name		= "LDO-AUDIO",
drivers/regulator/axp20x-regulator.c +7 -4
index 989506bd90b1..16f0c8570036 100644
@@ -413,10 +413,13 @@ static int axp20x_set_ramp_delay(struct regulator_dev *rdev, int ramp)
 		int i;
 
 		for (i = 0; i < rate_count; i++) {
-			if (ramp <= slew_rates[i])
-				cfg = AXP20X_DCDC2_LDO3_V_RAMP_LDO3_RATE(i);
-			else
+			if (ramp > slew_rates[i])
 				break;
+
+			if (id == AXP20X_DCDC2)
+				cfg = AXP20X_DCDC2_LDO3_V_RAMP_DCDC2_RATE(i);
+			else
+				cfg = AXP20X_DCDC2_LDO3_V_RAMP_LDO3_RATE(i);
 		}
 
 		if (cfg == 0xff) {
@@ -605,7 +608,7 @@ static const struct regulator_desc axp22x_regulators[] = {
 		 AXP22X_PWR_OUT_CTRL2, AXP22X_PWR_OUT_ELDO1_MASK),
 	AXP_DESC(AXP22X, ELDO2, "eldo2", "eldoin", 700, 3300, 100,
 		 AXP22X_ELDO2_V_OUT, AXP22X_ELDO2_V_OUT_MASK,
-		 AXP22X_PWR_OUT_CTRL2, AXP22X_PWR_OUT_ELDO1_MASK),
+		 AXP22X_PWR_OUT_CTRL2, AXP22X_PWR_OUT_ELDO2_MASK),
 	AXP_DESC(AXP22X, ELDO3, "eldo3", "eldoin", 700, 3300, 100,
 		 AXP22X_ELDO3_V_OUT, AXP22X_ELDO3_V_OUT_MASK,
 		 AXP22X_PWR_OUT_CTRL2, AXP22X_PWR_OUT_ELDO3_MASK),
drivers/regulator/bd70528-regulator.c +0 -1
index 0248a61f1006..6041839ec38c 100644
@@ -101,7 +101,6 @@ static const struct regulator_ops bd70528_ldo_ops = {
 	.set_voltage_sel = regulator_set_voltage_sel_regmap,
 	.get_voltage_sel = regulator_get_voltage_sel_regmap,
 	.set_voltage_time_sel = regulator_set_voltage_time_sel,
-	.set_ramp_delay = bd70528_set_ramp_delay,
 };
 
 static const struct regulator_ops bd70528_led_ops = {
drivers/scsi/libsas/sas_discover.c +10 -1
index f47b4b281b14..d7302c2052f9 100644
@@ -81,12 +81,21 @@ static int sas_get_port_device(struct asd_sas_port *port)
 		else
 			dev->dev_type = SAS_SATA_DEV;
 		dev->tproto = SAS_PROTOCOL_SATA;
-	} else {
+	} else if (port->oob_mode == SAS_OOB_MODE) {
 		struct sas_identify_frame *id =
 			(struct sas_identify_frame *) dev->frame_rcvd;
 		dev->dev_type = id->dev_type;
 		dev->iproto = id->initiator_bits;
 		dev->tproto = id->target_bits;
+	} else {
+		/* If the oob mode is OOB_NOT_CONNECTED, the port is
+		 * disconnected due to race with PHY down. We cannot
+		 * continue to discover this port
+		 */
+		sas_put_device(dev);
+		pr_warn("Port %016llx is disconnected when discovering\n",
+			SAS_ADDR(port->attached_sas_addr));
+		return -ENODEV;
 	}
 
 	sas_init_dev(dev);
drivers/scsi/lpfc/lpfc_bsg.c +9 -6
index 39a736b887b1..6c2b03415a2c 100644
@@ -4489,12 +4489,6 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job,
 	phba->mbox_ext_buf_ctx.seqNum++;
 	nemb_tp = phba->mbox_ext_buf_ctx.nembType;
 
-	dd_data = kmalloc(sizeof(struct bsg_job_data), GFP_KERNEL);
-	if (!dd_data) {
-		rc = -ENOMEM;
-		goto job_error;
-	}
-
 	pbuf = (uint8_t *)dmabuf->virt;
 	size = job->request_payload.payload_len;
 	sg_copy_to_buffer(job->request_payload.sg_list,
@@ -4531,6 +4525,13 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job,
 				"2968 SLI_CONFIG ext-buffer wr all %d "
 				"ebuffers received\n",
 				phba->mbox_ext_buf_ctx.numBuf);
+
+		dd_data = kmalloc(sizeof(struct bsg_job_data), GFP_KERNEL);
+		if (!dd_data) {
+			rc = -ENOMEM;
+			goto job_error;
+		}
+
 		/* mailbox command structure for base driver */
 		pmboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
 		if (!pmboxq) {
@@ -4579,6 +4580,8 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job,
 	return SLI_CONFIG_HANDLED;
 
 job_error:
+	if (pmboxq)
+		mempool_free(pmboxq, phba->mbox_mem_pool);
 	lpfc_bsg_dma_page_free(phba, dmabuf);
 	kfree(dd_data);
 
drivers/scsi/lpfc/lpfc_hbadisc.c +59 -29

112 lines not on this page · raw message

drivers/scsi/lpfc/lpfc_nvme.c +2 -0
index a227e36cbdc2..8e0f03ef346b 100644
@@ -1976,6 +1976,8 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport,
 
 /* Declare and initialization an instance of the FC NVME template. */
 static struct nvme_fc_port_template lpfc_nvme_template = {
+	.module	= THIS_MODULE,
+
 	/* initiator-based functions */
 	.localport_delete  = lpfc_nvme_localport_delete,
 	.remoteport_delete = lpfc_nvme_remoteport_delete,
drivers/scsi/lpfc/lpfc_sli.c +2 -0
index 2b0e7b32c2df..8860f41af3ff 100644
@@ -2526,6 +2526,8 @@ lpfc_sli_def_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
 			} else {
 				__lpfc_sli_rpi_release(vport, ndlp);
 			}
+			if (vport->load_flag & FC_UNLOADING)
+				lpfc_nlp_put(ndlp);
 			pmb->ctx_ndlp = NULL;
 		}
 	}
drivers/scsi/qla2xxx/qla_def.h +1 -0
index d5386edddaf6..1eb3fe281cc3 100644
@@ -2401,6 +2401,7 @@ typedef struct fc_port {
 	unsigned int id_changed:1;
 	unsigned int scan_needed:1;
 	unsigned int n2n_flag:1;
+	unsigned int explicit_logout:1;
 
 	struct completion nvme_del_done;
 	uint32_t nvme_prli_service_param;
drivers/scsi/qla2xxx/qla_init.c +2 -9
index 5d31e3d52b6b..80f276d67c14 100644
@@ -4927,14 +4927,8 @@ qla2x00_configure_loop(scsi_qla_host_t *vha)
 		set_bit(RSCN_UPDATE, &flags);
 		clear_bit(LOCAL_LOOP_UPDATE, &flags);
 
-	} else if (ha->current_topology == ISP_CFG_N) {
-		clear_bit(RSCN_UPDATE, &flags);
-		if (qla_tgt_mode_enabled(vha)) {
-			/* allow the other side to start the login */
-			clear_bit(LOCAL_LOOP_UPDATE, &flags);
-			set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
-		}
-	} else if (ha->current_topology == ISP_CFG_NL) {
+	} else if (ha->current_topology == ISP_CFG_NL ||
+		   ha->current_topology == ISP_CFG_N) {
 		clear_bit(RSCN_UPDATE, &flags);
 		set_bit(LOCAL_LOOP_UPDATE, &flags);
 	} else if (!vha->flags.online ||
@@ -5051,7 +5045,6 @@ qla2x00_configure_local_loop(scsi_qla_host_t *vha)
 				memcpy(&ha->plogi_els_payld.data,
 				    (void *)ha->init_cb,
 				    sizeof(ha->plogi_els_payld.data));
-				set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
 			} else {
 				ql_dbg(ql_dbg_init, vha, 0x00d1,
 				    "PLOGI ELS param read fail.\n");
drivers/scsi/qla2xxx/qla_iocb.c +16 -6
index 518eb954cf42..bdf1994251b9 100644
@@ -2405,11 +2405,19 @@ qla2x00_login_iocb(srb_t *sp, struct mbx_entry *mbx)
 static void
 qla24xx_logout_iocb(srb_t *sp, struct logio_entry_24xx *logio)
 {
+	u16 control_flags = LCF_COMMAND_LOGO;
 	logio->entry_type = LOGINOUT_PORT_IOCB_TYPE;
-	logio->control_flags =
-	    cpu_to_le16(LCF_COMMAND_LOGO|LCF_IMPL_LOGO);
-	if (!sp->fcport->keep_nport_handle)
-		logio->control_flags |= cpu_to_le16(LCF_FREE_NPORT);
+
+	if (sp->fcport->explicit_logout) {
+		control_flags |= LCF_EXPL_LOGO|LCF_FREE_NPORT;
+	} else {
+		control_flags |= LCF_IMPL_LOGO;
+
+		if (!sp->fcport->keep_nport_handle)
+			control_flags |= LCF_FREE_NPORT;
+	}
+
+	logio->control_flags = cpu_to_le16(control_flags);
 	logio->nport_handle = cpu_to_le16(sp->fcport->loop_id);
 	logio->port_id[0] = sp->fcport->d_id.b.al_pa;
 	logio->port_id[1] = sp->fcport->d_id.b.area;
@@ -2676,7 +2684,8 @@ qla24xx_els_logo_iocb(srb_t *sp, struct els_entry_24xx *els_iocb)
 		ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3073,
 		    "PLOGI ELS IOCB:\n");
 		ql_dump_buffer(ql_log_info, vha, 0x0109,
-		    (uint8_t *)els_iocb, 0x70);
+		    (uint8_t *)els_iocb,
+		    sizeof(*els_iocb));
 	} else {
 		els_iocb->control_flags = 1 << 13;
 		els_iocb->tx_byte_count =
@@ -2842,7 +2851,8 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *vha, int els_opcode,
 
 	ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x3073, "PLOGI buffer:\n");
 	ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x0109,
-	    (uint8_t *)elsio->u.els_plogi.els_plogi_pyld, 0x70);
+	    (uint8_t *)elsio->u.els_plogi.els_plogi_pyld,
+	    sizeof(*elsio->u.els_plogi.els_plogi_pyld));
 
 	rval = qla2x00_start_sp(sp);
 	if (rval != QLA_SUCCESS) {
drivers/scsi/qla2xxx/qla_isr.c +0 -4
index 9204e8467a4e..b3766b1879e3 100644
@@ -1061,8 +1061,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
 			ql_dbg(ql_dbg_async, vha, 0x5011,
 			    "Asynchronous PORT UPDATE ignored %04x/%04x/%04x.\n",
 			    mb[1], mb[2], mb[3]);
-
-			qlt_async_event(mb[0], vha, mb);
 			break;
 		}
 
@@ -1079,8 +1077,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
 		set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
 		set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
 		set_bit(VP_CONFIG_OK, &vha->vp_flags);
-
-		qlt_async_event(mb[0], vha, mb);
 		break;
 
 	case MBA_RSCN_UPDATE:		/* State Change Registration */
drivers/scsi/qla2xxx/qla_mbx.c +2 -1
index 4d90cf101f5f..eac76e934cbe 100644
@@ -3920,6 +3920,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
 					vha->d_id.b24 = 0;
 					vha->d_id.b.al_pa = 1;
 					ha->flags.n2n_bigger = 1;
+					ha->flags.n2n_ae = 0;
 
 					id.b.al_pa = 2;
 					ql_dbg(ql_dbg_async, vha, 0x5075,
@@ -3930,6 +3931,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
 					    "Format 1: Remote login - Waiting for WWPN %8phC.\n",
 					    rptid_entry->u.f1.port_name);
 					ha->flags.n2n_bigger = 0;
+					ha->flags.n2n_ae = 1;
 				}
 				qla24xx_post_newsess_work(vha, &id,
 				    rptid_entry->u.f1.port_name,
@@ -3941,7 +3943,6 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
 			/* if our portname is higher then initiate N2N login */
 
 			set_bit(N2N_LOGIN_NEEDED, &vha->dpc_flags);
-			ha->flags.n2n_ae = 1;
 			return;
 			break;
 		case TOPO_FL:
drivers/scsi/qla2xxx/qla_nvme.c +1 -0
index 941aa53363f5..bfcd02fdf2b8 100644
@@ -610,6 +610,7 @@ static void qla_nvme_remoteport_delete(struct nvme_fc_remote_port *rport)
 }
 
 static struct nvme_fc_port_template qla_nvme_fc_transport = {
+	.module	= THIS_MODULE,
 	.localport_delete = qla_nvme_localport_delete,
 	.remoteport_delete = qla_nvme_remoteport_delete,
 	.create_queue   = qla_nvme_alloc_queue,
drivers/scsi/qla2xxx/qla_target.c +2 -1
index a9bd0f513316..74a378a91b71 100644
@@ -1104,6 +1104,7 @@ void qlt_free_session_done(struct work_struct *work)
 		}
 	}
 
+	sess->explicit_logout = 0;
 	spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
 	sess->free_pending = 0;
 
@@ -1264,7 +1265,6 @@ void qlt_schedule_sess_for_deletion(struct fc_port *sess)
 	    "Scheduling sess %p for deletion %8phC\n",
 	    sess, sess->port_name);
 
-	INIT_WORK(&sess->del_work, qla24xx_delete_sess_fn);
 	WARN_ON(!queue_work(sess->vha->hw->wq, &sess->del_work));
 }
 
@@ -4803,6 +4803,7 @@ static int qlt_handle_login(struct scsi_qla_host *vha,
 
 	switch (sess->disc_state) {
 	case DSC_DELETED:
+	case DSC_LOGIN_PEND:
 		qlt_plogi_ack_unref(vha, pla);
 		break;
 
drivers/scsi/qla2xxx/tcm_qla2xxx.c +1 -0
index bab2073c1f72..abe7f79bb789 100644
@@ -350,6 +350,7 @@ static void tcm_qla2xxx_close_session(struct se_session *se_sess)
 	target_sess_cmd_list_set_waiting(se_sess);
 	spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
 
+	sess->explicit_logout = 1;
 	tcm_qla2xxx_put_sess(sess);
 }
 
drivers/scsi/qla4xxx/ql4_os.c +0 -1
index 8c674eca09f1..2323432a0edb 100644
@@ -4275,7 +4275,6 @@ static int qla4xxx_mem_alloc(struct scsi_qla_host *ha)
 	return QLA_SUCCESS;
 
 mem_alloc_error_exit:
-	qla4xxx_mem_free(ha);
 	return QLA_ERROR;
 }
 
drivers/scsi/scsi_transport_iscsi.c +7 -0
index 417b868d8735..ed8d9709b9b9 100644
@@ -24,6 +24,8 @@
 
 #define ISCSI_TRANSPORT_VERSION "2.0-870"
 
+#define ISCSI_SEND_MAX_ALLOWED  10
+
 #define CREATE_TRACE_POINTS
 #include <trace/events/iscsi.h>
 
@@ -3682,6 +3684,7 @@ iscsi_if_rx(struct sk_buff *skb)
 		struct nlmsghdr	*nlh;
 		struct iscsi_uevent *ev;
 		uint32_t group;
+		int retries = ISCSI_SEND_MAX_ALLOWED;
 
 		nlh = nlmsg_hdr(skb);
 		if (nlh->nlmsg_len < sizeof(*nlh) + sizeof(*ev) ||
@@ -3712,6 +3715,10 @@ iscsi_if_rx(struct sk_buff *skb)
 				break;
 			err = iscsi_if_send_reply(portid, nlh->nlmsg_type,
 						  ev, sizeof(*ev));
+			if (err == -EAGAIN && --retries < 0) {
+				printk(KERN_WARNING "Send reply failed, error %d\n", err);
+				break;
+			}
 		} while (err < 0 && err != -ECONNREFUSED && err != -ESRCH);
 		skb_pull(skb, rlen);
 	}
drivers/spi/spi-fsl-dspi.c +4 -11
index bec758e978fb..d47bd26577b3 100644
@@ -583,21 +583,14 @@ static void dspi_tcfq_write(struct fsl_dspi *dspi)
 	dspi->tx_cmd |= SPI_PUSHR_CMD_CTCNT;
 
 	if (dspi->devtype_data->xspi_mode && dspi->bits_per_word > 16) {
-		/* Write two TX FIFO entries first, and then the corresponding
-		 * CMD FIFO entry.
+		/* Write the CMD FIFO entry first, and then the two
+		 * corresponding TX FIFO entries.
 		 */
 		u32 data = dspi_pop_tx(dspi);
 
-		if (dspi->cur_chip->ctar_val & SPI_CTAR_LSBFE) {
-			/* LSB */
-			tx_fifo_write(dspi, data & 0xFFFF);
-			tx_fifo_write(dspi, data >> 16);
-		} else {
-			/* MSB */
-			tx_fifo_write(dspi, data >> 16);
-			tx_fifo_write(dspi, data & 0xFFFF);
-		}
 		cmd_fifo_write(dspi);
+		tx_fifo_write(dspi, data & 0xFFFF);
+		tx_fifo_write(dspi, data >> 16);
 	} else {
 		/* Write one entry to both TX FIFO and CMD FIFO
 		 * simultaneously.
drivers/spi/spi-uniphier.c +19 -12
index 47cde1864630..ce9b30112e26 100644
@@ -290,25 +290,32 @@ static void uniphier_spi_recv(struct uniphier_spi_priv *priv)
 	}
 }
 
-static void uniphier_spi_fill_tx_fifo(struct uniphier_spi_priv *priv)
+static void uniphier_spi_set_fifo_threshold(struct uniphier_spi_priv *priv,
+					    unsigned int threshold)
 {
-	unsigned int fifo_threshold, fill_bytes;
 	u32 val;
 
-	fifo_threshold = DIV_ROUND_UP(priv->rx_bytes,
-				bytes_per_word(priv->bits_per_word));
-	fifo_threshold = min(fifo_threshold, SSI_FIFO_DEPTH);
-
-	fill_bytes = fifo_threshold - (priv->rx_bytes - priv->tx_bytes);
-
-	/* set fifo threshold */
 	val = readl(priv->base + SSI_FC);
 	val &= ~(SSI_FC_TXFTH_MASK | SSI_FC_RXFTH_MASK);
-	val |= FIELD_PREP(SSI_FC_TXFTH_MASK, fifo_threshold);
-	val |= FIELD_PREP(SSI_FC_RXFTH_MASK, fifo_threshold);
+	val |= FIELD_PREP(SSI_FC_TXFTH_MASK, SSI_FIFO_DEPTH - threshold);
+	val |= FIELD_PREP(SSI_FC_RXFTH_MASK, threshold);
 	writel(val, priv->base + SSI_FC);
+}
+
+static void uniphier_spi_fill_tx_fifo(struct uniphier_spi_priv *priv)
+{
+	unsigned int fifo_threshold, fill_words;
+	unsigned int bpw = bytes_per_word(priv->bits_per_word);
+
+	fifo_threshold = DIV_ROUND_UP(priv->rx_bytes, bpw);
+	fifo_threshold = min(fifo_threshold, SSI_FIFO_DEPTH);
+
+	uniphier_spi_set_fifo_threshold(priv, fifo_threshold);
+
+	fill_words = fifo_threshold -
+		DIV_ROUND_UP(priv->rx_bytes - priv->tx_bytes, bpw);
 
-	while (fill_bytes--)
+	while (fill_words--)
 		uniphier_spi_send(priv);
 }
 
drivers/staging/wlan-ng/Kconfig +1 -0
index ac136663fa8e..082c16a31616 100644
@@ -4,6 +4,7 @@ config PRISM2_USB
 	depends on WLAN && USB && CFG80211
 	select WIRELESS_EXT
 	select WEXT_PRIV
+	select CRC32
 	help
 	  This is the wlan-ng prism 2.5/3 USB driver for a wide range of
 	  old USB wireless devices.
drivers/tty/serial/msm_serial.c +11 -2
index 00964b6e4ac1..e0718ee5d42a 100644
@@ -1580,6 +1580,7 @@ static void __msm_console_write(struct uart_port *port, const char *s,
 	int num_newlines = 0;
 	bool replaced = false;
 	void __iomem *tf;
+	int locked = 1;
 
 	if (is_uartdm)
 		tf = port->membase + UARTDM_TF;
@@ -1592,7 +1593,13 @@ static void __msm_console_write(struct uart_port *port, const char *s,
 			num_newlines++;
 	count += num_newlines;
 
-	spin_lock(&port->lock);
+	if (port->sysrq)
+		locked = 0;
+	else if (oops_in_progress)
+		locked = spin_trylock(&port->lock);
+	else
+		spin_lock(&port->lock);
+
 	if (is_uartdm)
 		msm_reset_dm_count(port, count);
 
@@ -1628,7 +1635,9 @@ static void __msm_console_write(struct uart_port *port, const char *s,
 		iowrite32_rep(tf, buf, 1);
 		i += num_chars;
 	}
-	spin_unlock(&port->lock);
+
+	if (locked)
+		spin_unlock(&port->lock);
 }
 
 static void msm_console_write(struct console *co, const char *s,
drivers/usb/gadget/function/f_ecm.c +5 -1
index 6ce044008cf6..460d5d7c984f 100644
@@ -621,8 +621,12 @@ static void ecm_disable(struct usb_function *f)
 
 	DBG(cdev, "ecm deactivated\n");
 
-	if (ecm->port.in_ep->enabled)
+	if (ecm->port.in_ep->enabled) {
 		gether_disconnect(&ecm->port);
+	} else {
+		ecm->port.in_ep->desc = NULL;
+		ecm->port.out_ep->desc = NULL;
+	}
 
 	usb_ep_disable(ecm->notify);
 	ecm->notify->desc = NULL;
drivers/usb/gadget/function/f_rndis.c +1 -0
index d48df36622b7..0d8e4a364ca6 100644
@@ -618,6 +618,7 @@ static void rndis_disable(struct usb_function *f)
 	gether_disconnect(&rndis->port);
 
 	usb_ep_disable(rndis->notify);
+	rndis->notify->desc = NULL;
 }
 
 /*-------------------------------------------------------------------------*/
drivers/watchdog/Kconfig +1 -0
index 58e7c100b6ad..4c761abc5688 100644
@@ -1444,6 +1444,7 @@ config SMSC37B787_WDT
 config TQMX86_WDT
 	tristate "TQ-Systems TQMX86 Watchdog Timer"
 	depends on X86
+	select WATCHDOG_CORE
 	help
 	This is the driver for the hardware watchdog timer in the TQMX86 IO
 	controller found on some of their ComExpress Modules.
drivers/xen/balloon.c +2 -1
index 5bae515c8e25..bed90d612e48 100644
@@ -395,7 +395,8 @@ static struct notifier_block xen_memory_nb = {
 #else
 static enum bp_state reserve_additional_memory(void)
 {
-	balloon_stats.target_pages = balloon_stats.current_pages;
+	balloon_stats.target_pages = balloon_stats.current_pages +
+				     balloon_stats.target_unpopulated;
 	return BP_ECANCELED;
 }
 #endif /* CONFIG_XEN_BALLOON_MEMORY_HOTPLUG */
fs/afs/dynroot.c +3 -0
index 4150280509ff..7503899c0a1b 100644
@@ -136,6 +136,9 @@ static struct dentry *afs_dynroot_lookup(struct inode *dir, struct dentry *dentr
 
 	ASSERTCMP(d_inode(dentry), ==, NULL);
 
+	if (flags & LOOKUP_CREATE)
+		return ERR_PTR(-EOPNOTSUPP);
+
 	if (dentry->d_name.len >= AFSNAMEMAX) {
 		_leave(" = -ENAMETOOLONG");
 		return ERR_PTR(-ENAMETOOLONG);
fs/afs/mntpt.c +4 -2
index f532d6d3bd28..79bc5f1338ed 100644
@@ -126,7 +126,7 @@ static int afs_mntpt_set_params(struct fs_context *fc, struct dentry *mntpt)
 		if (src_as->cell)
 			ctx->cell = afs_get_cell(src_as->cell);
 
-		if (size > PAGE_SIZE - 1)
+		if (size < 2 || size > PAGE_SIZE - 1)
 			return -EINVAL;
 
 		page = read_mapping_page(d_inode(mntpt)->i_mapping, 0, NULL);
@@ -140,7 +140,9 @@ static int afs_mntpt_set_params(struct fs_context *fc, struct dentry *mntpt)
 		}
 
 		buf = kmap(page);
-		ret = vfs_parse_fs_string(fc, "source", buf, size);
+		ret = -EINVAL;
+		if (buf[size - 1] == '.')
+			ret = vfs_parse_fs_string(fc, "source", buf, size - 1);
 		kunmap(page);
 		put_page(page);
 		if (ret < 0)
fs/afs/server.c +8 -13
index 64d440aaabc0..ca8115ba1724 100644
@@ -32,18 +32,11 @@ static void afs_dec_servers_outstanding(struct afs_net *net)
 struct afs_server *afs_find_server(struct afs_net *net,
 				   const struct sockaddr_rxrpc *srx)
 {
-	const struct sockaddr_in6 *a = &srx->transport.sin6, *b;
 	const struct afs_addr_list *alist;
 	struct afs_server *server = NULL;
 	unsigned int i;
-	bool ipv6 = true;
 	int seq = 0, diff;
 
-	if (srx->transport.sin6.sin6_addr.s6_addr32[0] == 0 ||
-	    srx->transport.sin6.sin6_addr.s6_addr32[1] == 0 ||
-	    srx->transport.sin6.sin6_addr.s6_addr32[2] == htonl(0xffff))
-		ipv6 = false;
-
 	rcu_read_lock();
 
 	do {
@@ -52,7 +45,8 @@ struct afs_server *afs_find_server(struct afs_net *net,
 		server = NULL;
 		read_seqbegin_or_lock(&net->fs_addr_lock, &seq);
 
-		if (ipv6) {
+		if (srx->transport.family == AF_INET6) {
+			const struct sockaddr_in6 *a = &srx->transport.sin6, *b;
 			hlist_for_each_entry_rcu(server, &net->fs_addresses6, addr6_link) {
 				alist = rcu_dereference(server->addresses);
 				for (i = alist->nr_ipv4; i < alist->nr_addrs; i++) {
@@ -68,15 +62,16 @@ struct afs_server *afs_find_server(struct afs_net *net,
 				}
 			}
 		} else {
+			const struct sockaddr_in *a = &srx->transport.sin, *b;
 			hlist_for_each_entry_rcu(server, &net->fs_addresses4, addr4_link) {
 				alist = rcu_dereference(server->addresses);
 				for (i = 0; i < alist->nr_ipv4; i++) {
-					b = &alist->addrs[i].transport.sin6;
-					diff = ((u16 __force)a->sin6_port -
-						(u16 __force)b->sin6_port);
+					b = &alist->addrs[i].transport.sin;
+					diff = ((u16 __force)a->sin_port -
+						(u16 __force)b->sin_port);
 					if (diff == 0)
-						diff = ((u32 __force)a->sin6_addr.s6_addr32[3] -
-							(u32 __force)b->sin6_addr.s6_addr32[3]);
+						diff = ((u32 __force)a->sin_addr.s_addr -
+							(u32 __force)b->sin_addr.s_addr);
 					if (diff == 0)
 						goto found;
 				}
fs/afs/super.c +0 -1
index 488641b1a418..d9a6036b70b9 100644
@@ -448,7 +448,6 @@ static int afs_fill_super(struct super_block *sb, struct afs_fs_context *ctx)
 	/* allocate the root inode and dentry */
 	if (as->dyn_root) {
 		inode = afs_iget_pseudo_dir(sb, true);
-		sb->s_flags	|= SB_RDONLY;
 	} else {
 		sprintf(sb->s_id, "%llu", as->volume->vid);
 		afs_activate_volume(as->volume);
fs/btrfs/async-thread.c +13 -45

71 lines not on this page · raw message

fs/btrfs/async-thread.h +2 -31
index 7861c9feba5f..c5bf2b117c05 100644

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

fs/btrfs/block-group.c +1 -2
index 0d2da2366869..7dcfa7d7632a 100644

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

fs/btrfs/delayed-inode.c +2 -2
index 57a9ad3e8c29..c7a53e79c66d 100644

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

fs/btrfs/disk-io.c +11 -23
index 3895c21853cc..bae334212ee2 100644

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

fs/btrfs/extent_io.c +1 -1
index be9dc78aa727..33c6b191ca59 100644

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

fs/btrfs/inode.c +35 -32

67 lines not on this page · raw message

fs/btrfs/ordered-data.c +0 -1
index 24b6c72b9a59..6240a5a1f2c0 100644

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

fs/btrfs/qgroup.c +0 -1
index 3ad151655eb8..27a903aaf43b 100644

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

fs/btrfs/raid56.c +2 -3
index 57a2ac721985..8f47a85944eb 100644

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

fs/btrfs/reada.c +1 -2
index dd4f9c2b7107..1feaeadc8cf5 100644

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

fs/btrfs/scrub.c +6 -8
index a0770a6aee00..a7b043fd7a57 100644

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

fs/btrfs/volumes.c +1 -2
index e04409f85063..d8d7b1ee83ca 100644

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

fs/buffer.c +1 -24
index 86a38b979323..7744488f7bde 100644

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

fs/cifs/dfs_cache.c +1 -2
index 1692c0c6c23a..2faa05860a48 100644

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

fs/cifs/inode.c +1 -1
index df9377828e2f..ed59e4a8db59 100644

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

fs/cifs/smb2pdu.c +29 -12

41 lines not on this page · raw message

fs/compat_ioctl.c +2 -1
index a7ec2d3dff92..e0226b2138d6 100644

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

fs/io_uring.c +2 -2
index 74e786578c77..a60c6315a348 100644

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

fs/locks.c +1 -1
index 6970f55daf54..44b6da032842 100644

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

fs/nfsd/nfs4state.c +10 -5
index c65aeaa812d4..08f6eb2b73f8 100644

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

fs/ocfs2/dlmglue.c +1 -0
index 6e774c5ea13b..8a2e284ccfcd 100644

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

fs/pstore/ram.c +13 -0
index 8caff834f002..487ee39b438a 100644

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

fs/ubifs/tnc_commit.c +27 -7
index a384a0f9ff32..234be1c4dc87 100644

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

fs/xfs/libxfs/xfs_bmap.c +1 -1
index 02469d59c787..3f76da11197c 100644

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

fs/xfs/scrub/common.h +8 -1
index 003a772cd26c..2e50d146105d 100644

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

include/linux/ahci_platform.h +2 -0
index 6782f0d45ebe..49e5383d4222 100644

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

include/linux/bio.h +1 -0
index 3cdb84cdc488..853d92ceee64 100644

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

include/linux/dmaengine.h +4 -1
index 8fcdee1c0cf9..dad4a68fa009 100644

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

include/linux/libata.h +1 -0
index 207e7ee764ce..fa0c3dae2094 100644

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

include/linux/memory_hotplug.h +5 -2
index f46ea71b4ffd..451efd4499cc 100644

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

include/linux/nvme-fc-driver.h +4 -0
index 10f81629b9ce..6d0d70f3219c 100644

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

include/linux/pci.h +2 -0
index f9088c89a534..be529d311122 100644

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

include/linux/regulator/ab8500.h +0 -1
index 7cf8f797e13a..505e94a6e3e8 100644

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

include/net/neighbour.h +1 -1
index 5e679c8dae0b..8ec77bfdc1a4 100644

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

include/net/sch_generic.h +3 -3
index 47e61956168d..32e418dba133 100644

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

include/net/sock.h +2 -2
index e09e2886a836..6c5a3809483e 100644

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

kernel/bpf/verifier.c +22 -21

43 lines not on this page · raw message

kernel/cred.c +3 -3
index c0a4c12d38b2..9ed51b70ed80 100644

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

kernel/exit.c +8 -4
index d351fd09e739..22dfaac9e48c 100644

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

kernel/module.c +2 -0
index ff2d7359a418..cb09a5f37a5f 100644

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

kernel/power/snapshot.c +8 -1
index 83105874f255..26b9168321e7 100644

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

kernel/seccomp.c +7 -0
index dba52a7db5e8..614a557a0814 100644

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

kernel/taskstats.c +19 -11
index 13a0f2e6ebc2..e2ac0e37c4ae 100644

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

kernel/trace/ftrace.c +3 -3
index f296d89be757..0708a41cfe2d 100644

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

kernel/trace/trace.c +8 -0
index 2fa72419bbd7..d8bd9b1d8bce 100644

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

kernel/trace/trace_events.c +4 -4
index fba87d10f0c1..995061bb2dec 100644

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

kernel/trace/trace_events_filter.c +1 -1
index c9a74f82b14a..bf44f6bbd0c3 100644

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

kernel/trace/trace_events_hist.c +20 -1
index 7482a1466ebf..c2783915600c 100644

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

kernel/trace/tracing_map.c +2 -2
index 9a1c22310323..9e31bfc818ff 100644

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

lib/ubsan.c +23 -41

64 lines not on this page · raw message

mm/filemap.c +0 -21
index 85b7d087eb45..1f5731768222 100644

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

mm/gup_benchmark.c +6 -2
index 7dd602d7f8db..ad9d5b1c4473 100644

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

mm/hugetlb.c +50 -1

51 lines not on this page · raw message

mm/internal.h +21 -0
index 0d5f720c75ab..7dd7fbb577a9 100644

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

mm/memory.c +27 -11
index b1ca51a079f2..cb7c940cf800 100644

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

mm/memory_hotplug.c +16 -15
index f307bd82d750..fab540685279 100644

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

mm/memremap.c +1 -1
index 03ccbdfeb697..c51c6bd2fe34 100644

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

mm/migrate.c +17 -6
index 4fe45d1428c8..45d3303e0022 100644

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

mm/mmap.c +0 -6
index a7d8c84d19b7..4390dbea4aa5 100644

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

mm/oom_kill.c +1 -1
index 71e3acea7817..d58c481b3df8 100644

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

mm/shmem.c +6 -5
index 7a22e3e03d11..6074714fdbd4 100644

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

mm/sparse.c +2 -2
index f6891c1992b1..c2c01b6330af 100644

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

mm/zsmalloc.c +5 -0
index 2b2b9aae8a3c..22d17ecfe7df 100644

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

net/bluetooth/hci_conn.c +3 -1
index 7ff92dd4c53c..87691404d0c6 100644

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

net/bluetooth/l2cap_core.c +1 -3
index da7fdbdf9c41..a845786258a0 100644

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

net/core/dev.c +1 -1
index 046307445ece..3e11c6bb4dd6 100644

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

net/core/neighbour.c +2 -2
index 08ebc3ac5343..f2452496ad9f 100644

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

net/core/sock.c +1 -1
index ac78a570e43a..b4d1112174c1 100644

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

net/core/sysctl_net_core.c +2 -0
index eb29e5adc84d..9f9e00ba3ad7 100644

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

net/ethernet/eth.c +6 -1
index 17374afee28f..9040fe55e0f5 100644

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

net/hsr/hsr_debugfs.c +7 -9
index 94447974a3c0..6618a9d8e58e 100644

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

net/hsr/hsr_device.c +14 -12
index b01e1bae4ddc..62c03f0d0079 100644

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

net/hsr/hsr_framereg.c +46 -27

73 lines not on this page · raw message

net/hsr/hsr_framereg.h +2 -4
index 89a3ce38151d..0f0fa12b4329 100644

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

net/hsr/hsr_main.c +1 -1
index b9988a662ee1..6deb8fa8d5c8 100644

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

net/hsr/hsr_main.h +7 -9
index 96fac696a1e1..9ec38e33b8b1 100644

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

net/ipv4/tcp.c +6 -8
index d8876f0e9672..e537a4b6531b 100644

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

net/ipv4/tcp_bbr.c +2 -1
index 32772d6ded4e..a6545ef0d27b 100644

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

net/ipv4/tcp_output.c +2 -2
index 0269584e9cf7..e4ba915c4bb5 100644

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

net/netfilter/nf_queue.c +1 -1
index a2b58de82600..f8f52ff99cfb 100644

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

net/netfilter/nft_tproxy.c +2 -2
index f92a82c73880..95980154ef02 100644

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

net/sched/sch_generic.c +1 -1
index 8769b4b8807d..7c3c5fdb82a9 100644

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

net/socket.c +2 -2
index d7a106028f0e..ca8de9e1582d 100644

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

net/sunrpc/cache.c +0 -6
index a349094f6fb7..f740cb51802a 100644

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

samples/seccomp/user-trap.c +2 -2
index 6d0125ca8af7..20291ec6489f 100644

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

samples/trace_printk/trace-printk.c +1 -0
index 7affc3b50b61..cfc159580263 100644

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

scripts/gcc-plugins/Kconfig +4 -5
index d33de0b9f4f5..e3569543bdac 100644

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

security/apparmor/apparmorfs.c +1 -1
index 45d13b6462aa..90d21675c3ad 100644

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

security/apparmor/domain.c +43 -39

82 lines not on this page · raw message

security/apparmor/policy.c +2 -2
index ade333074c8e..06355717ee84 100644

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

sound/core/pcm_native.c +2 -1
index d4280568a41e..5c74ea2bb44b 100644

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

sound/firewire/motu/motu-proc.c +1 -1
index ea46fb4c1b5a..126a7bd187bb 100644

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

sound/isa/cs423x/cs4236.c +2 -1
index 78dd213589b4..fa3c39cff5f8 100644

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

sound/pci/hda/hda_controller.c +1 -1
index 6387c7e90918..76b507058cb4 100644

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

sound/pci/hda/hda_intel.c +12 -5
index 86a416cdeb29..f6cbb831b86a 100644

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

sound/pci/hda/patch_realtek.c +48 -13

61 lines not on this page · raw message

sound/pci/ice1712/ice1724.c +6 -3
index e62c11816683..f360b33a1042 100644

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

sound/usb/card.h +1 -0
index 2991b9986f66..395403a2d33f 100644

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

sound/usb/pcm.c +21 -4
index ff5ab24f3bd1..a04c727dcd19 100644

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

sound/usb/quirks-table.h +2 -1
index 70c338f3ae24..d187aa6d50db 100644

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

sound/usb/quirks.c +11 -0
index 349e1e52996d..a81c2066499f 100644

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

sound/usb/usbaudio.h +2 -1
index feb30f9c1716..e360680f45f3 100644

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

tools/perf/util/machine.c +1 -1
index 70a9f8716a4b..888814df758d 100644

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

tools/testing/selftests/rseq/param_test.c +10 -8
index eec2663261f2..e8a657a5f48a 100644

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

tools/testing/selftests/seccomp/seccomp_bpf.c +14 -1
index b505bb062d07..96bbda4f10fc 100644

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

usr/gen_initramfs_list.sh +1 -1
index 0aad760fcd8c..2bbac73e6477 100755

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.