Skip to contentSkip to conversation

Linux 4.18.8

DISCUSSION Greg KH 1 participant 2 messages Sep 15, 2018 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 4.18.8 kernel.

All users of the 4.18 kernel series must upgrade.

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

thanks,

greg k-h

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

 Makefile                                                    |    2 
 arch/arm/mach-rockchip/Kconfig                              |    1 
 arch/arm64/Kconfig.platforms                                |    1 
 arch/powerpc/include/asm/topology.h                         |    5 
 arch/powerpc/include/asm/uaccess.h                          |   13 -
 arch/powerpc/kernel/exceptions-64s.S                        |    6 
 arch/powerpc/kernel/smp.c                                   |    5 
 arch/powerpc/mm/numa.c                                      |   20 -
 arch/powerpc/platforms/85xx/t1042rdb_diu.c                  |    4 
 arch/powerpc/platforms/pseries/ras.c                        |    2 
 arch/powerpc/sysdev/mpic_msgr.c                             |    2 
 arch/riscv/kernel/vdso/Makefile                             |    4 
 arch/s390/kernel/crash_dump.c                               |   17 +
 arch/um/Makefile                                            |    3 
 arch/x86/include/asm/mce.h                                  |    1 
 arch/x86/include/asm/pgtable-3level.h                       |    7 
 arch/x86/kernel/tsc.c                                       |    4 
 arch/x86/kvm/mmu.c                                          |   43 +++
 arch/x86/kvm/vmx.c                                          |   26 +-
 arch/x86/kvm/x86.c                                          |   12 -
 arch/x86/xen/mmu_pv.c                                       |    7 
 block/bio.c                                                 |    2 
 block/blk-core.c                                            |    4 
 block/blk-mq-tag.c                                          |    3 
 block/blk-mq.c                                              |    8 
 block/cfq-iosched.c                                         |   22 +
 drivers/acpi/acpica/hwregs.c                                |    9 
 drivers/acpi/scan.c                                         |    5 
 drivers/clk/rockchip/clk-rk3399.c                           |    1 
 drivers/gpu/drm/amd/amdgpu/amdgpu.h                         |    6 
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c                      |    2 
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c                     |   23 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c                  |   38 ++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c                      |    2 
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c                     |    5 
 drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c                   |   21 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h                     |    2 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h                   |    4 
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c                     |   17 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c                |   20 -
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c                       |    2 
 drivers/gpu/drm/amd/amdgpu/psp_v10_0.c                      |    3 
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c                       |    3 
 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c                       |   40 ++-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c           |   10 
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c       |   10 
 drivers/gpu/drm/amd/display/dc/bios/command_table.c         |   18 +
 drivers/gpu/drm/amd/display/dc/core/dc_link.c               |   11 
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c           |   68 ++++--
 drivers/gpu/drm/amd/display/dc/dc.h                         |    1 
 drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c       |    4 
 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c     |    2 
 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c   |    2 
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c |    4 
 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c       |    3 
 drivers/gpu/drm/amd/display/dc/inc/resource.h               |    5 
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c        |   43 +++
 drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c            |    5 
 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c          |    2 
 drivers/gpu/drm/drm_edid.c                                  |    6 
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c                       |    1 
 drivers/gpu/drm/i915/i915_drv.c                             |   10 
 drivers/gpu/drm/i915/i915_drv.h                             |    8 
 drivers/gpu/drm/i915/i915_reg.h                             |    1 
 drivers/gpu/drm/i915/intel_ddi.c                            |    4 
 drivers/gpu/drm/i915/intel_dp.c                             |   33 +-
 drivers/gpu/drm/i915/intel_hdmi.c                           |    8 
 drivers/gpu/drm/i915/intel_lpe_audio.c                      |    4 
 drivers/gpu/drm/i915/intel_lspcon.c                         |    2 
 drivers/gpu/drm/i915/intel_lvds.c                           |  136 ------------
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c                 |   69 ++++--
 drivers/gpu/drm/rockchip/rockchip_lvds.c                    |    4 
 drivers/hid/hid-redragon.c                                  |   26 --
 drivers/i2c/i2c-core-acpi.c                                 |    8 
 drivers/infiniband/hw/hfi1/affinity.c                       |   24 +-
 drivers/infiniband/hw/hns/hns_roce_pd.c                     |    2 
 drivers/infiniband/hw/hns/hns_roce_qp.c                     |    5 
 drivers/input/input.c                                       |   16 +
 drivers/iommu/omap-iommu.c                                  |    4 
 drivers/iommu/rockchip-iommu.c                              |   45 ++-
 drivers/irqchip/irq-bcm7038-l1.c                            |    4 
 drivers/irqchip/irq-stm32-exti.c                            |   25 +-
 drivers/md/dm-kcopyd.c                                      |    2 
 drivers/mfd/sm501.c                                         |    1 
 drivers/mtd/ubi/vtbl.c                                      |   20 -
 drivers/net/ethernet/broadcom/bnxt/bnxt.c                   |    9 
 drivers/net/ethernet/broadcom/bnxt/bnxt.h                   |    3 
 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c             |    7 
 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c               |   20 -
 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h               |    1 
 drivers/net/ethernet/broadcom/genet/bcmgenet.h              |    3 
 drivers/net/ethernet/broadcom/genet/bcmmii.c                |   10 
 drivers/net/ethernet/cadence/macb_main.c                    |   36 ++-
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c     |    2 
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c     |    2 
 drivers/net/ethernet/mellanox/mlx5/core/wq.c                |    5 
 drivers/net/ethernet/mellanox/mlxsw/spectrum.h              |    2 
 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c       |   11 
 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c    |   20 +
 drivers/net/ethernet/netronome/nfp/nfp_net_common.c         |   48 ++--
 drivers/net/ethernet/qlogic/qlge/qlge_main.c                |   23 --
 drivers/net/ethernet/realtek/r8169.c                        |    7 
 drivers/net/ethernet/stmicro/stmmac/stmmac.h                |    1 
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c           |    5 
 drivers/net/hyperv/netvsc_drv.c                             |   16 +
 drivers/net/usb/r8152.c                                     |    4 
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c |    8 
 drivers/pci/controller/pci-mvebu.c                          |    2 
 drivers/pci/probe.c                                         |   12 -
 drivers/pinctrl/pinctrl-axp209.c                            |   26 +-
 drivers/platform/x86/asus-nb-wmi.c                          |    1 
 drivers/platform/x86/intel_punit_ipc.c                      |    1 
 drivers/pwm/pwm-meson.c                                     |    3 
 drivers/s390/block/dasd_eckd.c                              |   10 
 drivers/scsi/aic94xx/aic94xx_init.c                         |    4 
 drivers/staging/comedi/drivers/ni_mio_common.c              |    3 
 drivers/vhost/vhost.c                                       |    2 
 drivers/virtio/virtio_pci_legacy.c                          |   14 +
 drivers/xen/xen-balloon.c                                   |    2 
 fs/btrfs/check-integrity.c                                  |    7 
 fs/btrfs/dev-replace.c                                      |    6 
 fs/btrfs/extent-tree.c                                      |    2 
 fs/btrfs/relocation.c                                       |   23 +-
 fs/btrfs/super.c                                            |   44 ++-
 fs/btrfs/tree-checker.c                                     |   15 +
 fs/btrfs/volumes.c                                          |   94 +++++---
 fs/cifs/cifs_debug.c                                        |    8 
 fs/cifs/connect.c                                           |    8 
 fs/cifs/smb2misc.c                                          |    7 
 fs/cifs/smb2pdu.c                                           |  103 ++++-----
 fs/dcache.c                                                 |    3 
 fs/f2fs/data.c                                              |    8 
 fs/f2fs/file.c                                              |   48 ++--
 fs/fat/cache.c                                              |   19 +
 fs/fat/fat.h                                                |    5 
 fs/fat/fatent.c                                             |    6 
 fs/hfs/brec.c                                               |    7 
 fs/hfsplus/dir.c                                            |    4 
 fs/hfsplus/super.c                                          |    4 
 fs/nfs/nfs4proc.c                                           |    2 
 fs/proc/kcore.c                                             |    4 
 fs/proc/vmcore.c                                            |    2 
 fs/reiserfs/reiserfs.h                                      |    2 
 include/linux/pci_ids.h                                     |    2 
 include/net/tcp.h                                           |    4 
 include/uapi/linux/keyctl.h                                 |    2 
 kernel/bpf/inode.c                                          |    8 
 kernel/bpf/sockmap.c                                        |  120 ++++++----
 kernel/fork.c                                               |    5 
 kernel/workqueue.c                                          |   45 ++-
 lib/debugobjects.c                                          |    7 
 mm/Kconfig                                                  |    2 
 mm/fadvise.c                                                |    8 
 net/9p/trans_fd.c                                           |   10 
 net/9p/trans_virtio.c                                       |    3 
 net/core/xdp.c                                              |   14 -
 net/ipv4/ip_gre.c                                           |    3 
 net/ipv4/tcp_ipv4.c                                         |    6 
 net/ipv4/tcp_minisocks.c                                    |    3 
 net/ipv4/tcp_ulp.c                                          |    4 
 net/ipv6/ip6_fib.c                                          |    7 
 net/ipv6/ip6_gre.c                                          |    1 
 net/ipv6/ip6_vti.c                                          |    7 
 net/ipv6/netfilter/ip6t_rpfilter.c                          |   12 -
 net/ipv6/route.c                                            |    3 
 net/netfilter/ipvs/ip_vs_core.c                             |   15 -
 net/netfilter/nf_conntrack_netlink.c                        |   26 +-
 net/netfilter/nfnetlink_acct.c                              |   29 +-
 net/netfilter/x_tables.c                                    |    7 
 net/rds/ib_frmr.c                                           |    1 
 net/sched/act_ife.c                                         |   78 +++---
 net/sched/act_pedit.c                                       |   18 +
 net/sched/cls_u32.c                                         |   10 
 net/sctp/proc.c                                             |    8 
 net/sctp/socket.c                                           |   22 +
 net/sunrpc/auth_gss/gss_krb5_crypto.c                       |   12 -
 net/tipc/name_table.c                                       |   10 
 net/tipc/name_table.h                                       |    9 
 net/tipc/socket.c                                           |    2 
 net/tls/tls_main.c                                          |    1 
 samples/bpf/xdp_redirect_cpu_user.c                         |    3 
 samples/bpf/xdp_rxq_info_user.c                             |    3 
 scripts/coccicheck                                          |    5 
 scripts/depmod.sh                                           |    4 
 scripts/mod/modpost.c                                       |    8 
 security/apparmor/policy_ns.c                               |    2 
 security/keys/dh.c                                          |    2 
 security/selinux/selinuxfs.c                                |   33 ++
 sound/soc/codecs/rt5677.c                                   |    2 
 sound/soc/codecs/wm8994.c                                   |    1 
 tools/perf/arch/arm64/util/arm-spe.c                        |    1 
 tools/perf/arch/powerpc/util/sym-handling.c                 |    4 
 tools/perf/util/namespaces.c                                |    3 
 tools/testing/selftests/powerpc/harness.c                   |   18 +
 194 files changed, 1497 insertions(+), 953 deletions(-)

Ahmad Fatoum (1):
net: macb: Fix regression breaking non-MDIO fixed-link PHYs

Aleh Filipovich (1):
platform/x86: asus-nb-wmi: Add keymap entry for lid flip action on UX360

Alex Deucher (1):
drm/amdgpu: update uvd_v6_0_ring_vm_funcs to use new nop packet

Alexey Kodanev (2):
vti6: remove !skb->ignore_df check from vti6_xmit()
ipv6: don't get lwtstate twice in ip6_rt_copy_init()

Anand Jain (5):
btrfs: fix in-memory value of total_devices after seed device deletion
btrfs: do btrfs_free_stale_devices outside of device_list_add
btrfs: extend locked section when adding a new device in device_list_add
btrfs: rename local devices for fs_devices in btrfs_free_stale_devices(
btrfs: use device_list_mutex when removing stale devices

Andrey Ryabinin (1):
mm/fadvise.c: fix signed overflow UBSAN complaint

Anssi Hannula (1):
net: macb: do not disable MDIO bus at open/close time

Anthony Wong (1):
r8169: add support for NCube 8168 network card

Anton Vasilyev (1):
pinctrl: axp209: Fix NULL pointer dereference after allocation

Arnd Bergmann (4):
fs/proc/vmcore.c: hide vmcoredd_mmap_dumps() for nommu builds
reiserfs: change j_timestamp type to time64_t x86/mce: Add notifier_block forward declaration
x86: kvm: avoid unused variable warning

Aurelien Aptel (1):
CIFS: fix memory leak and remove dead code

Azat Khuzhin (1):
r8169: set RxConfig after tx/rx is enabled for RTL8169sb/8110sb devices

Bart Van Assche (2):
cfq: Suppress compiler warnings about comparisons
btrfs: Fix a C compliance issue

Benno Evers (1):
perf tools: Check for null when copying nsinfo.

Breno Leitao (1):
selftests/powerpc: Kill child processes on SIGINT

Chao Yu (3):
f2fs: avoid race between zero_range and background GC
f2fs: fix avoid race between truncate and background GC
f2fs: fix to clear PG_checked flag in set_page_dirty()

Chris Wilson (1):
drm/i915/lpe: Mark LPE audio runtime pm as "no callbacks"

Christian König (2):
drm/amdgpu: fix incorrect use of fcheck drm/amdgpu: fix incorrect use of drm_file->pid

Chuanhua Lei (1):
x86/tsc: Prevent result truncation on 32bit

Cong Wang (4):
act_ife: fix a potential use-after-free
act_ife: move tcfa_lock down to where necessary
act_ife: fix a potential deadlock
tipc: fix a missing rhashtable_walk_exit()

Dan Carpenter (4):
apparmor: fix an error code in __aa_create_ns() irqchip/stm32: Fix init error handling
powerpc: Fix size calculation using resource_size()
scsi: aic94xx: fix an error code in aic94xx_init()

Daniel Borkmann (5):
bpf, sockmap: fix map elem deletion race with smap_stop_sock tcp, ulp: fix leftover icsk_ulp_ops preventing sock from reattach bpf, sockmap: fix sock_map_ctx_update_elem race with exist/noexist bpf, sockmap: fix leakage of smap_psock_map_entry
tcp, ulp: add alias for all ulp modules

David Ahern (2):
net/ipv6: Only update MTU metric if it set net/ipv6: Put lwtstate when destroying fib6_info

David Francis (1):
drm/amd/display: Read back max backlight value at boot

David Sterba (5):
btrfs: lift uuid_mutex to callers of btrfs_open_devices
btrfs: lift uuid_mutex to callers of btrfs_scan_one_device
btrfs: lift uuid_mutex to callers of btrfs_parse_early_options
btrfs: reorder initialization before the mount locks uuid_mutex
btrfs: fix mount and ioctl device scan ioctl race

Davide Caratti (1):
net/sched: act_pedit: fix dump of extended layered op

Denis Efremov (1):
coccicheck: return proper error code on fail

Dexuan Cui (1):
hv_netvsc: Fix a deadlock by getting rtnl lock earlier in netvsc_probe()

Dmitry Torokhov (1):
Input: do not use WARN() in input_alloc_absinfo()

Doug Berger (1):
net: bcmgenet: use MAC link status for fixed phy

Eric Dumazet (1):
ipv4: tcp: send zero IPID for RST and ACK sent in SYN-RECV and TIME-WAIT state

Erik Schmauss (1):
ACPICA: ACPICA: add status check for acpi_hw_read before assigning return value

Ernesto A. Fernández (2):
hfs: prevent crash on exit from failed search
hfsplus: fix NULL dereference in hfsplus_lookup()

Evan Quan (1):
drm/amd/powerplay: fixed uninitialized value

Florian Westphal (3):
tcp: do not restart timewait timer on rst reception
netfilter: ip6t_rpfilter: set F_IFACE for linklocal addresses
netfilter: fix memory leaks on netlink_dump_start error

Fredrik Schön (1):
drm/i915: Increase LSPCON timeout

Gal Pressman (1):
RDMA/hns: Fix usage of bitmap allocation functions return values

Greg Edwards (1):
block: bvec_nr_vecs() returns value for wrong slab

Greg Kroah-Hartman (1):

      Linux 4.18.8

Guenter Roeck (1):
mfd: sm501: Set coherent_dma_mask when creating subdevices

Gustavo A. R. Silva (2):
drm/amd/display: fix type of variable
ASoC: wm8994: Fix missing break in switch

Haiqing Bai (1):
tipc: fix the big/little endian issue in tipc_dest

Haishuang Yan (2):
ip6_vti: fix creating fallback tunnel device for vti6
ip6_vti: fix a null pointer deference when destroy vti6 tunnel

Hangbin Liu (1):

      net/ipv6: init ip6 anycast rt->dst.input as ip6_input

Hans de Goede (2):
i2c: core: ACPI: Make acpi_gsb_i2c_read_bytes() check i2c_transfer return value ACPI / scan: Initialize status to ACPI_STA_DEFAULT

Harry Wentland (1):
drm/amd/display: Report non-DP display as disconnected without EDID

Heiko Stuebner (1):
drm/rockchip: vop: split out core clock enablement into separate functions

Ian Abbott (1):
staging: comedi: ni_mio_common: fix subdevice flags for PFI subdevice

Ido Schimmel (1):
mlxsw: spectrum_switchdev: Do not leak RIFs when removing bridge

Jakub Kicinski (1):
nfp: wait for posted reconfigs when disabling the device

James Morse (1):
fs/proc/kcore.c: use __pa_symbol() for KCORE_TEXT list entries

James Zhu (2):
drm/amdgpu: update tmr mc address drm/amdgpu:add tmr mc address into amdgpu_firmware_info

Jan-Marek Glogowski (1):
drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"

Jani Nikula (1):
drm/i915: set DP Main Stream Attribute for color range on DDI platforms

Jann Horn (1):
fork: don't copy inconsistent signal handler state to child

Jason Wang (1):
vhost: correctly check the iova range when waking virtqueue

Jean-Philippe Brucker (1):
net/9p: fix error path of p9_virtio_probe

Jens Axboe (1):
block: don't warn for flush on read-only device

Jerome Brunet (2):
Revert "net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit"
pwm: meson: Fix mux clock names

Jesper Dangaard Brouer (1):
samples/bpf: all XDP samples should unload xdp/bpf prog on SIGTERM

Jian Shen (1):
net: hns3: Fix for phy link issue when using marvell phy driver

Jianchao Wang (1):
blk-mq: count the hctx as active before allocating tag

Jim Mattson (1):
kvm: nVMX: Fix fault vector for VMX operation at CPL > 0

Joel Fernandes (Google) (1):
debugobjects: Make stack check warning more informative

Johannes Berg (2):
workqueue: skip lockdep wq dependency in cancel_work_sync()
workqueue: re-add lockdep dependencies for flushing

John Pittman (1):
dm kcopyd: avoid softlockup in run_complete_job

Jonas Gorski (1):
irqchip/bcm7038-l1: Hide cpu offline callback when building for !SMP

Juergen Gross (2):
x86/pae: use 64 bit atomic xchg function in native_ptep_get_and_clear x86/xen: don't write ptes directly in 32-bit PV guests

Julia Lawall (1):
drm/rockchip: lvds: add missing of_node_put

Junaid Shahid (1):
kvm: x86: Set highest physical address bits in non-present/reserved SPTEs

Kai-Heng Feng (2):
r8152: disable RX aggregation on new Dell TB16 dock drm/edid: Add 6 bpc quirk for SDC panel in Lenovo B50-80

Kees Cook (1):
net: sched: Fix memory exposure from short TCA_U32_SEL

Kim Phillips (1):
perf arm spe: Fix uninitialized record error variable

Laura Abbott (1):
sunrpc: Don't use stack buffer with scatterlist

Leo (Sunpeng) Li (1):
drm/amd/display: Use requested HDMI aspect ratio

Levin Du (1):
clk: rockchip: Add pclk_rkpwm_pmu to PMU critical clocks in rk3399

Likun Gao (3):
drm/amdgpu:add new firmware id for VCN drm/amdgpu:add VCN support in PSP driver drm/amdgpu:add VCN booting with firmware loaded by PSP

Lubosz Sarnecki (1):
drm/edid: Quirk Vive Pro VR headset non-desktop.

Lucas Stach (1):
drm/etnaviv: fix crash in GPU suspend when init failed due to buffer placement

Mahesh Salgaonkar (1):
powerpc/pseries: Avoid using the size greater than RTAS_ERROR_LOG_MAX.

Manish Chopra (1):
qlge: Fix netdev features configuration.

Marc Zyngier (4):
iommu/rockchip: Handle errors returned from PM framework iommu/rockchip: Move irq request past pm_runtime_enable
arm64: rockchip: Force CONFIG_PM on Rockchip systems
ARM: rockchip: Force CONFIG_PM on Rockchip systems

Masahiro Yamada (1):
um: fix parallel building with O= option

Matthias Kaehlcke (1):
ASoC: rt5677: Fix initialization of rt5677_of_match.data

Michael Chan (2):
bnxt_en: Clean up unused functions.
bnxt_en: Do not adjust max_cp_rings by the ones used by RDMA.

Michael Ellerman (2):
powerpc/uaccess: Enable get_user(u64, *p) on 32-bit powerpc/64s: Make rfi_flush_fallback a little more robust

Michael J. Ruhl (1):
IB/hfi1: Invalid NUMA node information can cause a divide by zero

Michal Hocko (1):
netfilter: x_tables: do not fail xt_alloc_table_info too easilly

Michel Dänzer (5):
drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode drm/amdgpu: Keep track of amount of pinned CPU visible VRAM drm/amdgpu: Make pin_size values atomic
drm/amdgpu: Warn and update pin_size values when destroying a pinned BO drm/amdgpu: Don't warn on destroying a pinned BO

Mike Rapoport (1):
mm: make DEFERRED_STRUCT_PAGE_INIT explicitly depend on SPARSEMEM

Mikita Lipski (4):
drm/amd/display: Don't share clk source between DP and HDMI drm/amd/display: update clk for various HDMI color depths drm/amd/display: Pass connector id when executing VBIOS CT drm/amd/display: Check if clock source in use before disabling

Misono Tomohiro (1):
btrfs: replace: Reset on-disk dev stats value after replace

Myron Stowe (1):
PCI: Match Root Port's MPS to endpoint's MPSS as necessary

Nadav Amit (1):
mm: respect arch_dup_mmap() return value

Nicholas Kazlauskas (1):
drm/amd/display: Guard against null crtc in CRC IRQ

OGAWA Hirofumi (1):

      fat: validate ->i_start before using

Palmer Dabbelt (1):
RISC-V: Use KBUILD_CFLAGS instead of KCFLAGS when building the vDSO

Philipp Rudo (1):
s390/kdump: Fix memleak in nt_vmcoreinfo

Qu Wenruo (5):
btrfs: Exit gracefully when chunk map cannot be inserted to the tree
btrfs: relocation: Only remove reloc rb_trees if reloc control has been initialized
btrfs: tree-checker: Detect invalid and empty essential trees
btrfs: check-integrity: Fix NULL pointer dereference for degraded mount
btrfs: Don't remove block group that still has pinned down bytes

Ralf Goebel (1):
iommu/omap: Fix cache flushes on L2 table entries

Randy Dunlap (5):
scripts: modpost: check memory allocation results platform/x86: intel_punit_ipc: fix build errors powerpc/platforms/85xx: fix t1042rdb_diu.c build errors & warning uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name
kbuild: make missing $DEPMOD a Warning instead of an Error

Rex Zhu (3):
drm/amdgpu: fix a reversed condition
drm/amd/pp: Convert voltage unit in mV*4 to mV on CZ/ST drm/amd/pp/Polaris12: Fix a chunk of registers missed to program

Richard Weinberger (1):
ubi: Initialize Fastmap checkmapping correctly

Robert Munteanu (1):
HID: redragon: fix num lock and caps lock LEDs

Rodrigo Vivi (1):
drm/i915: Free write_buf that we allocated with kzalloc.

Roger Pau Monne (1):
xen/balloon: fix balloon initialization for PVH Dom0

Ronnie Sahlberg (1):
cifs: check if SMB2 PDU size has been padded and suppress the warning

Sandipan Das (1):
perf probe powerpc: Fix trace event post-processing

Sandy Huang (1):
drm/rockchip: vop: fix irq disabled after vop driver probed

Sean Christopherson (1):
KVM: vmx: track host_state.loaded using a loaded_vmcs pointer

Srikar Dronamraju (1):
powerpc/topology: Get topology for shared processors at boot

Stefan Haberland (2):
s390/dasd: fix hanging offline processing due to canceled worker s390/dasd: fix panic for failed online processing

Stephen Hemminger (1):
hv_netvsc: ignore devices that are not PCI

Steve French (3):
smb3: fix reset of bytes read and written stats
SMB3: Number of requests sent should be displayed for SMB3 not just CIFS
smb3: if server does not support posix do not allow posix mount option

Suzuki K Poulose (1):
virtio: pci-legacy: Validate queue pfn

Tan Hu (1):
ipvs: fix race between ip_vs_conn_new() and ip_vs_del_dest()

Tariq Toukan (2):
net/mlx5: Fix SQ offset in QPs with small RQ net/xdp: Fix suspicious RCU usage warning

Tetsuo Handa (2):
hfsplus: don't return 0 when fill_super() failed fs/dcache.c: fix kmemcheck splat at take_dentry_name_snapshot()

Thomas Petazzoni (1):
PCI: mvebu: Fix I/O space end address calculation

Tomas Bortoli (1):
net/9p/trans_fd.c: fix race by holding the lock

Ville Syrjälä (1):
drm/i915: Nuke the LVDS lid notifier

Vlad Buslov (1):
net: sched: action_ife: take reference to meta module

Wei Yongjun (1):
NFSv4: Fix error handling in nfs4_sp4_select_mode()

Winnie Chang (1):
brcmfmac: fix brcmf_wiphy_wowl_params() NULL pointer dereference

Xi Wang (1):
net: hns3: Fix for command format parsing error in hclge_is_all_function_id_zero

Xin Long (3):
sctp: remove useless start_fail from sctp_ht_iter in proc
erspan: set erspan_ver to 1 by default when adding an erspan dev
sctp: hold transport before accessing its asoc in sctp_transport_get_next

Yonghong Song (1):
bpf: fix bpffs non-array map seq_show issue

YueHaibing (1):
RDS: IB: fix 'passing zero to ERR_PTR()' warning

nixiaoming (1):
selinux: cleanup dentry and inodes on error in selinuxfs

author maintainer
#1 lore raw
Makefile +1 -1
index 711b04d00e49..0d73431f66cd 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 18
-SUBLEVEL = 7
+SUBLEVEL = 8
 EXTRAVERSION =
 NAME = Merciless Moray
 
arch/arm/mach-rockchip/Kconfig +1 -0
index fafd3d7f9f8c..8ca926522026 100644
@@ -17,6 +17,7 @@ config ARCH_ROCKCHIP
 	select ARM_GLOBAL_TIMER
 	select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
 	select ZONE_DMA if ARM_LPAE
+	select PM
 	help
 	  Support for Rockchip's Cortex-A9 Single-to-Quad-Core-SoCs
 	  containing the RK2928, RK30xx and RK31xx series.
arch/arm64/Kconfig.platforms +1 -0
index d5aeac351fc3..21a715ad8222 100644
@@ -151,6 +151,7 @@ config ARCH_ROCKCHIP
 	select GPIOLIB
 	select PINCTRL
 	select PINCTRL_ROCKCHIP
+	select PM
 	select ROCKCHIP_TIMER
 	help
 	  This enables support for the ARMv8 based Rockchip chipsets,
arch/powerpc/include/asm/topology.h +5 -0
index 16b077801a5f..a4a718dbfec6 100644
@@ -92,6 +92,7 @@ extern int stop_topology_update(void);
 extern int prrn_is_enabled(void);
 extern int find_and_online_cpu_nid(int cpu);
 extern int timed_topology_update(int nsecs);
+extern void __init shared_proc_topology_init(void);
 #else
 static inline int start_topology_update(void)
 {
@@ -113,6 +114,10 @@ static inline int timed_topology_update(int nsecs)
 {
 	return 0;
 }
+
+#ifdef CONFIG_SMP
+static inline void shared_proc_topology_init(void) {}
+#endif
 #endif /* CONFIG_NUMA && CONFIG_PPC_SPLPAR */
 
 #include <asm-generic/topology.h>
arch/powerpc/include/asm/uaccess.h +10 -3
index 468653ce844c..327f6112fe8e 100644
@@ -250,10 +250,17 @@ do {								\
 	}							\
 } while (0)
 
+/*
+ * This is a type: either unsigned long, if the argument fits into
+ * that type, or otherwise unsigned long long.
+ */
+#define __long_type(x) \
+	__typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
+
 #define __get_user_nocheck(x, ptr, size)			\
 ({								\
 	long __gu_err;						\
-	unsigned long __gu_val;					\
+	__long_type(*(ptr)) __gu_val;				\
 	const __typeof__(*(ptr)) __user *__gu_addr = (ptr);	\
 	__chk_user_ptr(ptr);					\
 	if (!is_kernel_addr((unsigned long)__gu_addr))		\
@@ -267,7 +274,7 @@ do {								\
 #define __get_user_check(x, ptr, size)					\
 ({									\
 	long __gu_err = -EFAULT;					\
-	unsigned long  __gu_val = 0;					\
+	__long_type(*(ptr)) __gu_val = 0;				\
 	const __typeof__(*(ptr)) __user *__gu_addr = (ptr);		\
 	might_fault();							\
 	if (access_ok(VERIFY_READ, __gu_addr, (size))) {		\
@@ -281,7 +288,7 @@ do {								\
 #define __get_user_nosleep(x, ptr, size)			\
 ({								\
 	long __gu_err;						\
-	unsigned long __gu_val;					\
+	__long_type(*(ptr)) __gu_val;				\
 	const __typeof__(*(ptr)) __user *__gu_addr = (ptr);	\
 	__chk_user_ptr(ptr);					\
 	barrier_nospec();					\
arch/powerpc/kernel/exceptions-64s.S +6 -0
index 285c6465324a..f817342aab8f 100644
@@ -1526,6 +1526,8 @@ TRAMP_REAL_BEGIN(stf_barrier_fallback)
 TRAMP_REAL_BEGIN(rfi_flush_fallback)
 	SET_SCRATCH0(r13);
 	GET_PACA(r13);
+	std	r1,PACA_EXRFI+EX_R12(r13)
+	ld	r1,PACAKSAVE(r13)
 	std	r9,PACA_EXRFI+EX_R9(r13)
 	std	r10,PACA_EXRFI+EX_R10(r13)
 	std	r11,PACA_EXRFI+EX_R11(r13)
@@ -1560,12 +1562,15 @@ TRAMP_REAL_BEGIN(rfi_flush_fallback)
 	ld	r9,PACA_EXRFI+EX_R9(r13)
 	ld	r10,PACA_EXRFI+EX_R10(r13)
 	ld	r11,PACA_EXRFI+EX_R11(r13)
+	ld	r1,PACA_EXRFI+EX_R12(r13)
 	GET_SCRATCH0(r13);
 	rfid
 
 TRAMP_REAL_BEGIN(hrfi_flush_fallback)
 	SET_SCRATCH0(r13);
 	GET_PACA(r13);
+	std	r1,PACA_EXRFI+EX_R12(r13)
+	ld	r1,PACAKSAVE(r13)
 	std	r9,PACA_EXRFI+EX_R9(r13)
 	std	r10,PACA_EXRFI+EX_R10(r13)
 	std	r11,PACA_EXRFI+EX_R11(r13)
@@ -1600,6 +1605,7 @@ TRAMP_REAL_BEGIN(hrfi_flush_fallback)
 	ld	r9,PACA_EXRFI+EX_R9(r13)
 	ld	r10,PACA_EXRFI+EX_R10(r13)
 	ld	r11,PACA_EXRFI+EX_R11(r13)
+	ld	r1,PACA_EXRFI+EX_R12(r13)
 	GET_SCRATCH0(r13);
 	hrfid
 
arch/powerpc/kernel/smp.c +5 -0
index 4794d6b4f4d2..b3142c7b9c31 100644
@@ -1156,6 +1156,11 @@ void __init smp_cpus_done(unsigned int max_cpus)
 	if (smp_ops && smp_ops->bringup_done)
 		smp_ops->bringup_done();
 
+	/*
+	 * On a shared LPAR, associativity needs to be requested.
+	 * Hence, get numa topology before dumping cpu topology
+	 */
+	shared_proc_topology_init();
 	dump_numa_cpu_topology();
 
 	/*
arch/powerpc/mm/numa.c +10 -10
index 0c7e05d89244..35ac5422903a 100644
@@ -1078,7 +1078,6 @@ static int prrn_enabled;
 static void reset_topology_timer(void);
 static int topology_timer_secs = 1;
 static int topology_inited;
-static int topology_update_needed;
 
 /*
  * Change polling interval for associativity changes.
@@ -1306,11 +1305,8 @@ int numa_update_cpu_topology(bool cpus_locked)
 	struct device *dev;
 	int weight, new_nid, i = 0;
 
-	if (!prrn_enabled && !vphn_enabled) {
-		if (!topology_inited)
-			topology_update_needed = 1;
+	if (!prrn_enabled && !vphn_enabled && topology_inited)
 		return 0;
-	}
 
 	weight = cpumask_weight(&cpu_associativity_changes_mask);
 	if (!weight)
@@ -1423,7 +1419,6 @@ int numa_update_cpu_topology(bool cpus_locked)
 
 out:
 	kfree(updates);
-	topology_update_needed = 0;
 	return changed;
 }
 
@@ -1551,6 +1546,15 @@ int prrn_is_enabled(void)
 	return prrn_enabled;
 }
 
+void __init shared_proc_topology_init(void)
+{
+	if (lppaca_shared_proc(get_lppaca())) {
+		bitmap_fill(cpumask_bits(&cpu_associativity_changes_mask),
+			    nr_cpumask_bits);
+		numa_update_cpu_topology(false);
+	}
+}
+
 static int topology_read(struct seq_file *file, void *v)
 {
 	if (vphn_enabled || prrn_enabled)
@@ -1608,10 +1612,6 @@ static int topology_update_init(void)
 		return -ENOMEM;
 
 	topology_inited = 1;
-	if (topology_update_needed)
-		bitmap_fill(cpumask_bits(&cpu_associativity_changes_mask),
-					nr_cpumask_bits);
-
 	return 0;
 }
 device_initcall(topology_update_init);
arch/powerpc/platforms/85xx/t1042rdb_diu.c +4 -0
index 58fa3d319f1c..dac36ba82fea 100644
@@ -9,8 +9,10 @@
  * option) any later version.
  */
 
+#include <linux/init.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 
@@ -150,3 +152,5 @@ static int __init t1042rdb_diu_init(void)
 }
 
 early_initcall(t1042rdb_diu_init);
+
+MODULE_LICENSE("GPL");
arch/powerpc/platforms/pseries/ras.c +1 -1
index 2edc673be137..99d1152ae224 100644
@@ -371,7 +371,7 @@ static struct rtas_error_log *fwnmi_get_errinfo(struct pt_regs *regs)
 		int len, error_log_length;
 
 		error_log_length = 8 + rtas_error_extended_log_length(h);
-		len = max_t(int, error_log_length, RTAS_ERROR_LOG_MAX);
+		len = min_t(int, error_log_length, RTAS_ERROR_LOG_MAX);
 		memset(global_mce_data_buf, 0, RTAS_ERROR_LOG_MAX);
 		memcpy(global_mce_data_buf, h, len);
 		errhdr = (struct rtas_error_log *)global_mce_data_buf;
arch/powerpc/sysdev/mpic_msgr.c +1 -1
index eb69a5186243..280e964e1aa8 100644
@@ -196,7 +196,7 @@ static int mpic_msgr_probe(struct platform_device *dev)
 
 	/* IO map the message register block. */
 	of_address_to_resource(np, 0, &rsrc);
-	msgr_block_addr = ioremap(rsrc.start, rsrc.end - rsrc.start);
+	msgr_block_addr = ioremap(rsrc.start, resource_size(&rsrc));
 	if (!msgr_block_addr) {
 		dev_err(&dev->dev, "Failed to iomap MPIC message registers");
 		return -EFAULT;
arch/riscv/kernel/vdso/Makefile +2 -2
index f6561b783b61..eed1c137f618 100644
@@ -52,8 +52,8 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
 # Add -lgcc so rv32 gets static muldi3 and lshrdi3 definitions.
 # Make sure only to export the intended __vdso_xxx symbol offsets.
 quiet_cmd_vdsold = VDSOLD  $@
-      cmd_vdsold = $(CC) $(KCFLAGS) $(call cc-option, -no-pie) -nostdlib $(SYSCFLAGS_$(@F)) \
-                           -Wl,-T,$(filter-out FORCE,$^) -o [email protected] -lgcc && \
+      cmd_vdsold = $(CC) $(KBUILD_CFLAGS) $(call cc-option, -no-pie) -nostdlib -nostartfiles $(SYSCFLAGS_$(@F)) \
+                           -Wl,-T,$(filter-out FORCE,$^) -o [email protected] && \
                    $(CROSS_COMPILE)objcopy \
                            $(patsubst %, -G __vdso_%, $(vdso-syms)) [email protected] $@
 
arch/s390/kernel/crash_dump.c +12 -5
index 9f5ea9d87069..9b0216d571ad 100644
@@ -404,11 +404,13 @@ static void *get_vmcoreinfo_old(unsigned long *size)
 	if (copy_oldmem_kernel(nt_name, addr + sizeof(note),
 			       sizeof(nt_name) - 1))
 		return NULL;
-	if (strcmp(nt_name, "VMCOREINFO") != 0)
+	if (strcmp(nt_name, VMCOREINFO_NOTE_NAME) != 0)
 		return NULL;
 	vmcoreinfo = kzalloc_panic(note.n_descsz);
-	if (copy_oldmem_kernel(vmcoreinfo, addr + 24, note.n_descsz))
+	if (copy_oldmem_kernel(vmcoreinfo, addr + 24, note.n_descsz)) {
+		kfree(vmcoreinfo);
 		return NULL;
+	}
 	*size = note.n_descsz;
 	return vmcoreinfo;
 }
@@ -418,15 +420,20 @@ static void *get_vmcoreinfo_old(unsigned long *size)
  */
 static void *nt_vmcoreinfo(void *ptr)
 {
+	const char *name = VMCOREINFO_NOTE_NAME;
 	unsigned long size;
 	void *vmcoreinfo;
 
 	vmcoreinfo = os_info_old_entry(OS_INFO_VMCOREINFO, &size);
-	if (!vmcoreinfo)
-		vmcoreinfo = get_vmcoreinfo_old(&size);
+	if (vmcoreinfo)
+		return nt_init_name(ptr, 0, vmcoreinfo, size, name);
+
+	vmcoreinfo = get_vmcoreinfo_old(&size);
 	if (!vmcoreinfo)
 		return ptr;
-	return nt_init_name(ptr, 0, vmcoreinfo, size, "VMCOREINFO");
+	ptr = nt_init_name(ptr, 0, vmcoreinfo, size, name);
+	kfree(vmcoreinfo);
+	return ptr;
 }
 
 /*
arch/um/Makefile +1 -2
index e54dda8a0363..de340e41f3b2 100644
@@ -122,8 +122,7 @@ archheaders:
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
 	            kbuild-file=$(HOST_DIR)/include/uapi/asm/Kbuild \
 		    obj=$(HOST_DIR)/include/generated/uapi/asm
-	$(Q)$(MAKE) KBUILD_SRC= ARCH=$(HEADER_ARCH) archheaders
-
+	$(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) archheaders
 
 archprepare: include/generated/user_constants.h
 
arch/x86/include/asm/mce.h +1 -0
index 8c7b3e5a2d01..3a17107594c8 100644
@@ -148,6 +148,7 @@ enum mce_notifier_prios {
 	MCE_PRIO_LOWEST		= 0,
 };
 
+struct notifier_block;
 extern void mce_register_decode_chain(struct notifier_block *nb);
 extern void mce_unregister_decode_chain(struct notifier_block *nb);
 
arch/x86/include/asm/pgtable-3level.h +3 -4
index bb035a4cbc8c..9eeb1359ec75 100644
@@ -2,6 +2,8 @@
 #ifndef _ASM_X86_PGTABLE_3LEVEL_H
 #define _ASM_X86_PGTABLE_3LEVEL_H
 
+#include <asm/atomic64_32.h>
+
 /*
  * Intel Physical Address Extension (PAE) Mode - three-level page
  * tables on PPro+ CPUs.
@@ -147,10 +149,7 @@ static inline pte_t native_ptep_get_and_clear(pte_t *ptep)
 {
 	pte_t res;
 
-	/* xchg acts as a barrier before the setting of the high bits */
-	res.pte_low = xchg(&ptep->pte_low, 0);
-	res.pte_high = ptep->pte_high;
-	ptep->pte_high = 0;
+	res.pte = (pteval_t)arch_atomic64_xchg((atomic64_t *)ptep, 0);
 
 	return res;
 }
arch/x86/kernel/tsc.c +2 -2
index 74392d9d51e0..a10481656d82 100644
@@ -1343,7 +1343,7 @@ device_initcall(init_tsc_clocksource);
 
 void __init tsc_early_delay_calibrate(void)
 {
-	unsigned long lpj;
+	u64 lpj;
 
 	if (!boot_cpu_has(X86_FEATURE_TSC))
 		return;
@@ -1355,7 +1355,7 @@ void __init tsc_early_delay_calibrate(void)
 	if (!tsc_khz)
 		return;
 
-	lpj = tsc_khz * 1000;
+	lpj = (u64)tsc_khz * 1000;
 	do_div(lpj, HZ);
 	loops_per_jiffy = lpj;
 }
arch/x86/kvm/mmu.c +38 -5

81 lines not on this page · raw message

arch/x86/kvm/vmx.c +17 -9
index bedabcf33a3e..9869bfd0c601 100644
@@ -939,17 +939,21 @@ struct vcpu_vmx {
 	/*
 	 * loaded_vmcs points to the VMCS currently used in this vcpu. For a
 	 * non-nested (L1) guest, it always points to vmcs01. For a nested
-	 * guest (L2), it points to a different VMCS.
+	 * guest (L2), it points to a different VMCS.  loaded_cpu_state points
+	 * to the VMCS whose state is loaded into the CPU registers that only
+	 * need to be switched when transitioning to/from the kernel; a NULL
+	 * value indicates that host state is loaded.
 	 */
 	struct loaded_vmcs    vmcs01;
 	struct loaded_vmcs   *loaded_vmcs;
+	struct loaded_vmcs   *loaded_cpu_state;
 	bool                  __launched; /* temporary, used in vmx_vcpu_run */
 	struct msr_autoload {
 		struct vmx_msrs guest;
 		struct vmx_msrs host;
 	} msr_autoload;
+
 	struct {
-		int           loaded;
 		u16           fs_sel, gs_sel, ldt_sel;
 #ifdef CONFIG_X86_64
 		u16           ds_sel, es_sel;
@@ -2750,10 +2754,11 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu)
 #endif
 	int i;
 
-	if (vmx->host_state.loaded)
+	if (vmx->loaded_cpu_state)
 		return;
 
-	vmx->host_state.loaded = 1;
+	vmx->loaded_cpu_state = vmx->loaded_vmcs;
+
 	/*
 	 * Set host fs and gs selectors.  Unfortunately, 22.2.3 does not
 	 * allow segment selectors with cpl > 0 or ti == 1.
@@ -2815,11 +2820,14 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu)
 
 static void __vmx_load_host_state(struct vcpu_vmx *vmx)
 {
-	if (!vmx->host_state.loaded)
+	if (!vmx->loaded_cpu_state)
 		return;
 
+	WARN_ON_ONCE(vmx->loaded_cpu_state != vmx->loaded_vmcs);
+
 	++vmx->vcpu.stat.host_state_reload;
-	vmx->host_state.loaded = 0;
+	vmx->loaded_cpu_state = NULL;
+
 #ifdef CONFIG_X86_64
 	if (is_long_mode(&vmx->vcpu))
 		rdmsrl(MSR_KERNEL_GS_BASE, vmx->msr_guest_kernel_gs_base);
@@ -8115,7 +8123,7 @@ static int handle_vmon(struct kvm_vcpu *vcpu)
 
 	/* CPL=0 must be checked manually. */
 	if (vmx_get_cpl(vcpu)) {
-		kvm_queue_exception(vcpu, UD_VECTOR);
+		kvm_inject_gp(vcpu, 0);
 		return 1;
 	}
 
@@ -8179,7 +8187,7 @@ static int handle_vmon(struct kvm_vcpu *vcpu)
 static int nested_vmx_check_permission(struct kvm_vcpu *vcpu)
 {
 	if (vmx_get_cpl(vcpu)) {
-		kvm_queue_exception(vcpu, UD_VECTOR);
+		kvm_inject_gp(vcpu, 0);
 		return 0;
 	}
 
@@ -10517,8 +10525,8 @@ static void vmx_switch_vmcs(struct kvm_vcpu *vcpu, struct loaded_vmcs *vmcs)
 		return;
 
 	cpu = get_cpu();
-	vmx->loaded_vmcs = vmcs;
 	vmx_vcpu_put(vcpu);
+	vmx->loaded_vmcs = vmcs;
 	vmx_vcpu_load(vcpu, cpu);
 	put_cpu();
 }
arch/x86/kvm/x86.c +7 -5
index 24c84aa87049..94cd63081471 100644
@@ -6506,20 +6506,22 @@ static void kvm_set_mmio_spte_mask(void)
 	 * Set the reserved bits and the present bit of an paging-structure
 	 * entry to generate page fault with PFER.RSV = 1.
 	 */
-	 /* Mask the reserved physical address bits. */
-	mask = rsvd_bits(maxphyaddr, 51);
+
+	/*
+	 * Mask the uppermost physical address bit, which would be reserved as
+	 * long as the supported physical address width is less than 52.
+	 */
+	mask = 1ull << 51;
 
 	/* Set the present bit. */
 	mask |= 1ull;
 
-#ifdef CONFIG_X86_64
 	/*
 	 * If reserved bit is not supported, clear the present bit to disable
 	 * mmio page fault.
 	 */
-	if (maxphyaddr == 52)
+	if (IS_ENABLED(CONFIG_X86_64) && maxphyaddr == 52)
 		mask &= ~1ull;
-#endif
 
 	kvm_mmu_set_mmio_spte_mask(mask, mask);
 }
arch/x86/xen/mmu_pv.c +3 -4
index 2c30cabfda90..071d82ec9abb 100644
@@ -434,14 +434,13 @@ static void xen_set_pud(pud_t *ptr, pud_t val)
 static void xen_set_pte_atomic(pte_t *ptep, pte_t pte)
 {
 	trace_xen_mmu_set_pte_atomic(ptep, pte);
-	set_64bit((u64 *)ptep, native_pte_val(pte));
+	__xen_set_pte(ptep, pte);
 }
 
 static void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
 {
 	trace_xen_mmu_pte_clear(mm, addr, ptep);
-	if (!xen_batched_set_pte(ptep, native_make_pte(0)))
-		native_pte_clear(mm, addr, ptep);
+	__xen_set_pte(ptep, native_make_pte(0));
 }
 
 static void xen_pmd_clear(pmd_t *pmdp)
@@ -1571,7 +1570,7 @@ static void __init xen_set_pte_init(pte_t *ptep, pte_t pte)
 		pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) &
 			       pte_val_ma(pte));
 #endif
-	native_set_pte(ptep, pte);
+	__xen_set_pte(ptep, pte);
 }
 
 /* Early in boot, while setting up the initial pagetable, assume
block/bio.c +1 -1
index 047c5dca6d90..ff94640bc734 100644
@@ -156,7 +156,7 @@ static void bio_put_slab(struct bio_set *bs)
 
 unsigned int bvec_nr_vecs(unsigned short idx)
 {
-	return bvec_slabs[idx].nr_vecs;
+	return bvec_slabs[--idx].nr_vecs;
 }
 
 void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned int idx)
block/blk-core.c +3 -1
index 1646ea85dade..746a5eac4541 100644
@@ -2159,7 +2159,9 @@ static inline bool should_fail_request(struct hd_struct *part,
 
 static inline bool bio_check_ro(struct bio *bio, struct hd_struct *part)
 {
-	if (part->policy && op_is_write(bio_op(bio))) {
+	const int op = bio_op(bio);
+
+	if (part->policy && (op_is_write(op) && !op_is_flush(op))) {
 		char b[BDEVNAME_SIZE];
 
 		WARN_ONCE(1,
block/blk-mq-tag.c +3 -0
index 3de0836163c2..d5f2c21d8531 100644
@@ -23,6 +23,9 @@ bool blk_mq_has_free_tags(struct blk_mq_tags *tags)
 
 /*
  * If a previously inactive queue goes active, bump the active user count.
+ * We need to do this before try to allocate driver tag, then even if fail
+ * to get tag when first time, the other shared-tag users could reserve
+ * budget for it.
  */
 bool __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx)
 {
block/blk-mq.c +6 -2
index 654b0dc7e001..2f9e14361673 100644
@@ -285,7 +285,7 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
 		rq->tag = -1;
 		rq->internal_tag = tag;
 	} else {
-		if (blk_mq_tag_busy(data->hctx)) {
+		if (data->hctx->flags & BLK_MQ_F_TAG_SHARED) {
 			rq_flags = RQF_MQ_INFLIGHT;
 			atomic_inc(&data->hctx->nr_active);
 		}
@@ -367,6 +367,8 @@ static struct request *blk_mq_get_request(struct request_queue *q,
 		if (!op_is_flush(op) && e->type->ops.mq.limit_depth &&
 		    !(data->flags & BLK_MQ_REQ_RESERVED))
 			e->type->ops.mq.limit_depth(op, data);
+	} else {
+		blk_mq_tag_busy(data->hctx);
 	}
 
 	tag = blk_mq_get_tag(data);
@@ -970,6 +972,7 @@ bool blk_mq_get_driver_tag(struct request *rq, struct blk_mq_hw_ctx **hctx,
 		.hctx = blk_mq_map_queue(rq->q, rq->mq_ctx->cpu),
 		.flags = wait ? 0 : BLK_MQ_REQ_NOWAIT,
 	};
+	bool shared;
 
 	might_sleep_if(wait);
 
@@ -979,9 +982,10 @@ bool blk_mq_get_driver_tag(struct request *rq, struct blk_mq_hw_ctx **hctx,
 	if (blk_mq_tag_is_reserved(data.hctx->sched_tags, rq->internal_tag))
 		data.flags |= BLK_MQ_REQ_RESERVED;
 
+	shared = blk_mq_tag_busy(data.hctx);
 	rq->tag = blk_mq_get_tag(&data);
 	if (rq->tag >= 0) {
-		if (blk_mq_tag_busy(data.hctx)) {
+		if (shared) {
 			rq->rq_flags |= RQF_MQ_INFLIGHT;
 			atomic_inc(&data.hctx->nr_active);
 		}
block/cfq-iosched.c +12 -10
index 82b6c27b3245..f6f180f3aa1c 100644
@@ -4735,12 +4735,13 @@ USEC_SHOW_FUNCTION(cfq_target_latency_us_show, cfqd->cfq_target_latency);
 static ssize_t __FUNC(struct elevator_queue *e, const char *page, size_t count)	\
 {									\
 	struct cfq_data *cfqd = e->elevator_data;			\
-	unsigned int __data;						\
+	unsigned int __data, __min = (MIN), __max = (MAX);		\
+									\
 	cfq_var_store(&__data, (page));					\
-	if (__data < (MIN))						\
-		__data = (MIN);						\
-	else if (__data > (MAX))					\
-		__data = (MAX);						\
+	if (__data < __min)						\
+		__data = __min;						\
+	else if (__data > __max)					\
+		__data = __max;						\
 	if (__CONV)							\
 		*(__PTR) = (u64)__data * NSEC_PER_MSEC;			\
 	else								\
@@ -4769,12 +4770,13 @@ STORE_FUNCTION(cfq_target_latency_store, &cfqd->cfq_target_latency, 1, UINT_MAX,
 static ssize_t __FUNC(struct elevator_queue *e, const char *page, size_t count)	\
 {									\
 	struct cfq_data *cfqd = e->elevator_data;			\
-	unsigned int __data;						\
+	unsigned int __data, __min = (MIN), __max = (MAX);		\
+									\
 	cfq_var_store(&__data, (page));					\
-	if (__data < (MIN))						\
-		__data = (MIN);						\
-	else if (__data > (MAX))					\
-		__data = (MAX);						\
+	if (__data < __min)						\
+		__data = __min;						\
+	else if (__data > __max)					\
+		__data = __max;						\
 	*(__PTR) = (u64)__data * NSEC_PER_USEC;				\
 	return count;							\
 }
drivers/acpi/acpica/hwregs.c +7 -2
index 3de794bcf8fa..69603ba52a3a 100644
@@ -528,13 +528,18 @@ acpi_status acpi_hw_register_read(u32 register_id, u32 *return_value)
 
 		status =
 		    acpi_hw_read(&value64, &acpi_gbl_FADT.xpm2_control_block);
-		value = (u32)value64;
+		if (ACPI_SUCCESS(status)) {
+			value = (u32)value64;
+		}
 		break;
 
 	case ACPI_REGISTER_PM_TIMER:	/* 32-bit access */
 
 		status = acpi_hw_read(&value64, &acpi_gbl_FADT.xpm_timer_block);
-		value = (u32)value64;
+		if (ACPI_SUCCESS(status)) {
+			value = (u32)value64;
+		}
+
 		break;
 
 	case ACPI_REGISTER_SMI_COMMAND_BLOCK:	/* 8-bit access */
drivers/acpi/scan.c +3 -2
index 970dd87d347c..6799d00dd790 100644
@@ -1612,7 +1612,8 @@ static int acpi_add_single_object(struct acpi_device **child,
 	 * Note this must be done before the get power-/wakeup_dev-flags calls.
 	 */
 	if (type == ACPI_BUS_TYPE_DEVICE)
-		acpi_bus_get_status(device);
+		if (acpi_bus_get_status(device) < 0)
+			acpi_set_device_status(device, 0);
 
 	acpi_bus_get_power_flags(device);
 	acpi_bus_get_wakeup_device_flags(device);
@@ -1690,7 +1691,7 @@ static int acpi_bus_type_and_status(acpi_handle handle, int *type,
 		 * acpi_add_single_object updates this once we've an acpi_device
 		 * so that acpi_bus_get_status' quirk handling can be used.
 		 */
-		*sta = 0;
+		*sta = ACPI_STA_DEFAULT;
 		break;
 	case ACPI_TYPE_PROCESSOR:
 		*type = ACPI_BUS_TYPE_PROCESSOR;
drivers/clk/rockchip/clk-rk3399.c +1 -0
index 2a8634a52856..5a628148f3f0 100644
@@ -1523,6 +1523,7 @@ static const char *const rk3399_pmucru_critical_clocks[] __initconst = {
 	"pclk_pmu_src",
 	"fclk_cm0s_src_pmu",
 	"clk_timer_src_pmu",
+	"pclk_rkpwm_pmu",
 };
 
 static void __init rk3399_clk_init(struct device_node *np)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +3 -3
index 7dcbac8af9a7..b60aa7d43cb7 100644
@@ -1579,9 +1579,9 @@ struct amdgpu_device {
 	DECLARE_HASHTABLE(mn_hash, 7);
 
 	/* tracking pinned memory */
-	u64 vram_pin_size;
-	u64 invisible_pin_size;
-	u64 gart_pin_size;
+	atomic64_t vram_pin_size;
+	atomic64_t visible_pin_size;
+	atomic64_t gart_pin_size;
 
 	/* amdkfd interface */
 	struct kfd_dev          *kfd;
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -1
index 9c85a90be293..5a196ec49be8 100644
@@ -257,7 +257,7 @@ static void amdgpu_cs_get_threshold_for_moves(struct amdgpu_device *adev,
 		return;
 	}
 
-	total_vram = adev->gmc.real_vram_size - adev->vram_pin_size;
+	total_vram = adev->gmc.real_vram_size - atomic64_read(&adev->vram_pin_size);
 	used_vram = amdgpu_vram_mgr_usage(&adev->mman.bdev.man[TTM_PL_VRAM]);
 	free_vram = used_vram >= total_vram ? 0 : total_vram - used_vram;
 
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +11 -12
index 91517b166a3b..063f9aa96946 100644
@@ -494,13 +494,13 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
 	case AMDGPU_INFO_VRAM_GTT: {
 		struct drm_amdgpu_info_vram_gtt vram_gtt;
 
-		vram_gtt.vram_size = adev->gmc.real_vram_size;
-		vram_gtt.vram_size -= adev->vram_pin_size;
-		vram_gtt.vram_cpu_accessible_size = adev->gmc.visible_vram_size;
-		vram_gtt.vram_cpu_accessible_size -= (adev->vram_pin_size - adev->invisible_pin_size);
+		vram_gtt.vram_size = adev->gmc.real_vram_size -
+			atomic64_read(&adev->vram_pin_size);
+		vram_gtt.vram_cpu_accessible_size = adev->gmc.visible_vram_size -
+			atomic64_read(&adev->visible_pin_size);
 		vram_gtt.gtt_size = adev->mman.bdev.man[TTM_PL_TT].size;
 		vram_gtt.gtt_size *= PAGE_SIZE;
-		vram_gtt.gtt_size -= adev->gart_pin_size;
+		vram_gtt.gtt_size -= atomic64_read(&adev->gart_pin_size);
 		return copy_to_user(out, &vram_gtt,
 				    min((size_t)size, sizeof(vram_gtt))) ? -EFAULT : 0;
 	}
@@ -509,17 +509,16 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
 
 		memset(&mem, 0, sizeof(mem));
 		mem.vram.total_heap_size = adev->gmc.real_vram_size;
-		mem.vram.usable_heap_size =
-			adev->gmc.real_vram_size - adev->vram_pin_size;
+		mem.vram.usable_heap_size = adev->gmc.real_vram_size -
+			atomic64_read(&adev->vram_pin_size);
 		mem.vram.heap_usage =
 			amdgpu_vram_mgr_usage(&adev->mman.bdev.man[TTM_PL_VRAM]);
 		mem.vram.max_allocation = mem.vram.usable_heap_size * 3 / 4;
 
 		mem.cpu_accessible_vram.total_heap_size =
 			adev->gmc.visible_vram_size;
-		mem.cpu_accessible_vram.usable_heap_size =
-			adev->gmc.visible_vram_size -
-			(adev->vram_pin_size - adev->invisible_pin_size);
+		mem.cpu_accessible_vram.usable_heap_size = adev->gmc.visible_vram_size -
+			atomic64_read(&adev->visible_pin_size);
 		mem.cpu_accessible_vram.heap_usage =
 			amdgpu_vram_mgr_vis_usage(&adev->mman.bdev.man[TTM_PL_VRAM]);
 		mem.cpu_accessible_vram.max_allocation =
@@ -527,8 +526,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
 
 		mem.gtt.total_heap_size = adev->mman.bdev.man[TTM_PL_TT].size;
 		mem.gtt.total_heap_size *= PAGE_SIZE;
-		mem.gtt.usable_heap_size = mem.gtt.total_heap_size
-			- adev->gart_pin_size;
+		mem.gtt.usable_heap_size = mem.gtt.total_heap_size -
+			atomic64_read(&adev->gart_pin_size);
 		mem.gtt.heap_usage =
 			amdgpu_gtt_mgr_usage(&adev->mman.bdev.man[TTM_PL_TT]);
 		mem.gtt.max_allocation = mem.gtt.usable_heap_size * 3 / 4;
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +29 -9
index 3526efa8960e..3873c3353020 100644
@@ -50,11 +50,35 @@ static bool amdgpu_need_backup(struct amdgpu_device *adev)
 	return true;
 }
 
+/**
+ * amdgpu_bo_subtract_pin_size - Remove BO from pin_size accounting
+ *
+ * @bo: &amdgpu_bo buffer object
+ *
+ * This function is called when a BO stops being pinned, and updates the
+ * &amdgpu_device pin_size values accordingly.
+ */
+static void amdgpu_bo_subtract_pin_size(struct amdgpu_bo *bo)
+{
+	struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
+
+	if (bo->tbo.mem.mem_type == TTM_PL_VRAM) {
+		atomic64_sub(amdgpu_bo_size(bo), &adev->vram_pin_size);
+		atomic64_sub(amdgpu_vram_mgr_bo_visible_size(bo),
+			     &adev->visible_pin_size);
+	} else if (bo->tbo.mem.mem_type == TTM_PL_TT) {
+		atomic64_sub(amdgpu_bo_size(bo), &adev->gart_pin_size);
+	}
+}
+
 static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo)
 {
 	struct amdgpu_device *adev = amdgpu_ttm_adev(tbo->bdev);
 	struct amdgpu_bo *bo = ttm_to_amdgpu_bo(tbo);
 
+	if (bo->pin_count > 0)
+		amdgpu_bo_subtract_pin_size(bo);
+
 	if (bo->kfd_bo)
 		amdgpu_amdkfd_unreserve_system_memory_limit(bo);
 
@@ -761,10 +785,11 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
 
 	domain = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type);
 	if (domain == AMDGPU_GEM_DOMAIN_VRAM) {
-		adev->vram_pin_size += amdgpu_bo_size(bo);
-		adev->invisible_pin_size += amdgpu_vram_mgr_bo_invisible_size(bo);
+		atomic64_add(amdgpu_bo_size(bo), &adev->vram_pin_size);
+		atomic64_add(amdgpu_vram_mgr_bo_visible_size(bo),
+			     &adev->visible_pin_size);
 	} else if (domain == AMDGPU_GEM_DOMAIN_GTT) {
-		adev->gart_pin_size += amdgpu_bo_size(bo);
+		atomic64_add(amdgpu_bo_size(bo), &adev->gart_pin_size);
 	}
 
 error:
@@ -790,12 +815,7 @@ int amdgpu_bo_unpin(struct amdgpu_bo *bo)
 	if (bo->pin_count)
 		return 0;
 
-	if (bo->tbo.mem.mem_type == TTM_PL_VRAM) {
-		adev->vram_pin_size -= amdgpu_bo_size(bo);
-		adev->invisible_pin_size -= amdgpu_vram_mgr_bo_invisible_size(bo);
-	} else if (bo->tbo.mem.mem_type == TTM_PL_TT) {
-		adev->gart_pin_size -= amdgpu_bo_size(bo);
-	}
+	amdgpu_bo_subtract_pin_size(bo);
 
 	for (i = 0; i < bo->placement.num_placement; i++) {
 		bo->placements[i].lpfn = 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1 -1
index a44c3d58fef4..2ec20348b983 100644
@@ -1157,7 +1157,7 @@ static ssize_t amdgpu_hwmon_show_vddnb(struct device *dev,
 	int r, size = sizeof(vddnb);
 
 	/* only APUs have vddnb */
-	if  (adev->flags & AMD_IS_APU)
+	if  (!(adev->flags & AMD_IS_APU))
 		return -EINVAL;
 
 	/* Can't get voltage when the card is off */
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +5 -0
index 9f1a5bd39ae8..5b39d1399630 100644
@@ -131,6 +131,11 @@ psp_cmd_submit_buf(struct psp_context *psp,
 		msleep(1);
 	}
 
+	if (ucode) {
+		ucode->tmr_mc_addr_lo = psp->cmd_buf_mem->resp.fw_addr_lo;
+		ucode->tmr_mc_addr_hi = psp->cmd_buf_mem->resp.fw_addr_hi;
+	}
+
 	return ret;
 }
 
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c +6 -15
index 86a0715d9431..1cafe8d83a4d 100644
@@ -53,9 +53,8 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
 						  int fd,
 						  enum drm_sched_priority priority)
 {
-	struct file *filp = fcheck(fd);
+	struct file *filp = fget(fd);
 	struct drm_file *file;
-	struct pid *pid;
 	struct amdgpu_fpriv *fpriv;
 	struct amdgpu_ctx *ctx;
 	uint32_t id;
@@ -63,20 +62,12 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
 	if (!filp)
 		return -EINVAL;
 
-	pid = get_pid(((struct drm_file *)filp->private_data)->pid);
+	file = filp->private_data;
+	fpriv = file->driver_priv;
+	idr_for_each_entry(&fpriv->ctx_mgr.ctx_handles, ctx, id)
+		amdgpu_ctx_priority_override(ctx, priority);
 
-	mutex_lock(&adev->ddev->filelist_mutex);
-	list_for_each_entry(file, &adev->ddev->filelist, lhead) {
-		if (file->pid != pid)
-			continue;
-
-		fpriv = file->driver_priv;
-		idr_for_each_entry(&fpriv->ctx_mgr.ctx_handles, ctx, id)
-				amdgpu_ctx_priority_override(ctx, priority);
-	}
-	mutex_unlock(&adev->ddev->filelist_mutex);
-
-	put_pid(pid);
+	fput(filp);
 
 	return 0;
 }
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1 -1
index e5da4654b630..8b3cc6687769 100644
@@ -73,7 +73,7 @@ bool amdgpu_gtt_mgr_has_gart_addr(struct ttm_mem_reg *mem);
 uint64_t amdgpu_gtt_mgr_usage(struct ttm_mem_type_manager *man);
 int amdgpu_gtt_mgr_recover(struct ttm_mem_type_manager *man);
 
-u64 amdgpu_vram_mgr_bo_invisible_size(struct amdgpu_bo *bo);
+u64 amdgpu_vram_mgr_bo_visible_size(struct amdgpu_bo *bo);
 uint64_t amdgpu_vram_mgr_usage(struct ttm_mem_type_manager *man);
 uint64_t amdgpu_vram_mgr_vis_usage(struct ttm_mem_type_manager *man);
 
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +4 -0
index 08e38579af24..bdc472b6e641 100644
@@ -194,6 +194,7 @@ enum AMDGPU_UCODE_ID {
 	AMDGPU_UCODE_ID_SMC,
 	AMDGPU_UCODE_ID_UVD,
 	AMDGPU_UCODE_ID_VCE,
+	AMDGPU_UCODE_ID_VCN,
 	AMDGPU_UCODE_ID_MAXIMUM,
 };
 
@@ -226,6 +227,9 @@ struct amdgpu_firmware_info {
 	void *kaddr;
 	/* ucode_size_bytes */
 	uint32_t ucode_size;
+	/* starting tmr mc address */
+	uint32_t tmr_mc_addr_lo;
+	uint32_t tmr_mc_addr_hi;
 };
 
 void amdgpu_ucode_print_mc_hdr(const struct common_firmware_header *hdr);
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +10 -7
index 1b4ad9b2a755..bee49991c1ff 100644
@@ -111,9 +111,10 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
 			version_major, version_minor, family_id);
 	}
 
-	bo_size = AMDGPU_GPU_PAGE_ALIGN(le32_to_cpu(hdr->ucode_size_bytes) + 8)
-		  +  AMDGPU_VCN_STACK_SIZE + AMDGPU_VCN_HEAP_SIZE
+	bo_size = AMDGPU_VCN_STACK_SIZE + AMDGPU_VCN_HEAP_SIZE
 		  +  AMDGPU_VCN_SESSION_SIZE * 40;
+	if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)
+		bo_size += AMDGPU_GPU_PAGE_ALIGN(le32_to_cpu(hdr->ucode_size_bytes) + 8);
 	r = amdgpu_bo_create_kernel(adev, bo_size, PAGE_SIZE,
 				    AMDGPU_GEM_DOMAIN_VRAM, &adev->vcn.vcpu_bo,
 				    &adev->vcn.gpu_addr, &adev->vcn.cpu_addr);
@@ -187,11 +188,13 @@ int amdgpu_vcn_resume(struct amdgpu_device *adev)
 		unsigned offset;
 
 		hdr = (const struct common_firmware_header *)adev->vcn.fw->data;
-		offset = le32_to_cpu(hdr->ucode_array_offset_bytes);
-		memcpy_toio(adev->vcn.cpu_addr, adev->vcn.fw->data + offset,
-			    le32_to_cpu(hdr->ucode_size_bytes));
-		size -= le32_to_cpu(hdr->ucode_size_bytes);
-		ptr += le32_to_cpu(hdr->ucode_size_bytes);
+		if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
+			offset = le32_to_cpu(hdr->ucode_array_offset_bytes);
+			memcpy_toio(adev->vcn.cpu_addr, adev->vcn.fw->data + offset,
+				    le32_to_cpu(hdr->ucode_size_bytes));
+			size -= le32_to_cpu(hdr->ucode_size_bytes);
+			ptr += le32_to_cpu(hdr->ucode_size_bytes);
+		}
 		memset_io(ptr, 0, size);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +8 -12
index b6333f92ba45..ef4784458800 100644
@@ -97,33 +97,29 @@ static u64 amdgpu_vram_mgr_vis_size(struct amdgpu_device *adev,
 }
 
 /**
- * amdgpu_vram_mgr_bo_invisible_size - CPU invisible BO size
+ * amdgpu_vram_mgr_bo_visible_size - CPU visible BO size
  *
  * @bo: &amdgpu_bo buffer object (must be in VRAM)
  *
  * Returns:
- * How much of the given &amdgpu_bo buffer object lies in CPU invisible VRAM.
+ * How much of the given &amdgpu_bo buffer object lies in CPU visible VRAM.
  */
-u64 amdgpu_vram_mgr_bo_invisible_size(struct amdgpu_bo *bo)
+u64 amdgpu_vram_mgr_bo_visible_size(struct amdgpu_bo *bo)
 {
 	struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
 	struct ttm_mem_reg *mem = &bo->tbo.mem;
 	struct drm_mm_node *nodes = mem->mm_node;
 	unsigned pages = mem->num_pages;
-	u64 usage = 0;
+	u64 usage;
 
 	if (adev->gmc.visible_vram_size == adev->gmc.real_vram_size)
-		return 0;
+		return amdgpu_bo_size(bo);
 
 	if (mem->start >= adev->gmc.visible_vram_size >> PAGE_SHIFT)
-		return amdgpu_bo_size(bo);
+		return 0;
 
-	while (nodes && pages) {
-		usage += nodes->size << PAGE_SHIFT;
-		usage -= amdgpu_vram_mgr_vis_size(adev, nodes);
-		pages -= nodes->size;
-		++nodes;
-	}
+	for (usage = 0; nodes && pages; pages -= nodes->size, nodes++)
+		usage += amdgpu_vram_mgr_vis_size(adev, nodes);
 
 	return usage;
 }
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -1
index a69153435ea7..8f0ac805ecd2 100644
@@ -3433,7 +3433,7 @@ static void gfx_v9_0_enter_rlc_safe_mode(struct amdgpu_device *adev)
 
 		/* wait for RLC_SAFE_MODE */
 		for (i = 0; i < adev->usec_timeout; i++) {
-			if (!REG_GET_FIELD(SOC15_REG_OFFSET(GC, 0, mmRLC_SAFE_MODE), RLC_SAFE_MODE, CMD))
+			if (!REG_GET_FIELD(RREG32_SOC15(GC, 0, mmRLC_SAFE_MODE), RLC_SAFE_MODE, CMD))
 				break;
 			udelay(1);
 		}
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c +3 -0
index 0ff136d02d9b..02be34e72ed9 100644
@@ -88,6 +88,9 @@ psp_v10_0_get_fw_type(struct amdgpu_firmware_info *ucode, enum psp_gfx_fw_type *
 	case AMDGPU_UCODE_ID_VCE:
 		*type = GFX_FW_TYPE_VCE;
 		break;
+	case AMDGPU_UCODE_ID_VCN:
+		*type = GFX_FW_TYPE_VCN;
+		break;
 	case AMDGPU_UCODE_ID_MAXIMUM:
 	default:
 		return -EINVAL;
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +1 -2
index bfddf97dd13e..a16eebc05d12 100644
@@ -1569,7 +1569,6 @@ static const struct amdgpu_ring_funcs uvd_v6_0_ring_phys_funcs = {
 static const struct amdgpu_ring_funcs uvd_v6_0_ring_vm_funcs = {
 	.type = AMDGPU_RING_TYPE_UVD,
 	.align_mask = 0xf,
-	.nop = PACKET0(mmUVD_NO_OP, 0),
 	.support_64bit_ptrs = false,
 	.get_rptr = uvd_v6_0_ring_get_rptr,
 	.get_wptr = uvd_v6_0_ring_get_wptr,
@@ -1587,7 +1586,7 @@ static const struct amdgpu_ring_funcs uvd_v6_0_ring_vm_funcs = {
 	.emit_hdp_flush = uvd_v6_0_ring_emit_hdp_flush,
 	.test_ring = uvd_v6_0_ring_test_ring,
 	.test_ib = amdgpu_uvd_ring_test_ib,
-	.insert_nop = amdgpu_ring_insert_nop,
+	.insert_nop = uvd_v6_0_ring_insert_nop,
 	.pad_ib = amdgpu_ring_generic_pad_ib,
 	.begin_use = amdgpu_uvd_ring_begin_use,
 	.end_use = amdgpu_uvd_ring_end_use,
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +31 -9
index 29684c3ea4ef..700119168067 100644
@@ -90,6 +90,16 @@ static int vcn_v1_0_sw_init(void *handle)
 	if (r)
 		return r;
 
+	if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
+		const struct common_firmware_header *hdr;
+		hdr = (const struct common_firmware_header *)adev->vcn.fw->data;
+		adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].ucode_id = AMDGPU_UCODE_ID_VCN;
+		adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw;
+		adev->firmware.fw_size +=
+			ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE);
+		DRM_INFO("PSP loading VCN firmware\n");
+	}
+
 	r = amdgpu_vcn_resume(adev);
 	if (r)
 		return r;
@@ -241,26 +251,38 @@ static int vcn_v1_0_resume(void *handle)
 static void vcn_v1_0_mc_resume(struct amdgpu_device *adev)
 {
 	uint32_t size = AMDGPU_GPU_PAGE_ALIGN(adev->vcn.fw->size + 4);
-
-	WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW,
+	uint32_t offset;
+
+	if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
+		WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW,
+			     (adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].tmr_mc_addr_lo));
+		WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,
+			     (adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].tmr_mc_addr_hi));
+		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0, 0);
+		offset = 0;
+	} else {
+		WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW,
 			lower_32_bits(adev->vcn.gpu_addr));
-	WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,
+		WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,
 			upper_32_bits(adev->vcn.gpu_addr));
-	WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0,
-				AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
+		offset = size;
+		WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET0,
+			     AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
+	}
+
 	WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_SIZE0, size);
 
 	WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE1_64BIT_BAR_LOW,
-			lower_32_bits(adev->vcn.gpu_addr + size));
+		     lower_32_bits(adev->vcn.gpu_addr + offset));
 	WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE1_64BIT_BAR_HIGH,
-			upper_32_bits(adev->vcn.gpu_addr + size));
+		     upper_32_bits(adev->vcn.gpu_addr + offset));
 	WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET1, 0);
 	WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_SIZE1, AMDGPU_VCN_HEAP_SIZE);
 
 	WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE2_64BIT_BAR_LOW,
-			lower_32_bits(adev->vcn.gpu_addr + size + AMDGPU_VCN_HEAP_SIZE));
+		     lower_32_bits(adev->vcn.gpu_addr + offset + AMDGPU_VCN_HEAP_SIZE));
 	WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE2_64BIT_BAR_HIGH,
-			upper_32_bits(adev->vcn.gpu_addr + size + AMDGPU_VCN_HEAP_SIZE));
+		     upper_32_bits(adev->vcn.gpu_addr + offset + AMDGPU_VCN_HEAP_SIZE));
 	WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_OFFSET2, 0);
 	WREG32_SOC15(UVD, 0, mmUVD_VCPU_CACHE_SIZE2,
 			AMDGPU_VCN_STACK_SIZE + (AMDGPU_VCN_SESSION_SIZE * 40));
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -7
index 770c6b24be0b..e484d0a94bdc 100644
@@ -1334,6 +1334,7 @@ amdgpu_dm_register_backlight_device(struct amdgpu_display_manager *dm)
 	struct backlight_properties props = { 0 };
 
 	props.max_brightness = AMDGPU_MAX_BL_LEVEL;
+	props.brightness = AMDGPU_MAX_BL_LEVEL;
 	props.type = BACKLIGHT_RAW;
 
 	snprintf(bl_name, sizeof(bl_name), "amdgpu_bl%d",
@@ -2123,13 +2124,8 @@ convert_color_depth_from_display_info(const struct drm_connector *connector)
 static enum dc_aspect_ratio
 get_aspect_ratio(const struct drm_display_mode *mode_in)
 {
-	int32_t width = mode_in->crtc_hdisplay * 9;
-	int32_t height = mode_in->crtc_vdisplay * 16;
-
-	if ((width - height) < 10 && (width - height) > -10)
-		return ASPECT_RATIO_16_9;
-	else
-		return ASPECT_RATIO_4_3;
+	/* 1-1 mapping, since both enums follow the HDMI spec. */
+	return (enum dc_aspect_ratio) mode_in->picture_aspect_ratio;
 }
 
 static enum dc_color_space
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +8 -2
index 52f2c01349e3..9bfb040352e9 100644
@@ -98,10 +98,16 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name,
  */
 void amdgpu_dm_crtc_handle_crc_irq(struct drm_crtc *crtc)
 {
-	struct dm_crtc_state *crtc_state = to_dm_crtc_state(crtc->state);
-	struct dc_stream_state *stream_state = crtc_state->stream;
+	struct dm_crtc_state *crtc_state;
+	struct dc_stream_state *stream_state;
 	uint32_t crcs[3];
 
+	if (crtc == NULL)
+		return;
+
+	crtc_state = to_dm_crtc_state(crtc->state);
+	stream_state = crtc_state->stream;
+
 	/* Early return if CRC capture is not enabled. */
 	if (!crtc_state->crc_enabled)
 		return;
drivers/gpu/drm/amd/display/dc/bios/command_table.c +18 -0
index 651e1fd4622f..a558bfaa0c46 100644
@@ -808,6 +808,24 @@ static enum bp_result transmitter_control_v1_5(
 	 * (=1: 8bpp, =1.25: 10bpp, =1.5:12bpp, =2: 16bpp)
 	 * LVDS mode: usPixelClock = pixel clock
 	 */
+	if  (cntl->signal == SIGNAL_TYPE_HDMI_TYPE_A) {
+		switch (cntl->color_depth) {
+		case COLOR_DEPTH_101010:
+			params.usSymClock =
+				cpu_to_le16((le16_to_cpu(params.usSymClock) * 30) / 24);
+			break;
+		case COLOR_DEPTH_121212:
+			params.usSymClock =
+				cpu_to_le16((le16_to_cpu(params.usSymClock) * 36) / 24);
+			break;
+		case COLOR_DEPTH_161616:
+			params.usSymClock =
+				cpu_to_le16((le16_to_cpu(params.usSymClock) * 48) / 24);
+			break;
+		default:
+			break;
+		}
+	}
 
 	if (EXEC_BIOS_CMD_TABLE(UNIPHYTransmitterControl, params))
 		result = BP_RESULT_OK;
drivers/gpu/drm/amd/display/dc/core/dc_link.c +11 -0
index 2fa521812d23..8a7890b03d97 100644
@@ -728,6 +728,17 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
 			break;
 		case EDID_NO_RESPONSE:
 			DC_LOG_ERROR("No EDID read.\n");
+
+			/*
+			 * Abort detection for non-DP connectors if we have
+			 * no EDID
+			 *
+			 * DP needs to report as connected if HDP is high
+			 * even if we have no EDID in order to go to
+			 * fail-safe mode
+			 */
+			if (!dc_is_dp_signal(link->connector_signal))
+				return false;
 		default:
 			break;
 		}
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +53 -15

115 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dc.h +1 -0
index 53c71296f3dd..efe155d50668 100644
@@ -77,6 +77,7 @@ struct dc_caps {
 	bool dual_link_dvi;
 	bool post_blend_color_processing;
 	bool force_dp_tps4_for_cp2520;
+	bool disable_dp_clk_share;
 };
 
 struct dc_dcc_surface_param {
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +2 -2
index dbe3b26b6d9e..f6ec1d3dfd0c 100644
@@ -919,7 +919,7 @@ void dce110_link_encoder_enable_tmds_output(
 	enum bp_result result;
 
 	/* Enable the PHY */
-
+	cntl.connector_obj_id = enc110->base.connector;
 	cntl.action = TRANSMITTER_CONTROL_ENABLE;
 	cntl.engine_id = enc->preferred_engine;
 	cntl.transmitter = enc110->base.transmitter;
@@ -961,7 +961,7 @@ void dce110_link_encoder_enable_dp_output(
 	 * We need to set number of lanes manually.
 	 */
 	configure_encoder(enc110, link_settings);
-
+	cntl.connector_obj_id = enc110->base.connector;
 	cntl.action = TRANSMITTER_CONTROL_ENABLE;
 	cntl.engine_id = enc->preferred_engine;
 	cntl.transmitter = enc110->base.transmitter;
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +1 -1
index 344dd2e69e7c..aa2f03eb46fe 100644
@@ -884,7 +884,7 @@ static bool construct(
 	dc->caps.i2c_speed_in_khz = 40;
 	dc->caps.max_cursor_size = 128;
 	dc->caps.dual_link_dvi = true;
-
+	dc->caps.disable_dp_clk_share = true;
 	for (i = 0; i < pool->base.pipe_count; i++) {
 		pool->base.timing_generators[i] =
 			dce100_timing_generator_create(
drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c +1 -1
index e2994d337044..111c4921987f 100644
@@ -143,7 +143,7 @@ static void wait_for_fbc_state_changed(
 	struct dce110_compressor *cp110,
 	bool enabled)
 {
-	uint8_t counter = 0;
+	uint16_t counter = 0;
 	uint32_t addr = mmFBC_STATUS;
 	uint32_t value;
 
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +3 -1
index c29052b6da5a..7c0b1d7aa9b8 100644
@@ -1939,7 +1939,9 @@ static void dce110_reset_hw_ctx_wrap(
 			pipe_ctx_old->plane_res.mi->funcs->free_mem_input(
 					pipe_ctx_old->plane_res.mi, dc->current_state->stream_count);
 
-			if (old_clk)
+			if (old_clk && 0 == resource_get_clock_source_reference(&context->res_ctx,
+										dc->res_pool,
+										old_clk))
 				old_clk->funcs->cs_power_down(old_clk);
 
 			dc->hwss.disable_plane(dc, pipe_ctx_old);
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +3 -0
index 48a068964722..6f4992bdc9ce 100644
@@ -902,6 +902,7 @@ static bool dce80_construct(
 	}
 
 	dc->caps.max_planes =  pool->base.pipe_count;
+	dc->caps.disable_dp_clk_share = true;
 
 	if (!resource_construct(num_virtual_links, dc, &pool->base,
 			&res_create_funcs))
@@ -1087,6 +1088,7 @@ static bool dce81_construct(
 	}
 
 	dc->caps.max_planes =  pool->base.pipe_count;
+	dc->caps.disable_dp_clk_share = true;
 
 	if (!resource_construct(num_virtual_links, dc, &pool->base,
 			&res_create_funcs))
@@ -1268,6 +1270,7 @@ static bool dce83_construct(
 	}
 
 	dc->caps.max_planes =  pool->base.pipe_count;
+	dc->caps.disable_dp_clk_share = true;
 
 	if (!resource_construct(num_virtual_links, dc, &pool->base,
 			&res_create_funcs))
drivers/gpu/drm/amd/display/dc/inc/resource.h +5 -0
index 640a647f4611..abf42a7d0859 100644
@@ -102,6 +102,11 @@ void resource_reference_clock_source(
 		const struct resource_pool *pool,
 		struct clock_source *clock_source);
 
+int resource_get_clock_source_reference(
+		struct resource_context *res_ctx,
+		const struct resource_pool *pool,
+		struct clock_source *clock_source);
+
 bool resource_are_streams_timing_synchronizable(
 		struct dc_stream_state *stream1,
 		struct dc_stream_state *stream2);
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c +43 -0

49 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c +3 -2
index 50690c72b2ea..617557bd8c24 100644
@@ -244,6 +244,7 @@ static int smu8_initialize_dpm_defaults(struct pp_hwmgr *hwmgr)
 	return 0;
 }
 
+/* convert form 8bit vid to real voltage in mV*4 */
 static uint32_t smu8_convert_8Bit_index_to_voltage(
 			struct pp_hwmgr *hwmgr, uint16_t voltage)
 {
@@ -1702,13 +1703,13 @@ static int smu8_read_sensor(struct pp_hwmgr *hwmgr, int idx,
 	case AMDGPU_PP_SENSOR_VDDNB:
 		tmp = (cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixSMUSVI_NB_CURRENTVID) &
 			CURRENT_NB_VID_MASK) >> CURRENT_NB_VID__SHIFT;
-		vddnb = smu8_convert_8Bit_index_to_voltage(hwmgr, tmp);
+		vddnb = smu8_convert_8Bit_index_to_voltage(hwmgr, tmp) / 4;
 		*((uint32_t *)value) = vddnb;
 		return 0;
 	case AMDGPU_PP_SENSOR_VDDGFX:
 		tmp = (cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixSMUSVI_GFX_CURRENTVID) &
 			CURRENT_GFX_VID_MASK) >> CURRENT_GFX_VID__SHIFT;
-		vddgfx = smu8_convert_8Bit_index_to_voltage(hwmgr, (u16)tmp);
+		vddgfx = smu8_convert_8Bit_index_to_voltage(hwmgr, (u16)tmp) / 4;
 		*((uint32_t *)value) = vddgfx;
 		return 0;
 	case AMDGPU_PP_SENSOR_UVD_VCLK:
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +1 -1
index c98e5de777cd..fcd2808874bf 100644
@@ -490,7 +490,7 @@ static int vega12_get_number_dpm_level(struct pp_hwmgr *hwmgr,
 static int vega12_get_dpm_frequency_by_index(struct pp_hwmgr *hwmgr,
 		PPCLK_e clkID, uint32_t index, uint32_t *clock)
 {
-	int result;
+	int result = 0;
 
 	/*
 	 *SMU expects the Clock ID to be in the top 16 bits.
drivers/gpu/drm/drm_edid.c +5 -1
index a5808382bdf0..c7b4481c90d7 100644
@@ -116,6 +116,9 @@ static const struct edid_quirk {
 	/* CPT panel of Asus UX303LA reports 8 bpc, but is a 6 bpc panel */
 	{ "CPT", 0x17df, EDID_QUIRK_FORCE_6BPC },
 
+	/* SDC panel of Lenovo B50-80 reports 8 bpc, but is a 6 bpc panel */
+	{ "SDC", 0x3652, EDID_QUIRK_FORCE_6BPC },
+
 	/* Belinea 10 15 55 */
 	{ "MAX", 1516, EDID_QUIRK_PREFER_LARGE_60 },
 	{ "MAX", 0x77e, EDID_QUIRK_PREFER_LARGE_60 },
@@ -163,8 +166,9 @@ static const struct edid_quirk {
 	/* Rotel RSX-1058 forwards sink's EDID but only does HDMI 1.1*/
 	{ "ETR", 13896, EDID_QUIRK_FORCE_8BPC },
 
-	/* HTC Vive VR Headset */
+	/* HTC Vive and Vive Pro VR Headsets */
 	{ "HVR", 0xaa01, EDID_QUIRK_NON_DESKTOP },
+	{ "HVR", 0xaa02, EDID_QUIRK_NON_DESKTOP },
 
 	/* Oculus Rift DK1, DK2, and CV1 VR Headsets */
 	{ "OVR", 0x0001, EDID_QUIRK_NON_DESKTOP },
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +1 -0
index 686f6552db48..3ef440b235e5 100644
@@ -799,6 +799,7 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 
 free_buffer:
 	etnaviv_cmdbuf_free(&gpu->buffer);
+	gpu->buffer.suballoc = NULL;
 destroy_iommu:
 	etnaviv_iommu_destroy(gpu->mmu);
 	gpu->mmu = NULL;
drivers/gpu/drm/i915/i915_drv.c +0 -10
index 9c449b8d8eab..015f9e93419d 100644
@@ -919,7 +919,6 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv,
 	spin_lock_init(&dev_priv->uncore.lock);
 
 	mutex_init(&dev_priv->sb_lock);
-	mutex_init(&dev_priv->modeset_restore_lock);
 	mutex_init(&dev_priv->av_mutex);
 	mutex_init(&dev_priv->wm.wm_mutex);
 	mutex_init(&dev_priv->pps_mutex);
@@ -1560,11 +1559,6 @@ static int i915_drm_suspend(struct drm_device *dev)
 	pci_power_t opregion_target_state;
 	int error;
 
-	/* ignore lid events during suspend */
-	mutex_lock(&dev_priv->modeset_restore_lock);
-	dev_priv->modeset_restore = MODESET_SUSPENDED;
-	mutex_unlock(&dev_priv->modeset_restore_lock);
-
 	disable_rpm_wakeref_asserts(dev_priv);
 
 	/* We do a lot of poking in a lot of registers, make sure they work
@@ -1764,10 +1758,6 @@ static int i915_drm_resume(struct drm_device *dev)
 
 	intel_fbdev_set_suspend(dev, FBINFO_STATE_RUNNING, false);
 
-	mutex_lock(&dev_priv->modeset_restore_lock);
-	dev_priv->modeset_restore = MODESET_DONE;
-	mutex_unlock(&dev_priv->modeset_restore_lock);
-
 	intel_opregion_notify_adapter(dev_priv, PCI_D0);
 
 	enable_rpm_wakeref_asserts(dev_priv);
drivers/gpu/drm/i915/i915_drv.h +0 -8
index 71e1aa54f774..7c22fac3aa04 100644
@@ -1003,12 +1003,6 @@ struct i915_gem_mm {
 #define I915_ENGINE_DEAD_TIMEOUT  (4 * HZ)  /* Seqno, head and subunits dead */
 #define I915_SEQNO_DEAD_TIMEOUT   (12 * HZ) /* Seqno dead with active head */
 
-enum modeset_restore {
-	MODESET_ON_LID_OPEN,
-	MODESET_DONE,
-	MODESET_SUSPENDED,
-};
-
 #define DP_AUX_A 0x40
 #define DP_AUX_B 0x10
 #define DP_AUX_C 0x20
@@ -1740,8 +1734,6 @@ struct drm_i915_private {
 
 	unsigned long quirks;
 
-	enum modeset_restore modeset_restore;
-	struct mutex modeset_restore_lock;
 	struct drm_atomic_state *modeset_restore_state;
 	struct drm_modeset_acquire_ctx reset_ctx;
 
drivers/gpu/drm/i915/i915_reg.h +1 -0
index 7720569f2024..6e048ee88e3f 100644
@@ -8825,6 +8825,7 @@ enum skl_power_gate {
 #define  TRANS_MSA_10_BPC		(2<<5)
 #define  TRANS_MSA_12_BPC		(3<<5)
 #define  TRANS_MSA_16_BPC		(4<<5)
+#define  TRANS_MSA_CEA_RANGE		(1<<3)
 
 /* LCPLL Control */
 #define LCPLL_CTL			_MMIO(0x130040)
drivers/gpu/drm/i915/intel_ddi.c +4 -0
index fed26d6e4e27..e195c287c263 100644
@@ -1659,6 +1659,10 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state)
 	WARN_ON(transcoder_is_dsi(cpu_transcoder));
 
 	temp = TRANS_MSA_SYNC_CLK;
+
+	if (crtc_state->limited_color_range)
+		temp |= TRANS_MSA_CEA_RANGE;
+
 	switch (crtc_state->pipe_bpp) {
 	case 18:
 		temp |= TRANS_MSA_6_BPC;
drivers/gpu/drm/i915/intel_dp.c +19 -14
index 16faea30114a..8e465095fe06 100644
@@ -4293,18 +4293,6 @@ intel_dp_needs_link_retrain(struct intel_dp *intel_dp)
 	return !drm_dp_channel_eq_ok(link_status, intel_dp->lane_count);
 }
 
-/*
- * If display is now connected check links status,
- * there has been known issues of link loss triggering
- * long pulse.
- *
- * Some sinks (eg. ASUS PB287Q) seem to perform some
- * weird HPD ping pong during modesets. So we can apparently
- * end up with HPD going low during a modeset, and then
- * going back up soon after. And once that happens we must
- * retrain the link to get a picture. That's in case no
- * userspace component reacted to intermittent HPD dip.
- */
 int intel_dp_retrain_link(struct intel_encoder *encoder,
 			  struct drm_modeset_acquire_ctx *ctx)
 {
@@ -4794,7 +4782,8 @@ intel_dp_unset_edid(struct intel_dp *intel_dp)
 }
 
 static int
-intel_dp_long_pulse(struct intel_connector *connector)
+intel_dp_long_pulse(struct intel_connector *connector,
+		    struct drm_modeset_acquire_ctx *ctx)
 {
 	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
 	struct intel_dp *intel_dp = intel_attached_dp(&connector->base);
@@ -4853,6 +4842,22 @@ intel_dp_long_pulse(struct intel_connector *connector)
 		 */
 		status = connector_status_disconnected;
 		goto out;
+	} else {
+		/*
+		 * If display is now connected check links status,
+		 * there has been known issues of link loss triggering
+		 * long pulse.
+		 *
+		 * Some sinks (eg. ASUS PB287Q) seem to perform some
+		 * weird HPD ping pong during modesets. So we can apparently
+		 * end up with HPD going low during a modeset, and then
+		 * going back up soon after. And once that happens we must
+		 * retrain the link to get a picture. That's in case no
+		 * userspace component reacted to intermittent HPD dip.
+		 */
+		struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
+
+		intel_dp_retrain_link(encoder, ctx);
 	}
 
 	/*
@@ -4914,7 +4919,7 @@ intel_dp_detect(struct drm_connector *connector,
 				return ret;
 		}
 
-		status = intel_dp_long_pulse(intel_dp->attached_connector);
+		status = intel_dp_long_pulse(intel_dp->attached_connector, ctx);
 	}
 
 	intel_dp->detect_done = false;
drivers/gpu/drm/i915/intel_hdmi.c +6 -2
index d8cb53ef4351..c8640959a7fc 100644
@@ -933,8 +933,12 @@ static int intel_hdmi_hdcp_write(struct intel_digital_port *intel_dig_port,
 
 	ret = i2c_transfer(adapter, &msg, 1);
 	if (ret == 1)
-		return 0;
-	return ret >= 0 ? -EIO : ret;
+		ret = 0;
+	else if (ret >= 0)
+		ret = -EIO;
+
+	kfree(write_buf);
+	return ret;
 }
 
 static
drivers/gpu/drm/i915/intel_lpe_audio.c +1 -3
index b4941101f21a..cdf19553ffac 100644
@@ -127,9 +127,7 @@ lpe_audio_platdev_create(struct drm_i915_private *dev_priv)
 		return platdev;
 	}
 
-	pm_runtime_forbid(&platdev->dev);
-	pm_runtime_set_active(&platdev->dev);
-	pm_runtime_enable(&platdev->dev);
+	pm_runtime_no_callbacks(&platdev->dev);
 
 	return platdev;
 }
drivers/gpu/drm/i915/intel_lspcon.c +1 -1
index 8ae8f42f430a..6b6758419fb3 100644
@@ -74,7 +74,7 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,
 	DRM_DEBUG_KMS("Waiting for LSPCON mode %s to settle\n",
 		      lspcon_mode_name(mode));
 
-	wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 100);
+	wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 400);
 	if (current_mode != mode)
 		DRM_ERROR("LSPCON mode hasn't settled\n");
 
drivers/gpu/drm/i915/intel_lvds.c +2 -134

169 lines not on this page · raw message

drivers/gpu/drm/rockchip/rockchip_drm_vop.c +48 -21

140 lines not on this page · raw message

drivers/gpu/drm/rockchip/rockchip_lvds.c +3 -1
index e67f4ea28c0e..051b8be3dc0f 100644
@@ -363,8 +363,10 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
 		of_property_read_u32(endpoint, "reg", &endpoint_id);
 		ret = drm_of_find_panel_or_bridge(dev->of_node, 1, endpoint_id,
 						  &lvds->panel, &lvds->bridge);
-		if (!ret)
+		if (!ret) {
+			of_node_put(endpoint);
 			break;
+		}
 	}
 	if (!child_count) {
 		DRM_DEV_ERROR(dev, "lvds port does not have any children\n");
drivers/hid/hid-redragon.c +1 -25
index daf59578bf93..73c9d4c4fa34 100644
@@ -44,29 +44,6 @@ static __u8 *redragon_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 	return rdesc;
 }
 
-static int redragon_probe(struct hid_device *dev,
-	const struct hid_device_id *id)
-{
-	int ret;
-
-	ret = hid_parse(dev);
-	if (ret) {
-		hid_err(dev, "parse failed\n");
-		return ret;
-	}
-
-	/* do not register unused input device */
-	if (dev->maxapplication == 1)
-		return 0;
-
-	ret = hid_hw_start(dev, HID_CONNECT_DEFAULT);
-	if (ret) {
-		hid_err(dev, "hw start failed\n");
-		return ret;
-	}
-
-	return 0;
-}
 static const struct hid_device_id redragon_devices[] = {
 	{HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_REDRAGON_ASURA)},
 	{}
@@ -77,8 +54,7 @@ MODULE_DEVICE_TABLE(hid, redragon_devices);
 static struct hid_driver redragon_driver = {
 	.name = "redragon",
 	.id_table = redragon_devices,
-	.report_fixup = redragon_report_fixup,
-	.probe = redragon_probe
+	.report_fixup = redragon_report_fixup
 };
 
 module_hid_driver(redragon_driver);
drivers/i2c/i2c-core-acpi.c +5 -3
index b8f303dea305..32affd3fa8bd 100644
@@ -453,8 +453,12 @@ static int acpi_gsb_i2c_read_bytes(struct i2c_client *client,
 		else
 			dev_err(&client->adapter->dev, "i2c read %d bytes from client@%#x starting at reg %#x failed, error: %d\n",
 				data_len, client->addr, cmd, ret);
-	} else {
+	/* 2 transfers must have completed successfully */
+	} else if (ret == 2) {
 		memcpy(data, buffer, data_len);
+		ret = 0;
+	} else {
+		ret = -EIO;
 	}
 
 	kfree(buffer);
@@ -595,8 +599,6 @@ i2c_acpi_space_handler(u32 function, acpi_physical_address command,
 		if (action == ACPI_READ) {
 			status = acpi_gsb_i2c_read_bytes(client, command,
 					gsb->data, info->access_length);
-			if (status > 0)
-				status = 0;
 		} else {
 			status = acpi_gsb_i2c_write_bytes(client, command,
 					gsb->data, info->access_length);
drivers/infiniband/hw/hfi1/affinity.c +21 -3
index fbe7198a715a..bedd5fba33b0 100644
@@ -198,7 +198,7 @@ int node_affinity_init(void)
 		while ((dev = pci_get_device(ids->vendor, ids->device, dev))) {
 			node = pcibus_to_node(dev->bus);
 			if (node < 0)
-				node = numa_node_id();
+				goto out;
 
 			hfi1_per_node_cntr[node]++;
 		}
@@ -206,6 +206,18 @@ int node_affinity_init(void)
 	}
 
 	return 0;
+
+out:
+	/*
+	 * Invalid PCI NUMA node information found, note it, and populate
+	 * our database 1:1.
+	 */
+	pr_err("HFI: Invalid PCI NUMA node. Performance may be affected\n");
+	pr_err("HFI: System BIOS may need to be upgraded\n");
+	for (node = 0; node < node_affinity.num_possible_nodes; node++)
+		hfi1_per_node_cntr[node] = 1;
+
+	return 0;
 }
 
 static void node_affinity_destroy(struct hfi1_affinity_node *entry)
@@ -622,8 +634,14 @@ int hfi1_dev_affinity_init(struct hfi1_devdata *dd)
 	int curr_cpu, possible, i, ret;
 	bool new_entry = false;
 
-	if (node < 0)
-		node = numa_node_id();
+	/*
+	 * If the BIOS does not have the NUMA node information set, select
+	 * NUMA 0 so we get consistent performance.
+	 */
+	if (node < 0) {
+		dd_dev_err(dd, "Invalid PCI NUMA node. Performance may be affected\n");
+		node = 0;
+	}
 	dd->node = node;
 
 	local_mask = cpumask_of_node(dd->node);
drivers/infiniband/hw/hns/hns_roce_pd.c +1 -1
index b9f2c871ff9a..e11c149da04d 100644
@@ -37,7 +37,7 @@
 
 static int hns_roce_pd_alloc(struct hns_roce_dev *hr_dev, unsigned long *pdn)
 {
-	return hns_roce_bitmap_alloc(&hr_dev->pd_bitmap, pdn);
+	return hns_roce_bitmap_alloc(&hr_dev->pd_bitmap, pdn) ? -ENOMEM : 0;
 }
 
 static void hns_roce_pd_free(struct hns_roce_dev *hr_dev, unsigned long pdn)
drivers/infiniband/hw/hns/hns_roce_qp.c +4 -1
index baaf906f7c2e..97664570c5ac 100644
@@ -115,7 +115,10 @@ static int hns_roce_reserve_range_qp(struct hns_roce_dev *hr_dev, int cnt,
 {
 	struct hns_roce_qp_table *qp_table = &hr_dev->qp_table;
 
-	return hns_roce_bitmap_alloc_range(&qp_table->bitmap, cnt, align, base);
+	return hns_roce_bitmap_alloc_range(&qp_table->bitmap, cnt, align,
+					   base) ?
+		       -ENOMEM :
+		       0;
 }
 
 enum hns_roce_qp_state to_hns_roce_state(enum ib_qp_state state)
drivers/input/input.c +12 -4
index 6365c1958264..3304aaaffe87 100644
@@ -480,11 +480,19 @@ EXPORT_SYMBOL(input_inject_event);
  */
 void input_alloc_absinfo(struct input_dev *dev)
 {
-	if (!dev->absinfo)
-		dev->absinfo = kcalloc(ABS_CNT, sizeof(*dev->absinfo),
-					GFP_KERNEL);
+	if (dev->absinfo)
+		return;
 
-	WARN(!dev->absinfo, "%s(): kcalloc() failed?\n", __func__);
+	dev->absinfo = kcalloc(ABS_CNT, sizeof(*dev->absinfo), GFP_KERNEL);
+	if (!dev->absinfo) {
+		dev_err(dev->dev.parent ?: &dev->dev,
+			"%s: unable to allocate memory\n", __func__);
+		/*
+		 * We will handle this allocation failure in
+		 * input_register_device() when we refuse to register input
+		 * device with ABS bits but without absinfo.
+		 */
+	}
 }
 EXPORT_SYMBOL(input_alloc_absinfo);
 
drivers/iommu/omap-iommu.c +2 -2
index af4a8e7fcd27..3b05117118c3 100644
@@ -550,7 +550,7 @@ static u32 *iopte_alloc(struct omap_iommu *obj, u32 *iopgd,
 
 pte_ready:
 	iopte = iopte_offset(iopgd, da);
-	*pt_dma = virt_to_phys(iopte);
+	*pt_dma = iopgd_page_paddr(iopgd);
 	dev_vdbg(obj->dev,
 		 "%s: da:%08x pgd:%p *pgd:%08x pte:%p *pte:%08x\n",
 		 __func__, da, iopgd, *iopgd, iopte, *iopte);
@@ -738,7 +738,7 @@ static size_t iopgtable_clear_entry_core(struct omap_iommu *obj, u32 da)
 		}
 		bytes *= nent;
 		memset(iopte, 0, nent * sizeof(*iopte));
-		pt_dma = virt_to_phys(iopte);
+		pt_dma = iopgd_page_paddr(iopgd);
 		flush_iopte_range(obj->dev, pt_dma, pt_offset, nent);
 
 		/*
drivers/iommu/rockchip-iommu.c +28 -17

92 lines not on this page · raw message

drivers/irqchip/irq-bcm7038-l1.c +4 -0
index faf734ff4cf3..0f6e30e9009d 100644
@@ -217,6 +217,7 @@ static int bcm7038_l1_set_affinity(struct irq_data *d,
 	return 0;
 }
 
+#ifdef CONFIG_SMP
 static void bcm7038_l1_cpu_offline(struct irq_data *d)
 {
 	struct cpumask *mask = irq_data_get_affinity_mask(d);
@@ -241,6 +242,7 @@ static void bcm7038_l1_cpu_offline(struct irq_data *d)
 	}
 	irq_set_affinity_locked(d, &new_affinity, false);
 }
+#endif
 
 static int __init bcm7038_l1_init_one(struct device_node *dn,
 				      unsigned int idx,
@@ -293,7 +295,9 @@ static struct irq_chip bcm7038_l1_irq_chip = {
 	.irq_mask		= bcm7038_l1_mask,
 	.irq_unmask		= bcm7038_l1_unmask,
 	.irq_set_affinity	= bcm7038_l1_set_affinity,
+#ifdef CONFIG_SMP
 	.irq_cpu_offline	= bcm7038_l1_cpu_offline,
+#endif
 };
 
 static int bcm7038_l1_map(struct irq_domain *d, unsigned int virq,
drivers/irqchip/irq-stm32-exti.c +13 -12
index 3a7e8905a97e..880e48947576 100644
@@ -602,17 +602,24 @@ stm32_exti_host_data *stm32_exti_host_init(const struct stm32_exti_drv_data *dd,
 					sizeof(struct stm32_exti_chip_data),
 					GFP_KERNEL);
 	if (!host_data->chips_data)
-		return NULL;
+		goto free_host_data;
 
 	host_data->base = of_iomap(node, 0);
 	if (!host_data->base) {
 		pr_err("%pOF: Unable to map registers\n", node);
-		return NULL;
+		goto free_chips_data;
 	}
 
 	stm32_host_data = host_data;
 
 	return host_data;
+
+free_chips_data:
+	kfree(host_data->chips_data);
+free_host_data:
+	kfree(host_data);
+
+	return NULL;
 }
 
 static struct
@@ -664,10 +671,8 @@ static int __init stm32_exti_init(const struct stm32_exti_drv_data *drv_data,
 	struct irq_domain *domain;
 
 	host_data = stm32_exti_host_init(drv_data, node);
-	if (!host_data) {
-		ret = -ENOMEM;
-		goto out_free_mem;
-	}
+	if (!host_data)
+		return -ENOMEM;
 
 	domain = irq_domain_add_linear(node, drv_data->bank_nr * IRQS_PER_BANK,
 				       &irq_exti_domain_ops, NULL);
@@ -724,7 +729,6 @@ static int __init stm32_exti_init(const struct stm32_exti_drv_data *drv_data,
 	irq_domain_remove(domain);
 out_unmap:
 	iounmap(host_data->base);
-out_free_mem:
 	kfree(host_data->chips_data);
 	kfree(host_data);
 	return ret;
@@ -751,10 +755,8 @@ __init stm32_exti_hierarchy_init(const struct stm32_exti_drv_data *drv_data,
 	}
 
 	host_data = stm32_exti_host_init(drv_data, node);
-	if (!host_data) {
-		ret = -ENOMEM;
-		goto out_free_mem;
-	}
+	if (!host_data)
+		return -ENOMEM;
 
 	for (i = 0; i < drv_data->bank_nr; i++)
 		stm32_exti_chip_init(host_data, i, node);
@@ -776,7 +778,6 @@ __init stm32_exti_hierarchy_init(const struct stm32_exti_drv_data *drv_data,
 
 out_unmap:
 	iounmap(host_data->base);
-out_free_mem:
 	kfree(host_data->chips_data);
 	kfree(host_data);
 	return ret;
drivers/md/dm-kcopyd.c +2 -0
index 3c7547a3c371..d7b9cdafd1c3 100644
@@ -487,6 +487,8 @@ static int run_complete_job(struct kcopyd_job *job)
 	if (atomic_dec_and_test(&kc->nr_jobs))
 		wake_up(&kc->destroyq);
 
+	cond_resched();
+
 	return 0;
 }
 
drivers/mfd/sm501.c +1 -0
index 2a87b0d2f21f..a530972c5a7e 100644
@@ -715,6 +715,7 @@ sm501_create_subdev(struct sm501_devdata *sm, char *name,
 	smdev->pdev.name = name;
 	smdev->pdev.id = sm->pdev_id;
 	smdev->pdev.dev.parent = sm->dev;
+	smdev->pdev.dev.coherent_dma_mask = 0xffffffff;
 
 	if (res_count) {
 		smdev->pdev.resource = (struct resource *)(smdev+1);
drivers/mtd/ubi/vtbl.c +10 -10
index 94d7a865b135..7504f430c011 100644
@@ -578,6 +578,16 @@ static int init_volumes(struct ubi_device *ubi,
 		vol->ubi = ubi;
 		reserved_pebs += vol->reserved_pebs;
 
+		/*
+		 * We use ubi->peb_count and not vol->reserved_pebs because
+		 * we want to keep the code simple. Otherwise we'd have to
+		 * resize/check the bitmap upon volume resize too.
+		 * Allocating a few bytes more does not hurt.
+		 */
+		err = ubi_fastmap_init_checkmap(vol, ubi->peb_count);
+		if (err)
+			return err;
+
 		/*
 		 * In case of dynamic volume UBI knows nothing about how many
 		 * data is stored there. So assume the whole volume is used.
@@ -620,16 +630,6 @@ static int init_volumes(struct ubi_device *ubi,
 			(long long)(vol->used_ebs - 1) * vol->usable_leb_size;
 		vol->used_bytes += av->last_data_size;
 		vol->last_eb_bytes = av->last_data_size;
-
-		/*
-		 * We use ubi->peb_count and not vol->reserved_pebs because
-		 * we want to keep the code simple. Otherwise we'd have to
-		 * resize/check the bitmap upon volume resize too.
-		 * Allocating a few bytes more does not hurt.
-		 */
-		err = ubi_fastmap_init_checkmap(vol, ubi->peb_count);
-		if (err)
-			return err;
 	}
 
 	/* And add the layout volume */
drivers/net/ethernet/broadcom/bnxt/bnxt.c +5 -4
index 4394c1162be4..4fdf3d33aa59 100644
@@ -5907,12 +5907,12 @@ unsigned int bnxt_get_max_func_cp_rings(struct bnxt *bp)
 	return bp->hw_resc.max_cp_rings;
 }
 
-void bnxt_set_max_func_cp_rings(struct bnxt *bp, unsigned int max)
+unsigned int bnxt_get_max_func_cp_rings_for_en(struct bnxt *bp)
 {
-	bp->hw_resc.max_cp_rings = max;
+	return bp->hw_resc.max_cp_rings - bnxt_get_ulp_msix_num(bp);
 }
 
-unsigned int bnxt_get_max_func_irqs(struct bnxt *bp)
+static unsigned int bnxt_get_max_func_irqs(struct bnxt *bp)
 {
 	struct bnxt_hw_resc *hw_resc = &bp->hw_resc;
 
@@ -8492,7 +8492,8 @@ static void _bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx,
 
 	*max_tx = hw_resc->max_tx_rings;
 	*max_rx = hw_resc->max_rx_rings;
-	*max_cp = min_t(int, hw_resc->max_irqs, hw_resc->max_cp_rings);
+	*max_cp = min_t(int, bnxt_get_max_func_cp_rings_for_en(bp),
+			hw_resc->max_irqs);
 	*max_cp = min_t(int, *max_cp, hw_resc->max_stat_ctxs);
 	max_ring_grps = hw_resc->max_hw_ring_grps;
 	if (BNXT_CHIP_TYPE_NITRO_A0(bp) && BNXT_PF(bp)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -2
index 91575ef97c8c..ea1246a94b38 100644
@@ -1468,8 +1468,7 @@ int bnxt_hwrm_set_coal(struct bnxt *);
 unsigned int bnxt_get_max_func_stat_ctxs(struct bnxt *bp);
 void bnxt_set_max_func_stat_ctxs(struct bnxt *bp, unsigned int max);
 unsigned int bnxt_get_max_func_cp_rings(struct bnxt *bp);
-void bnxt_set_max_func_cp_rings(struct bnxt *bp, unsigned int max);
-unsigned int bnxt_get_max_func_irqs(struct bnxt *bp);
+unsigned int bnxt_get_max_func_cp_rings_for_en(struct bnxt *bp);
 int bnxt_get_avail_msix(struct bnxt *bp, int num);
 int bnxt_reserve_rings(struct bnxt *bp);
 void bnxt_tx_disable(struct bnxt *bp);
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c +4 -3
index a64910892c25..2c77004a022b 100644
@@ -451,7 +451,7 @@ static int bnxt_hwrm_func_vf_resc_cfg(struct bnxt *bp, int num_vfs)
 
 	bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_VF_RESOURCE_CFG, -1, -1);
 
-	vf_cp_rings = hw_resc->max_cp_rings - bp->cp_nr_rings;
+	vf_cp_rings = bnxt_get_max_func_cp_rings_for_en(bp) - bp->cp_nr_rings;
 	vf_stat_ctx = hw_resc->max_stat_ctxs - bp->num_stat_ctxs;
 	if (bp->flags & BNXT_FLAG_AGG_RINGS)
 		vf_rx_rings = hw_resc->max_rx_rings - bp->rx_nr_rings * 2;
@@ -544,7 +544,8 @@ static int bnxt_hwrm_func_cfg(struct bnxt *bp, int num_vfs)
 	max_stat_ctxs = hw_resc->max_stat_ctxs;
 
 	/* Remaining rings are distributed equally amongs VF's for now */
-	vf_cp_rings = (hw_resc->max_cp_rings - bp->cp_nr_rings) / num_vfs;
+	vf_cp_rings = (bnxt_get_max_func_cp_rings_for_en(bp) -
+		       bp->cp_nr_rings) / num_vfs;
 	vf_stat_ctx = (max_stat_ctxs - bp->num_stat_ctxs) / num_vfs;
 	if (bp->flags & BNXT_FLAG_AGG_RINGS)
 		vf_rx_rings = (hw_resc->max_rx_rings - bp->rx_nr_rings * 2) /
@@ -638,7 +639,7 @@ static int bnxt_sriov_enable(struct bnxt *bp, int *num_vfs)
 	 */
 	vfs_supported = *num_vfs;
 
-	avail_cp = hw_resc->max_cp_rings - bp->cp_nr_rings;
+	avail_cp = bnxt_get_max_func_cp_rings_for_en(bp) - bp->cp_nr_rings;
 	avail_stat = hw_resc->max_stat_ctxs - bp->num_stat_ctxs;
 	avail_cp = min_t(int, avail_cp, avail_stat);
 
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c +0 -20
index 840f6e505f73..4209cfd73971 100644
@@ -169,7 +169,6 @@ static int bnxt_req_msix_vecs(struct bnxt_en_dev *edev, int ulp_id,
 		edev->ulp_tbl[ulp_id].msix_requested = avail_msix;
 	}
 	bnxt_fill_msix_vecs(bp, ent);
-	bnxt_set_max_func_cp_rings(bp, max_cp_rings - avail_msix);
 	edev->flags |= BNXT_EN_FLAG_MSIX_REQUESTED;
 	return avail_msix;
 }
@@ -178,7 +177,6 @@ static int bnxt_free_msix_vecs(struct bnxt_en_dev *edev, int ulp_id)
 {
 	struct net_device *dev = edev->net;
 	struct bnxt *bp = netdev_priv(dev);
-	int max_cp_rings, msix_requested;
 
 	ASSERT_RTNL();
 	if (ulp_id != BNXT_ROCE_ULP)
@@ -187,9 +185,6 @@ static int bnxt_free_msix_vecs(struct bnxt_en_dev *edev, int ulp_id)
 	if (!(edev->flags & BNXT_EN_FLAG_MSIX_REQUESTED))
 		return 0;
 
-	max_cp_rings = bnxt_get_max_func_cp_rings(bp);
-	msix_requested = edev->ulp_tbl[ulp_id].msix_requested;
-	bnxt_set_max_func_cp_rings(bp, max_cp_rings + msix_requested);
 	edev->ulp_tbl[ulp_id].msix_requested = 0;
 	edev->flags &= ~BNXT_EN_FLAG_MSIX_REQUESTED;
 	if (netif_running(dev)) {
@@ -220,21 +215,6 @@ int bnxt_get_ulp_msix_base(struct bnxt *bp)
 	return 0;
 }
 
-void bnxt_subtract_ulp_resources(struct bnxt *bp, int ulp_id)
-{
-	ASSERT_RTNL();
-	if (bnxt_ulp_registered(bp->edev, ulp_id)) {
-		struct bnxt_en_dev *edev = bp->edev;
-		unsigned int msix_req, max;
-
-		msix_req = edev->ulp_tbl[ulp_id].msix_requested;
-		max = bnxt_get_max_func_cp_rings(bp);
-		bnxt_set_max_func_cp_rings(bp, max - msix_req);
-		max = bnxt_get_max_func_stat_ctxs(bp);
-		bnxt_set_max_func_stat_ctxs(bp, max - 1);
-	}
-}
-
 static int bnxt_send_msg(struct bnxt_en_dev *edev, int ulp_id,
 			 struct bnxt_fw_msg *fw_msg)
 {
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h +0 -1
index df48ac71729f..d9bea37cd211 100644
@@ -90,7 +90,6 @@ static inline bool bnxt_ulp_registered(struct bnxt_en_dev *edev, int ulp_id)
 
 int bnxt_get_ulp_msix_num(struct bnxt *bp);
 int bnxt_get_ulp_msix_base(struct bnxt *bp);
-void bnxt_subtract_ulp_resources(struct bnxt *bp, int ulp_id);
 void bnxt_ulp_stop(struct bnxt *bp);
 void bnxt_ulp_start(struct bnxt *bp);
 void bnxt_ulp_sriov_cfg(struct bnxt *bp, int num_vfs);
drivers/net/ethernet/broadcom/genet/bcmgenet.h +3 -0
index b773bc07edf7..14b49612aa86 100644
@@ -186,6 +186,9 @@ struct bcmgenet_mib_counters {
 #define UMAC_MAC1			0x010
 #define UMAC_MAX_FRAME_LEN		0x014
 
+#define UMAC_MODE			0x44
+#define  MODE_LINK_STATUS		(1 << 5)
+
 #define UMAC_EEE_CTRL			0x064
 #define  EN_LPI_RX_PAUSE		(1 << 0)
 #define  EN_LPI_TX_PFC			(1 << 1)
drivers/net/ethernet/broadcom/genet/bcmmii.c +8 -2
index 5333274a283c..4241ae928d4a 100644
@@ -115,8 +115,14 @@ void bcmgenet_mii_setup(struct net_device *dev)
 static int bcmgenet_fixed_phy_link_update(struct net_device *dev,
 					  struct fixed_phy_status *status)
 {
-	if (dev && dev->phydev && status)
-		status->link = dev->phydev->link;
+	struct bcmgenet_priv *priv;
+	u32 reg;
+
+	if (dev && dev->phydev && status) {
+		priv = netdev_priv(dev);
+		reg = bcmgenet_umac_readl(priv, UMAC_MODE);
+		status->link = !!(reg & MODE_LINK_STATUS);
+	}
 
 	return 0;
 }
drivers/net/ethernet/cadence/macb_main.c +23 -13
index a6c911bb5ce2..515d96e32143 100644
@@ -481,11 +481,6 @@ static int macb_mii_probe(struct net_device *dev)
 
 	if (np) {
 		if (of_phy_is_fixed_link(np)) {
-			if (of_phy_register_fixed_link(np) < 0) {
-				dev_err(&bp->pdev->dev,
-					"broken fixed-link specification\n");
-				return -ENODEV;
-			}
 			bp->phy_node = of_node_get(np);
 		} else {
 			bp->phy_node = of_parse_phandle(np, "phy-handle", 0);
@@ -568,7 +563,7 @@ static int macb_mii_init(struct macb *bp)
 {
 	struct macb_platform_data *pdata;
 	struct device_node *np;
-	int err;
+	int err = -ENXIO;
 
 	/* Enable management port */
 	macb_writel(bp, NCR, MACB_BIT(MPE));
@@ -591,12 +586,23 @@ static int macb_mii_init(struct macb *bp)
 	dev_set_drvdata(&bp->dev->dev, bp->mii_bus);
 
 	np = bp->pdev->dev.of_node;
-	if (pdata)
-		bp->mii_bus->phy_mask = pdata->phy_mask;
+	if (np && of_phy_is_fixed_link(np)) {
+		if (of_phy_register_fixed_link(np) < 0) {
+			dev_err(&bp->pdev->dev,
+				"broken fixed-link specification %pOF\n", np);
+			goto err_out_free_mdiobus;
+		}
+
+		err = mdiobus_register(bp->mii_bus);
+	} else {
+		if (pdata)
+			bp->mii_bus->phy_mask = pdata->phy_mask;
+
+		err = of_mdiobus_register(bp->mii_bus, np);
+	}
 
-	err = of_mdiobus_register(bp->mii_bus, np);
 	if (err)
-		goto err_out_free_mdiobus;
+		goto err_out_free_fixed_link;
 
 	err = macb_mii_probe(bp->dev);
 	if (err)
@@ -606,6 +612,7 @@ static int macb_mii_init(struct macb *bp)
 
 err_out_unregister_bus:
 	mdiobus_unregister(bp->mii_bus);
+err_out_free_fixed_link:
 	if (np && of_phy_is_fixed_link(np))
 		of_phy_deregister_fixed_link(np);
 err_out_free_mdiobus:
@@ -1957,14 +1964,17 @@ static void macb_reset_hw(struct macb *bp)
 {
 	struct macb_queue *queue;
 	unsigned int q;
+	u32 ctrl = macb_readl(bp, NCR);
 
 	/* Disable RX and TX (XXX: Should we halt the transmission
 	 * more gracefully?)
 	 */
-	macb_writel(bp, NCR, 0);
+	ctrl &= ~(MACB_BIT(RE) | MACB_BIT(TE));
 
 	/* Clear the stats registers (XXX: Update stats first?) */
-	macb_writel(bp, NCR, MACB_BIT(CLRSTAT));
+	ctrl |= MACB_BIT(CLRSTAT);
+
+	macb_writel(bp, NCR, ctrl);
 
 	/* Clear all status flags */
 	macb_writel(bp, TSR, -1);
@@ -2152,7 +2162,7 @@ static void macb_init_hw(struct macb *bp)
 	}
 
 	/* Enable TX and RX */
-	macb_writel(bp, NCR, MACB_BIT(RE) | MACB_BIT(TE) | MACB_BIT(MPE));
+	macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(RE) | MACB_BIT(TE));
 }
 
 /* The hash address register is 64 bits long and takes up two
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +1 -1
index d318d35e598f..6fd7ea8074b0 100644
@@ -3911,7 +3911,7 @@ static bool hclge_is_all_function_id_zero(struct hclge_desc *desc)
 #define HCLGE_FUNC_NUMBER_PER_DESC 6
 	int i, j;
 
-	for (i = 0; i < HCLGE_DESC_NUMBER; i++)
+	for (i = 1; i < HCLGE_DESC_NUMBER; i++)
 		for (j = 0; j < HCLGE_FUNC_NUMBER_PER_DESC; j++)
 			if (desc[i].data[j])
 				return false;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c +2 -0
index 9f7932e423b5..6315e8ad8467 100644
@@ -208,6 +208,8 @@ int hclge_mac_start_phy(struct hclge_dev *hdev)
 	if (!phydev)
 		return 0;
 
+	phydev->supported &= ~SUPPORTED_FIBRE;
+
 	ret = phy_connect_direct(netdev, phydev,
 				 hclge_mac_adjust_link,
 				 PHY_INTERFACE_MODE_SGMII);
drivers/net/ethernet/mellanox/mlx5/core/wq.c +3 -2
index 86478a6b99c5..c8c315eb5128 100644
@@ -139,14 +139,15 @@ int mlx5_wq_qp_create(struct mlx5_core_dev *mdev, struct mlx5_wq_param *param,
 		      struct mlx5_wq_ctrl *wq_ctrl)
 {
 	u32 sq_strides_offset;
+	u32 rq_pg_remainder;
 	int err;
 
 	mlx5_fill_fbc(MLX5_GET(qpc, qpc, log_rq_stride) + 4,
 		      MLX5_GET(qpc, qpc, log_rq_size),
 		      &wq->rq.fbc);
 
-	sq_strides_offset =
-		((wq->rq.fbc.frag_sz_m1 + 1) % PAGE_SIZE) / MLX5_SEND_WQE_BB;
+	rq_pg_remainder   = mlx5_wq_cyc_get_byte_size(&wq->rq) % PAGE_SIZE;
+	sq_strides_offset = rq_pg_remainder / MLX5_SEND_WQE_BB;
 
 	mlx5_fill_fbc_offset(ilog2(MLX5_SEND_WQE_BB),
 			     MLX5_GET(qpc, qpc, log_sq_size),
drivers/net/ethernet/mellanox/mlxsw/spectrum.h +2 -0
index 4a519d8edec8..3500c79e29cd 100644
@@ -433,6 +433,8 @@ mlxsw_sp_netdevice_ipip_ul_event(struct mlxsw_sp *mlxsw_sp,
 void
 mlxsw_sp_port_vlan_router_leave(struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan);
 void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif);
+void mlxsw_sp_rif_destroy_by_dev(struct mlxsw_sp *mlxsw_sp,
+				 struct net_device *dev);
 
 /* spectrum_kvdl.c */
 int mlxsw_sp_kvdl_init(struct mlxsw_sp *mlxsw_sp);
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +11 -0
index 77b2adb29341..cb43d17097fa 100644
@@ -6228,6 +6228,17 @@ void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif)
 	mlxsw_sp_vr_put(mlxsw_sp, vr);
 }
 
+void mlxsw_sp_rif_destroy_by_dev(struct mlxsw_sp *mlxsw_sp,
+				 struct net_device *dev)
+{
+	struct mlxsw_sp_rif *rif;
+
+	rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev);
+	if (!rif)
+		return;
+	mlxsw_sp_rif_destroy(rif);
+}
+
 static void
 mlxsw_sp_rif_subport_params_init(struct mlxsw_sp_rif_params *params,
 				 struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan)
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +20 -0
index eea5666a86b2..6cb43dda8232 100644
@@ -160,6 +160,24 @@ bool mlxsw_sp_bridge_device_is_offloaded(const struct mlxsw_sp *mlxsw_sp,
 	return !!mlxsw_sp_bridge_device_find(mlxsw_sp->bridge, br_dev);
 }
 
+static int mlxsw_sp_bridge_device_upper_rif_destroy(struct net_device *dev,
+						    void *data)
+{
+	struct mlxsw_sp *mlxsw_sp = data;
+
+	mlxsw_sp_rif_destroy_by_dev(mlxsw_sp, dev);
+	return 0;
+}
+
+static void mlxsw_sp_bridge_device_rifs_destroy(struct mlxsw_sp *mlxsw_sp,
+						struct net_device *dev)
+{
+	mlxsw_sp_rif_destroy_by_dev(mlxsw_sp, dev);
+	netdev_walk_all_upper_dev_rcu(dev,
+				      mlxsw_sp_bridge_device_upper_rif_destroy,
+				      mlxsw_sp);
+}
+
 static struct mlxsw_sp_bridge_device *
 mlxsw_sp_bridge_device_create(struct mlxsw_sp_bridge *bridge,
 			      struct net_device *br_dev)
@@ -198,6 +216,8 @@ static void
 mlxsw_sp_bridge_device_destroy(struct mlxsw_sp_bridge *bridge,
 			       struct mlxsw_sp_bridge_device *bridge_device)
 {
+	mlxsw_sp_bridge_device_rifs_destroy(bridge->mlxsw_sp,
+					    bridge_device->dev);
 	list_del(&bridge_device->list);
 	if (bridge_device->vlan_enabled)
 		bridge->vlan_enabled_exists = false;
drivers/net/ethernet/netronome/nfp/nfp_net_common.c +33 -15

86 lines not on this page · raw message

drivers/net/ethernet/qlogic/qlge/qlge_main.c +8 -15
index 353f1c129af1..059ba9429e51 100644
@@ -2384,26 +2384,20 @@ static int qlge_update_hw_vlan_features(struct net_device *ndev,
 	return status;
 }
 
-static netdev_features_t qlge_fix_features(struct net_device *ndev,
-	netdev_features_t features)
-{
-	int err;
-
-	/* Update the behavior of vlan accel in the adapter */
-	err = qlge_update_hw_vlan_features(ndev, features);
-	if (err)
-		return err;
-
-	return features;
-}
-
 static int qlge_set_features(struct net_device *ndev,
 	netdev_features_t features)
 {
 	netdev_features_t changed = ndev->features ^ features;
+	int err;
+
+	if (changed & NETIF_F_HW_VLAN_CTAG_RX) {
+		/* Update the behavior of vlan accel in the adapter */
+		err = qlge_update_hw_vlan_features(ndev, features);
+		if (err)
+			return err;
 
-	if (changed & NETIF_F_HW_VLAN_CTAG_RX)
 		qlge_vlan_mode(ndev, features);
+	}
 
 	return 0;
 }
@@ -4719,7 +4713,6 @@ static const struct net_device_ops qlge_netdev_ops = {
 	.ndo_set_mac_address	= qlge_set_mac_address,
 	.ndo_validate_addr	= eth_validate_addr,
 	.ndo_tx_timeout		= qlge_tx_timeout,
-	.ndo_fix_features	= qlge_fix_features,
 	.ndo_set_features	= qlge_set_features,
 	.ndo_vlan_rx_add_vid	= qlge_vlan_rx_add_vid,
 	.ndo_vlan_rx_kill_vid	= qlge_vlan_rx_kill_vid,
drivers/net/ethernet/realtek/r8169.c +5 -2
index 9ceb34bac3a9..e5eb361b973c 100644
@@ -303,6 +303,7 @@ static const struct pci_device_id rtl8169_pci_tbl[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8161), 0, 0, RTL_CFG_1 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8167), 0, 0, RTL_CFG_0 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8168), 0, 0, RTL_CFG_1 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_NCUBE,	0x8168), 0, 0, RTL_CFG_1 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8169), 0, 0, RTL_CFG_0 },
 	{ PCI_VENDOR_ID_DLINK,			0x4300,
 		PCI_VENDOR_ID_DLINK, 0x4b10,		 0, 0, RTL_CFG_1 },
@@ -5038,7 +5039,7 @@ static void rtl8169_hw_reset(struct rtl8169_private *tp)
 	rtl_hw_reset(tp);
 }
 
-static void rtl_set_rx_tx_config_registers(struct rtl8169_private *tp)
+static void rtl_set_tx_config_registers(struct rtl8169_private *tp)
 {
 	/* Set DMA burst size and Interframe Gap Time */
 	RTL_W32(tp, TxConfig, (TX_DMA_BURST << TxDMAShift) |
@@ -5149,12 +5150,14 @@ static void rtl_hw_start(struct  rtl8169_private *tp)
 
 	rtl_set_rx_max_size(tp);
 	rtl_set_rx_tx_desc_registers(tp);
-	rtl_set_rx_tx_config_registers(tp);
+	rtl_set_tx_config_registers(tp);
 	RTL_W8(tp, Cfg9346, Cfg9346_Lock);
 
 	/* Initially a 10 us delay. Turned it into a PCI commit. - FR */
 	RTL_R8(tp, IntrMask);
 	RTL_W8(tp, ChipCmd, CmdTxEnb | CmdRxEnb);
+	rtl_init_rxcfg(tp);
+
 	rtl_set_rx_mode(tp->dev);
 	/* no early-rx interrupts */
 	RTL_W16(tp, MultiIntr, RTL_R16(tp, MultiIntr) & 0xf000);
drivers/net/ethernet/stmicro/stmmac/stmmac.h +0 -1
index 76649adf8fb0..c0a855b7ab3b 100644
@@ -112,7 +112,6 @@ struct stmmac_priv {
 	u32 tx_count_frames;
 	u32 tx_coal_frames;
 	u32 tx_coal_timer;
-	bool tx_timer_armed;
 
 	int tx_coalesce;
 	int hwts_tx_en;
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -4
index ef6a8d39db2f..c579d98b9666 100644
@@ -3126,16 +3126,13 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
 	 * element in case of no SG.
 	 */
 	priv->tx_count_frames += nfrags + 1;
-	if (likely(priv->tx_coal_frames > priv->tx_count_frames) &&
-	    !priv->tx_timer_armed) {
+	if (likely(priv->tx_coal_frames > priv->tx_count_frames)) {
 		mod_timer(&priv->txtimer,
 			  STMMAC_COAL_TIMER(priv->tx_coal_timer));
-		priv->tx_timer_armed = true;
 	} else {
 		priv->tx_count_frames = 0;
 		stmmac_set_tx_ic(priv, desc);
 		priv->xstats.tx_set_ic_bit++;
-		priv->tx_timer_armed = false;
 	}
 
 	skb_tx_timestamp(skb);
drivers/net/hyperv/netvsc_drv.c +15 -1
index dd1d6e115145..6d74cde68163 100644
@@ -29,6 +29,7 @@
 #include <linux/netdevice.h>
 #include <linux/inetdevice.h>
 #include <linux/etherdevice.h>
+#include <linux/pci.h>
 #include <linux/skbuff.h>
 #include <linux/if_vlan.h>
 #include <linux/in.h>
@@ -1939,12 +1940,16 @@ static int netvsc_register_vf(struct net_device *vf_netdev)
 {
 	struct net_device *ndev;
 	struct net_device_context *net_device_ctx;
+	struct device *pdev = vf_netdev->dev.parent;
 	struct netvsc_device *netvsc_dev;
 	int ret;
 
 	if (vf_netdev->addr_len != ETH_ALEN)
 		return NOTIFY_DONE;
 
+	if (!pdev || !dev_is_pci(pdev) || dev_is_pf(pdev))
+		return NOTIFY_DONE;
+
 	/*
 	 * We will use the MAC address to locate the synthetic interface to
 	 * associate with the VF interface. If we don't find a matching
@@ -2101,6 +2106,16 @@ static int netvsc_probe(struct hv_device *dev,
 
 	memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN);
 
+	/* We must get rtnl lock before scheduling nvdev->subchan_work,
+	 * otherwise netvsc_subchan_work() can get rtnl lock first and wait
+	 * all subchannels to show up, but that may not happen because
+	 * netvsc_probe() can't get rtnl lock and as a result vmbus_onoffer()
+	 * -> ... -> device_add() -> ... -> __device_attach() can't get
+	 * the device lock, so all the subchannels can't be processed --
+	 * finally netvsc_subchan_work() hangs for ever.
+	 */
+	rtnl_lock();
+
 	if (nvdev->num_chn > 1)
 		schedule_work(&nvdev->subchan_work);
 
@@ -2119,7 +2134,6 @@ static int netvsc_probe(struct hv_device *dev,
 	else
 		net->max_mtu = ETH_DATA_LEN;
 
-	rtnl_lock();
 	ret = register_netdevice(net);
 	if (ret != 0) {
 		pr_err("Unable to register netdev.\n");
drivers/net/usb/r8152.c +2 -2
index 2a58607a6aea..1b07bb5e110d 100644
@@ -5214,8 +5214,8 @@ static int rtl8152_probe(struct usb_interface *intf,
 		netdev->hw_features &= ~NETIF_F_RXCSUM;
 	}
 
-	if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 &&
-	    udev->serial && !strcmp(udev->serial, "000001000000")) {
+	if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial &&
+	    (!strcmp(udev->serial, "000001000000") || !strcmp(udev->serial, "000002000000"))) {
 		dev_info(&udev->dev, "Dell TB16 Dock, disable RX aggregation");
 		set_bit(DELL_TB_RX_AGG_BUG, &tp->flags);
 	}
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +4 -4
index b6122aad639e..7569f9af8d47 100644
@@ -6926,15 +6926,15 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,
 	cfg->d11inf.io_type = (u8)io_type;
 	brcmu_d11_attach(&cfg->d11inf);
 
-	err = brcmf_setup_wiphy(wiphy, ifp);
-	if (err < 0)
-		goto priv_out;
-
 	/* regulatory notifer below needs access to cfg so
 	 * assign it now.
 	 */
 	drvr->config = cfg;
 
+	err = brcmf_setup_wiphy(wiphy, ifp);
+	if (err < 0)
+		goto priv_out;
+
 	brcmf_dbg(INFO, "Registering custom regulatory\n");
 	wiphy->reg_notifier = brcmf_cfg80211_reg_notifier;
 	wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG;
drivers/pci/controller/pci-mvebu.c +1 -1
index 23e270839e6a..f00df2384985 100644
@@ -1219,7 +1219,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
 		pcie->realio.start = PCIBIOS_MIN_IO;
 		pcie->realio.end = min_t(resource_size_t,
 					 IO_SPACE_LIMIT,
-					 resource_size(&pcie->io));
+					 resource_size(&pcie->io) - 1);
 	} else
 		pcie->realio = pcie->io;
 
drivers/pci/probe.c +10 -2
index b2857865c0aa..a1a243ee36bb 100644
@@ -1725,7 +1725,7 @@ int pci_setup_device(struct pci_dev *dev)
 static void pci_configure_mps(struct pci_dev *dev)
 {
 	struct pci_dev *bridge = pci_upstream_bridge(dev);
-	int mps, p_mps, rc;
+	int mps, mpss, p_mps, rc;
 
 	if (!pci_is_pcie(dev) || !bridge || !pci_is_pcie(bridge))
 		return;
@@ -1753,6 +1753,14 @@ static void pci_configure_mps(struct pci_dev *dev)
 	if (pcie_bus_config != PCIE_BUS_DEFAULT)
 		return;
 
+	mpss = 128 << dev->pcie_mpss;
+	if (mpss < p_mps && pci_pcie_type(bridge) == PCI_EXP_TYPE_ROOT_PORT) {
+		pcie_set_mps(bridge, mpss);
+		pci_info(dev, "Upstream bridge's Max Payload Size set to %d (was %d, max %d)\n",
+			 mpss, p_mps, 128 << bridge->pcie_mpss);
+		p_mps = pcie_get_mps(bridge);
+	}
+
 	rc = pcie_set_mps(dev, p_mps);
 	if (rc) {
 		pci_warn(dev, "can't set Max Payload Size to %d; if necessary, use \"pci=pcie_bus_safe\" and report a bug\n",
@@ -1761,7 +1769,7 @@ static void pci_configure_mps(struct pci_dev *dev)
 	}
 
 	pci_info(dev, "Max Payload Size set to %d (was %d, max %d)\n",
-		 p_mps, mps, 128 << dev->pcie_mpss);
+		 p_mps, mps, mpss);
 }
 
 static struct hpp_type0 pci_default_type0 = {
drivers/pinctrl/pinctrl-axp209.c +20 -6
index a52779f33ad4..afd0b533c40a 100644
@@ -316,7 +316,7 @@ static const struct pinctrl_ops axp20x_pctrl_ops = {
 	.get_group_pins		= axp20x_group_pins,
 };
 
-static void axp20x_funcs_groups_from_mask(struct device *dev, unsigned int mask,
+static int axp20x_funcs_groups_from_mask(struct device *dev, unsigned int mask,
 					  unsigned int mask_len,
 					  struct axp20x_pinctrl_function *func,
 					  const struct pinctrl_pin_desc *pins)
@@ -331,18 +331,22 @@ static void axp20x_funcs_groups_from_mask(struct device *dev, unsigned int mask,
 		func->groups = devm_kcalloc(dev,
 					    ngroups, sizeof(const char *),
 					    GFP_KERNEL);
+		if (!func->groups)
+			return -ENOMEM;
 		group = func->groups;
 		for_each_set_bit(bit, &mask_cpy, mask_len) {
 			*group = pins[bit].name;
 			group++;
 		}
 	}
+
+	return 0;
 }
 
-static void axp20x_build_funcs_groups(struct platform_device *pdev)
+static int axp20x_build_funcs_groups(struct platform_device *pdev)
 {
 	struct axp20x_pctl *pctl = platform_get_drvdata(pdev);
-	int i, pin, npins = pctl->desc->npins;
+	int i, ret, pin, npins = pctl->desc->npins;
 
 	pctl->funcs[AXP20X_FUNC_GPIO_OUT].name = "gpio_out";
 	pctl->funcs[AXP20X_FUNC_GPIO_OUT].muxval = AXP20X_MUX_GPIO_OUT;
@@ -366,13 +370,19 @@ static void axp20x_build_funcs_groups(struct platform_device *pdev)
 			pctl->funcs[i].groups[pin] = pctl->desc->pins[pin].name;
 	}
 
-	axp20x_funcs_groups_from_mask(&pdev->dev, pctl->desc->ldo_mask,
+	ret = axp20x_funcs_groups_from_mask(&pdev->dev, pctl->desc->ldo_mask,
 				      npins, &pctl->funcs[AXP20X_FUNC_LDO],
 				      pctl->desc->pins);
+	if (ret)
+		return ret;
 
-	axp20x_funcs_groups_from_mask(&pdev->dev, pctl->desc->adc_mask,
+	ret = axp20x_funcs_groups_from_mask(&pdev->dev, pctl->desc->adc_mask,
 				      npins, &pctl->funcs[AXP20X_FUNC_ADC],
 				      pctl->desc->pins);
+	if (ret)
+		return ret;
+
+	return 0;
 }
 
 static const struct of_device_id axp20x_pctl_match[] = {
@@ -424,7 +434,11 @@ static int axp20x_pctl_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, pctl);
 
-	axp20x_build_funcs_groups(pdev);
+	ret = axp20x_build_funcs_groups(pdev);
+	if (ret) {
+		dev_err(&pdev->dev, "failed to build groups\n");
+		return ret;
+	}
 
 	pctrl_desc = devm_kzalloc(&pdev->dev, sizeof(*pctrl_desc), GFP_KERNEL);
 	if (!pctrl_desc)
drivers/platform/x86/asus-nb-wmi.c +1 -0
index 136ff2b4cce5..db2af09067db 100644
@@ -496,6 +496,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
 	{ KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
 	{ KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
 	{ KE_IGNORE, 0xC6, },  /* Ambient Light Sensor notification */
+	{ KE_KEY, 0xFA, { KEY_PROG2 } },           /* Lid flip action */
 	{ KE_END, 0},
 };
 
drivers/platform/x86/intel_punit_ipc.c +1 -0
index b5b890127479..b7dfe06261f1 100644
@@ -17,6 +17,7 @@
 #include <linux/bitops.h>
 #include <linux/device.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 #include <linux/platform_device.h>
 #include <asm/intel_punit_ipc.h>
 
drivers/pwm/pwm-meson.c +1 -2
index 822860b4801a..c1ed641b3e26 100644
@@ -458,7 +458,6 @@ static int meson_pwm_init_channels(struct meson_pwm *meson,
 				   struct meson_pwm_channel *channels)
 {
 	struct device *dev = meson->chip.dev;
-	struct device_node *np = dev->of_node;
 	struct clk_init_data init;
 	unsigned int i;
 	char name[255];
@@ -467,7 +466,7 @@ static int meson_pwm_init_channels(struct meson_pwm *meson,
 	for (i = 0; i < meson->chip.npwm; i++) {
 		struct meson_pwm_channel *channel = &channels[i];
 
-		snprintf(name, sizeof(name), "%pOF#mux%u", np, i);
+		snprintf(name, sizeof(name), "%s#mux%u", dev_name(dev), i);
 
 		init.name = name;
 		init.ops = &clk_mux_ops;
drivers/s390/block/dasd_eckd.c +8 -2
index bbf95b78ef5d..43e3398c9268 100644
@@ -1780,6 +1780,9 @@ static void dasd_eckd_uncheck_device(struct dasd_device *device)
 	struct dasd_eckd_private *private = device->private;
 	int i;
 
+	if (!private)
+		return;
+
 	dasd_alias_disconnect_device_from_lcu(device);
 	private->ned = NULL;
 	private->sneq = NULL;
@@ -2035,8 +2038,11 @@ static int dasd_eckd_basic_to_ready(struct dasd_device *device)
 
 static int dasd_eckd_online_to_ready(struct dasd_device *device)
 {
-	cancel_work_sync(&device->reload_device);
-	cancel_work_sync(&device->kick_validate);
+	if (cancel_work_sync(&device->reload_device))
+		dasd_put_device(device);
+	if (cancel_work_sync(&device->kick_validate))
+		dasd_put_device(device);
+
 	return 0;
 };
 
drivers/scsi/aic94xx/aic94xx_init.c +3 -1
index 80e5b283fd81..1391e5f35918 100644
@@ -1030,8 +1030,10 @@ static int __init aic94xx_init(void)
 
 	aic94xx_transport_template =
 		sas_domain_attach_transport(&aic94xx_transport_functions);
-	if (!aic94xx_transport_template)
+	if (!aic94xx_transport_template) {
+		err = -ENOMEM;
 		goto out_destroy_caches;
+	}
 
 	err = pci_register_driver(&aic94xx_pci_driver);
 	if (err)
drivers/staging/comedi/drivers/ni_mio_common.c +2 -1
index e40a2c0a9543..d3da39a9f567 100644
@@ -5446,11 +5446,11 @@ static int ni_E_init(struct comedi_device *dev,
 	/* Digital I/O (PFI) subdevice */
 	s = &dev->subdevices[NI_PFI_DIO_SUBDEV];
 	s->type		= COMEDI_SUBD_DIO;
-	s->subdev_flags	= SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL;
 	s->maxdata	= 1;
 	if (devpriv->is_m_series) {
 		s->n_chan	= 16;
 		s->insn_bits	= ni_pfi_insn_bits;
+		s->subdev_flags	= SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL;
 
 		ni_writew(dev, s->state, NI_M_PFI_DO_REG);
 		for (i = 0; i < NUM_PFI_OUTPUT_SELECT_REGS; ++i) {
@@ -5459,6 +5459,7 @@ static int ni_E_init(struct comedi_device *dev,
 		}
 	} else {
[… more lines in the raw message]

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

drivers/vhost/vhost.c +1 -1
index ed3114556fda..560ed8711706 100644

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

drivers/virtio/virtio_pci_legacy.c +12 -2
index 2780886e8ba3..de062fb201bc 100644

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

drivers/xen/xen-balloon.c +1 -1
index b437fccd4e62..294f35ce9e46 100644

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

fs/btrfs/check-integrity.c +6 -1
index a3fdb4fe967d..daf45472bef9 100644

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

fs/btrfs/dev-replace.c +6 -0
index e2ba0419297a..d20b244623f2 100644

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

fs/btrfs/extent-tree.c +1 -1
index 8aab7a6c1e58..53cac20650d8 100644

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

fs/btrfs/relocation.c +12 -11
index 879b76fa881a..be94c65bb4d2 100644

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

fs/btrfs/super.c +28 -16

44 lines not on this page · raw message

fs/btrfs/tree-checker.c +14 -1
index 8d40e7dd8c30..d014af352ce0 100644

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

fs/btrfs/volumes.c +59 -35

94 lines not on this page · raw message

fs/cifs/cifs_debug.c +8 -0
index 991bfb271908..b20297988fe0 100644

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

fs/cifs/connect.c +6 -2
index 5df2c0698cda..9d02563b2147 100644

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

fs/cifs/smb2misc.c +7 -0
index 3ff7cec2da81..239215dcc00b 100644

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

fs/cifs/smb2pdu.c +51 -52

103 lines not on this page · raw message

fs/dcache.c +2 -1
index ceb7b491d1b9..d19a0dc46c04 100644

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

fs/f2fs/data.c +8 -0
index 8f931d699287..b61954d40c25 100644

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

fs/f2fs/file.c +32 -16

48 lines not on this page · raw message

fs/fat/cache.c +12 -7
index e9bed49df6b7..78d501c1fb65 100644

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

fs/fat/fat.h +5 -0
index 8fc1093da47d..a0a00f3734bc 100644

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

fs/fat/fatent.c +3 -3
index bac10de678cc..3aef8630a4b9 100644

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

fs/hfs/brec.c +4 -3
index ad04a5741016..9a8772465a90 100644

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

fs/hfsplus/dir.c +2 -2
index b5254378f011..cd017d7dbdfa 100644

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

fs/hfsplus/super.c +3 -1
index a6c0f54c48c3..80abba550bfa 100644

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

fs/nfs/nfs4proc.c +1 -1
index 464db0c0f5c8..ff98e2a3f3cc 100644

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

fs/proc/kcore.c +3 -1
index e64ecb9f2720..66c373230e60 100644

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

fs/proc/vmcore.c +2 -0
index cfb6674331fd..0651646dd04d 100644

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

fs/reiserfs/reiserfs.h +1 -1
index ae4811fecc1f..6d670bd9ab6b 100644

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

include/linux/pci_ids.h +2 -0
index 29502238e510..bf85e152af05 100644

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

include/net/tcp.h +4 -0
index cd3ecda9386a..106e01c721e6 100644

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

include/uapi/linux/keyctl.h +1 -1
index 7b8c9e19bad1..910cc4334b21 100644

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

kernel/bpf/inode.c +5 -3
index 76efe9a183f5..fc5b103512e7 100644

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

kernel/bpf/sockmap.c +68 -52

120 lines not on this page · raw message

kernel/fork.c +3 -2
index 1b27babc4c78..8ed48ca2cc43 100644

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

kernel/workqueue.c +30 -15

45 lines not on this page · raw message

lib/debugobjects.c +5 -2
index 994be4805cec..24c1df0d7466 100644

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

mm/Kconfig +1 -1
index ce95491abd6a..94af022b7f3d 100644

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

mm/fadvise.c +6 -2
index afa41491d324..2d8376e3c640 100644

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

net/9p/trans_fd.c +5 -5
index ef456395645a..7fb60dd4be79 100644

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

net/9p/trans_virtio.c +2 -1
index 4c2da2513c8b..2dc1c293092b 100644

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

net/core/xdp.c +3 -11
index 6771f1855b96..2657056130a4 100644

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

net/ipv4/ip_gre.c +3 -0
index 2d8efeecf619..055f4bbba86b 100644

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

net/ipv4/tcp_ipv4.c +6 -0
index 3b2711e33e4c..488b201851d7 100644

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

net/ipv4/tcp_minisocks.c +2 -1
index 1dda1341a223..b690132f5da2 100644

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

net/ipv4/tcp_ulp.c +3 -1
index 622caa4039e0..a5995bb2eaca 100644

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

net/ipv6/ip6_fib.c +6 -1
index d212738e9d10..5516f55e214b 100644

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

net/ipv6/ip6_gre.c +1 -0
index cd2cfb04e5d8..7ec997fcbc43 100644

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

net/ipv6/ip6_vti.c +5 -2
index c72ae3a4fe09..c31a7c4a9249 100644

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

net/ipv6/netfilter/ip6t_rpfilter.c +11 -1
index 0fe61ede77c6..c3c6b09acdc4 100644

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

net/ipv6/route.c +1 -2
index 7208c16302f6..18e00ce1719a 100644

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

net/netfilter/ipvs/ip_vs_core.c +11 -4
index 0679dd101e72..7ca926a03b81 100644

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

net/netfilter/nf_conntrack_netlink.c +17 -9
index 20a2e37c76d1..e952eedf44b4 100644

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

net/netfilter/nfnetlink_acct.c +13 -16
index a0e5adf0b3b6..8fa8bf7c48e6 100644

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

net/netfilter/x_tables.c +1 -6
index d0d8397c9588..aecadd471e1d 100644

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

net/rds/ib_frmr.c +1 -0
index d152e48ea371..8596eed6d9a8 100644

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

net/sched/act_ife.c +45 -33

78 lines not on this page · raw message

net/sched/act_pedit.c +13 -5
index 8a925c72db5f..bad475c87688 100644

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

net/sched/cls_u32.c +8 -2
index fb861f90fde6..260749956ef3 100644

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

net/sctp/proc.c +0 -8
index ef5c9a82d4e8..a644292f9faf 100644

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

net/sctp/socket.c +15 -7
index ce620e878538..50ee07cd20c4 100644

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

net/sunrpc/auth_gss/gss_krb5_crypto.c +9 -3
index 8654494b4d0a..834eb2b9e41b 100644

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

net/tipc/name_table.c +4 -6
index bebe88cae07b..ff968c7afef6 100644

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

net/tipc/name_table.h +2 -7
index 0febba41da86..892bd750b85f 100644

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

net/tipc/socket.c +2 -0
index 930852c54d7a..0a5fa347135e 100644

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

net/tls/tls_main.c +1 -0
index 301f22430469..45188d920013 100644

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

samples/bpf/xdp_redirect_cpu_user.c +2 -1
index 4b4d78fffe30..da9070889223 100644

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

samples/bpf/xdp_rxq_info_user.c +2 -1
index e4e9ba52bff0..bb278447299c 100644

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

scripts/coccicheck +3 -2
index 9fedca611b7f..e04d328210ac 100755

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

scripts/depmod.sh +2 -2
index 999d585eaa73..e5f0aad75b96 100755

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

scripts/mod/modpost.c +4 -4
index 1663fb19343a..b95cf57782a3 100644

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

security/apparmor/policy_ns.c +1 -1
index b0f9dc3f765a..1a7cec5d9cac 100644

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

security/keys/dh.c +1 -1
index b203f7758f97..1a68d27e72b4 100644

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

security/selinux/selinuxfs.c +25 -8
index 79d3709b0671..0b66d7283b00 100644

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

sound/soc/codecs/rt5677.c +1 -1
index 8a0181a2db08..47feef30dadb 100644

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

sound/soc/codecs/wm8994.c +1 -0
index 7fdfdf3f6e67..14f1b0c0d286 100644

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

tools/perf/arch/arm64/util/arm-spe.c +1 -0
index 1120e39c1b00..5ccfce87e693 100644

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

tools/perf/arch/powerpc/util/sym-handling.c +3 -1
index 53d83d7e6a09..20e7d74d86cd 100644

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

tools/perf/util/namespaces.c +3 -0
index 5be021701f34..cf8bd123cf73 100644

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

tools/testing/selftests/powerpc/harness.c +12 -6
index 66d31de60b9a..9d7166dfad1e 100644

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

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

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