Linux 6.1.12
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.1.12 kernel.
All users of the 6.1 kernel series must upgrade.
The updated 6.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/admin-guide/hw-vuln/cross-thread-rsb.rst | 92 +++++++ Documentation/admin-guide/hw-vuln/index.rst | 1 Makefile | 2 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 6 arch/arm64/boot/dts/mediatek/mt8195.dtsi | 4 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 arch/powerpc/kernel/interrupt.c | 6 arch/riscv/kernel/probes/kprobes.c | 8 arch/riscv/kernel/stacktrace.c | 3 arch/riscv/mm/cacheflush.c | 4 arch/x86/include/asm/cpufeatures.h | 1 arch/x86/kernel/cpu/common.c | 9 arch/x86/kvm/x86.c | 43 ++- drivers/clk/ingenic/jz4760-cgu.c | 18 - drivers/clk/microchip/clk-mpfs-ccc.c | 10 drivers/cpufreq/qcom-cpufreq-hw.c | 24 - drivers/cxl/core/region.c | 12 drivers/firmware/efi/libstub/arm64-stub.c | 9 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 2 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 42 ++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 5 drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h | 29 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 4 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 6 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 1 drivers/gpu/drm/i915/display/intel_bios.c | 33 +- drivers/gpu/drm/i915/display/skl_watermark.c | 3 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 14 - drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 drivers/gpu/drm/virtio/virtgpu_ioctl.c | 5 drivers/hid/amd-sfh-hid/amd_sfh_client.c | 13 drivers/hid/amd-sfh-hid/amd_sfh_hid.h | 1 drivers/hid/hid-logitech-hidpp.c | 3 drivers/infiniband/hw/hfi1/file_ops.c | 7 drivers/infiniband/hw/irdma/cm.c | 3 drivers/infiniband/hw/usnic/usnic_uiom.c | 8 drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 drivers/net/bonding/bond_debugfs.c | 2 drivers/net/dsa/mt7530.c | 26 + drivers/net/ethernet/cadence/macb_main.c | 31 +- drivers/net/ethernet/intel/ice/ice_main.c | 2 drivers/net/ethernet/intel/ice/ice_switch.c | 2 drivers/net/ethernet/intel/ice/ice_vf_vsi_vlan_ops.c | 16 + drivers/net/ethernet/intel/igc/igc_main.c | 25 + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 5 drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 3 drivers/net/ethernet/mellanox/mlx5/core/ecpf.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c | 4 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 90 +----- drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c | 2 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 13 drivers/net/ethernet/mellanox/mlx5/core/main.c | 14 - drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 37 +- drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 2 drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c | 4 drivers/net/ethernet/mscc/ocelot_flower.c | 24 - drivers/net/ethernet/mscc/ocelot_ptp.c | 8 drivers/net/ethernet/pensando/ionic/ionic_dev.c | 9 drivers/net/ethernet/pensando/ionic/ionic_dev.h | 12 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 56 +++- drivers/net/ethernet/pensando/ionic/ionic_lif.h | 2 drivers/net/ethernet/pensando/ionic/ionic_main.c | 29 ++ drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 110 +++++++- drivers/net/hyperv/netvsc.c | 2 drivers/net/phy/meson-gxl.c | 2 drivers/net/phy/phylink.c | 5 drivers/net/usb/plusb.c | 4 drivers/nvdimm/Kconfig | 19 + drivers/nvdimm/nd.h | 2 drivers/nvdimm/pfn_devs.c | 42 ++- drivers/of/address.c | 21 + drivers/of/platform.c | 12 drivers/pci/pci.c | 7 drivers/pci/pci.h | 4 drivers/pci/pcie/aspm.c | 111 ++------ drivers/pinctrl/aspeed/pinctrl-aspeed.c | 13 drivers/pinctrl/intel/pinctrl-intel.c | 16 - drivers/pinctrl/mediatek/pinctrl-mt8195.c | 4 drivers/pinctrl/pinctrl-single.c | 2 drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c | 2 drivers/spi/spi-dw-core.c | 2 drivers/usb/core/quirks.c | 3 drivers/usb/typec/altmodes/displayport.c | 8 drivers/video/fbdev/nvidia/nvidia.c | 81 +++--- fs/btrfs/tree-log.c | 23 + fs/btrfs/tree-log.h | 2 fs/btrfs/volumes.c | 22 + fs/btrfs/zlib.c | 2 fs/ceph/mds_client.c | 6 fs/cifs/file.c | 4 include/linux/mlx5/driver.h | 13 include/linux/trace_events.h | 1 include/trace/stages/stage4_event_fields.h | 3 include/uapi/drm/virtgpu_drm.h | 1 include/uapi/linux/ip.h | 1 include/uapi/linux/ipv6.h | 1 kernel/cgroup/cpuset.c | 18 - kernel/locking/rtmutex.c | 5 kernel/trace/trace.c | 3 kernel/trace/trace.h | 1 kernel/trace/trace_events.c | 39 ++ kernel/trace/trace_export.c | 3 mm/page_alloc.c | 5 net/can/j1939/address-claim.c | 40 +++ net/core/sock.c | 3 net/ipv4/af_inet.c | 1 net/ipv4/inet_connection_sock.c | 3 net/ipv6/af_inet6.c | 1 net/mptcp/protocol.c | 9 net/mptcp/subflow.c | 10 net/rds/message.c | 6 net/xfrm/xfrm_compat.c | 4 net/xfrm/xfrm_input.c | 3 net/xfrm/xfrm_policy.c | 11 net/xfrm/xfrm_state.c | 10 sound/pci/hda/patch_realtek.c | 9 sound/pci/lx6464es/lx_core.c | 11 sound/soc/codecs/tas5805m.c | 131 ++++++---- sound/soc/fsl/fsl_sai.c | 1 sound/soc/soc-topology.c | 8 sound/synth/emux/emux_nrpn.c | 3 tools/testing/selftests/net/forwarding/lib.sh | 4 tools/testing/selftests/net/mptcp/mptcp_join.sh | 22 + tools/testing/selftests/net/test_vxlan_vnifiltering.sh | 18 - 132 files changed, 1211 insertions(+), 615 deletions(-)
Adham Faris (1):
net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change
Alan Stern (1):
net: USB: Fix wrong-direction WARNING in plusb.c
Alex Deucher (1):
drm/amd/display: properly handling AGP aperture in vm setup
Alexander Potapenko (1):
btrfs: zlib: zero-initialize zlib workspace
Allen Hubbe (1):
ionic: missed doorbell workaround
Amadeusz Sławiński (1):
ASoC: topology: Return -ENOMEM on memory allocation failure
Amir Tzin (1):
net/mlx5e: Fix crash unsetting rx-vlan-filter in switchdev mode
Anand Jain (1):
btrfs: free device in btrfs_close_devices for a single device filesystem
Anastasia Belova (1):
xfrm: compat: change expression for switch in xfrm_xlate64
Andy Chi (1):
ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform.
Andy Shevchenko (1):
pinctrl: intel: Restore the pins that used to be in Direct IRQ mode
Anirudh Venkataramanan (1):
ice: Do not use WQ_MEM_RECLAIM flag for workqueue
Aravind Iddamsetty (1):
drm/i915: Initialize the obj flags for shmem objects
Arnaud Ferraris (1):
arm64: dts: rockchip: fix input enable pinconf on rk3399
Artemii Karasev (1):
ALSA: emux: Avoid potential array out-of-bound in snd_emux_xg_control()
Bastien Nocera (1):
HID: logitech: Disable hi-res scrolling on USB
Bjorn Helgaas (2):
Revert "PCI/ASPM: Save L1 PM Substates Capability for suspend/resume" Revert "PCI/ASPM: Refactor L1 PM Substates Control Register programming"
Brett Creeley (1):
ice: Fix disabling Rx VLAN filtering with port VLAN enabled
Casper Andersson (1):
net: microchip: sparx5: fix PTP init/deinit not checking all ports
Chen-Yu Tsai (1):
arm64: dts: mediatek: mt8195: Fix vdosys* compatible strings
Christian Hopps (1):
xfrm: fix bug with DSCP copy to v6 from v4 tunnel
Clément Léger (1):
net: phylink: move phy_device_free() to correctly release phy device
Dan Carpenter (1):
ALSA: pci: lx6464es: fix a debug loop
Dan Johansen (1):
arm64: dts: rockchip: set sdmmc0 speed to sd-uhs-sdr50 on rock-3a
Dan Williams (2):
cxl/region: Fix passthrough-decoder detection
nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE
Daniel Beer (2):
ASoC: tas5805m: rework to avoid scheduling while atomic.
ASoC: tas5805m: add missing page switch.
Darren Hart (1):
arm64: efi: Force the use of SetVirtualAddressMap() on eMAG and Altra Max machines
Dave Airlie (1):
nvidiafb: detect the hardware support before removing console.
David Chen (1):
Fix page corruption caused by racy check in __free_pages
Dean Luick (1):
IB/hfi1: Restore allocated resources on failed copyout
Devid Antonio Filoni (1):
can: j1939: do not wait 250 ms if the same addr was already claimed
Douglas Anderson (1):
cpufreq: qcom-hw: Fix cpufreq_driver->get() for non-LMH systems
Dragos Tatulea (2):
IB/IPoIB: Fix legacy IPoIB due to wrong number of queues net/mlx5e: IPoIB, Show unknown speed instead of error
Edson Juliano Drosdeck (1):
ALSA: hda/realtek: Add Positivo N14KP6-TG
Elvis Angelaccio (1):
ALSA: hda/realtek: Enable mute/micmute LEDs on HP Elitebook, 645 G9
Eric Dumazet (2):
xfrm/compat: prevent potential spectre v1 gadget in xfrm_xlate32_attr()
xfrm: annotate data-race around use_time
Evan Quan (3):
drm/amd/pm: add SMU 13.0.7 missing GetPptLimit message mapping drm/amd/pm: bump SMU 13.0.0 driver_if header version drm/amd/pm: bump SMU 13.0.7 driver_if header version
Fan Ni (1):
cxl/region: Fix null pointer dereference for resetting decoder
Filipe Manana (1):
btrfs: simplify update of last_dir_index_offset when logging a directory
Friedrich Vock (1):
drm/amdgpu: Use the TGID for trace_amdgpu_vm_update_ptes
Geert Uytterhoeven (1):
clk: microchip: mpfs-ccc: Use devm_kasprintf() for allocating formatted strings
Greg Kroah-Hartman (1):
Linux 6.1.12
Guilherme G. Piccoli (1):
drm/amdgpu/fence: Fix oops due to non-matching drm_sched init/fini
Guillaume Pinot (1):
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro 360
Guo Ren (2):
riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte
riscv: kprobe: Fixup misaligned load text
Guodong Liu (1):
pinctrl: mediatek: Fix the drive register definition of some Pins
Hangbin Liu (1):
selftests: forwarding: lib: quote the sysctl values
Heiner Kallweit (4):
net: phy: meson-gxl: use MMD access dummy stubs for GXL, internal PHY
arm64: dts: meson-gx: Make mmc host controller interrupts level-sensitive
arm64: dts: meson-g12-common: Make mmc host controller interrupts level-sensitive
arm64: dts: meson-axg: Make mmc host controller interrupts level-sensitive
Herton R. Krzesinski (1):
uapi: add missing ip/ipv6 header dependencies for linux/stddef.h
Ido Schimmel (1):
selftests: Fix failing VXLAN VNI filtering test
Jane Jian (1):
drm/amdgpu/smu: skip pptable init under sriov
Joel Stanley (2):
pinctrl: aspeed: Fix confusing types in return value
pinctrl: aspeed: Revert "Force to disable the function's signal"
Josef Bacik (1):
btrfs: limit device extents to the device size
Kent Russell (1):
drm/amdgpu: Add unique_id support for GC 11.0.1/2
Kevin Yang (1):
txhash: fix sk->sk_txrehash default
Krzysztof Kozlowski (1):
pinctrl: qcom: sm8450-lpass-lpi: correct swr_rx_data group
Liu Shixin (1):
riscv: stacktrace: Fix missing the first frame
Maher Sanalla (2):
net/mlx5: Store page counters in a single array net/mlx5: Expose SF firmware pages counter
Mario Limonciello (1):
HID: amd_sfh: if no sensors are enabled, clean up
Mark Brown (1):
of/address: Return an error when no valid dma-ranges are found
Mark Pearson (1):
usb: core: add quirk for Alcor Link AK9563 smartcard reader
Matthieu Baerts (1):
selftests: mptcp: stop tests earlier
Maxim Korotkov (1):
pinctrl: single: fix potential NULL dereference
Melissa Wen (1):
drm/amd/display: fix cursor offset on rotation 180
Michael Kelley (1):
hv_netvsc: Allocate memory in netvsc_dma_map() with GFP_ATOMIC
Michal Suchanek (1):
of: Make OF framebuffer device names unique
Neel Patel (2):
ionic: clean interrupt before enabling queue to avoid credit race
ionic: refactor use of ionic_rx_fill()
Nicholas Piggin (1):
powerpc/64s/interrupt: Fix interrupt exit race with security mitigation switch
Nikita Zhandarovich (1):
RDMA/irdma: Fix potential NULL-ptr-dereference
Paolo Abeni (3):
mptcp: do not wait for bare sockets' timeout
mptcp: be careful on subflow status propagation on errors
selftests: mptcp: allow more slack for slow test-case
Paul Cercueil (1):
clk: ingenic: jz4760: Update M/N/OD calculation algorithm
Pietro Borrello (1):
rds: rds_rm_zerocopy_callback() use list_first_entry()
Prashant Malani (1):
usb: typec: altmodes/displayport: Fix probe pin assign check
Qi Zheng (1):
bonding: fix error checking in bond_debug_reregister()
Radhey Shyam Pandey (1):
net: macb: Perform zynqmp dynamic configuration only for SGMII interface
Rob Clark (1):
drm/i915: Move fd_install after last use of fence
Ryan Neph (1):
drm/virtio: exbuf->fence_fd unmodified on interrupted wait
Sasha Neftin (1):
igc: Add ndo_tx_timeout support
Serge Semin (1):
spi: dw: Fix wrong FIFO level setting for long xfers
Shay Drory (3):
net/mlx5: fw_tracer, Clear load bit when freeing string DBs buffers net/mlx5: fw_tracer, Zero consumer index when reloading the tracer net/mlx5: Serialize module cleanup with reload and remove
Shengjiu Wang (1):
ASoC: fsl_sai: fix getting version from VERID
Shiju Jose (1):
tracing: Fix poll() and select() do not work on per_cpu trace_pipe and trace_pipe_raw
Stefan Binding (1):
ALSA: hda/realtek: Add quirk for ASUS UM3402 using CS35L41
Tariq Toukan (1):
net: ethernet: mtk_eth_soc: fix wrong parameters order in __xdp_rxq_info_reg()
Tom Lendacky (3):
x86/speculation: Identify processors vulnerable to SMT RSB predictions
KVM: x86: Mitigate the cross-thread return address predictions bug Documentation/hw-vuln: Add documentation for Cross-Thread Return Predictions
Ville Syrjälä (2):
drm/i915: Don't do the WM0->WM1 copy w/a if WM1 is already enabled drm/i915: Fix VBT DSI DVO port handling
Vlad Buslov (1):
net/mlx5: Bridge, fix ageing of peer FDB entries
Vladimir Oltean (3):
net: dsa: mt7530: don't change PVC_EG_TAG when CPU port becomes VLAN-aware
net: mscc: ocelot: fix VCAP filters not matching on MAC with "protocol 802.1Q"
net: mscc: ocelot: fix all IPv6 getting trapped to CPU when PTP timestamping is used
Wander Lairson Costa (1):
rtmutex: Ensure that the top waiter is always woken up
Will Deacon (1):
cpuset: Call set_cpus_allowed_ptr() with appropriate mask for task
Xiubo Li (1):
ceph: flush cap releases when the session is flushed
Yafang Shao (1):
tracing: Fix TASK_COMM_LEN in trace event format file
Yang Yingliang (1):
RDMA/usnic: use iommu_map_atomic() under spin_lock()
Zhang Changzhong (1):
ice: switch: fix potential memleak in ice_add_adv_recipe()
ZhaoLong Wang (1):
cifs: Fix use-after-free in rdata->read_into_pages()
Greg Kroah-Hartman
maintainerDocumentation/admin-guide/hw-vuln/cross-thread-rsb.rst new file +92 -0
@@ -0,0 +1,92 @@ + +.. SPDX-License-Identifier: GPL-2.0 + +Cross-Thread Return Address Predictions +======================================= + +Certain AMD and Hygon processors are subject to a cross-thread return address +predictions vulnerability. When running in SMT mode and one sibling thread +transitions out of C0 state, the other sibling thread could use return target +predictions from the sibling thread that transitioned out of C0. + +The Spectre v2 mitigations protect the Linux kernel, as it fills the return +address prediction entries with safe targets when context switching to the idle +thread. However, KVM does allow a VMM to prevent exiting guest mode when +transitioning out of C0. This could result in a guest-controlled return target +being consumed by the sibling thread. + +Affected processors +------------------- + +The following CPUs are vulnerable: + + - AMD Family 17h processors + - Hygon Family 18h processors + +Related CVEs +------------ + +The following CVE entry is related to this issue: + + ============== ======================================= + CVE-2022-27672 Cross-Thread Return Address Predictions + ============== ======================================= + +Problem +------- + +Affected SMT-capable processors support 1T and 2T modes of execution when SMT +is enabled. In 2T mode, both threads in a core are executing code. For the +processor core to enter 1T mode, it is required that one of the threads +requests to transition out of the C0 state. This can be communicated with the +HLT instruction or with an MWAIT instruction that requests non-C0. +When the thread re-enters the C0 state, the processor transitions back +to 2T mode, assuming the other thread is also still in C0 state. + +In affected processors, the return address predictor (RAP) is partitioned +depending on the SMT mode. For instance, in 2T mode each thread uses a private +16-entry RAP, but in 1T mode, the active thread uses a 32-entry RAP. Upon +transition between 1T/2T mode, the RAP contents are not modified but the RAP +pointers (which control the next return target to use for predictions) may +change. This behavior may result in return targets from one SMT thread being +used by RET predictions in the sibling thread following a 1T/2T switch. In +particular, a RET instruction executed immediately after a transition to 1T may +use a return target from the thread that just became idle. In theory, this +could lead to information disclosure if the return targets used do not come +from trustworthy code. + +Attack scenarios +---------------- + +An attack can be mounted on affected processors by performing a series of CALL +instructions with targeted return locations and then transitioning out of C0 +state. + +Mitigation mechanism +-------------------- + +Before entering idle state, the kernel context switches to the idle thread. The +context switch fills the RAP entries (referred to as the RSB in Linux) with safe +targets by performing a sequence of CALL instructions. + +Prevent a guest VM from directly putting the processor into an idle state by +intercepting HLT and MWAIT instructions. + +Both mitigations are required to fully address this issue. + +Mitigation control on the kernel command line +--------------------------------------------- + +Use existing Spectre v2 mitigations that will fill the RSB on context switch. + +Mitigation control for KVM - module parameter +--------------------------------------------- + +By default, the KVM hypervisor mitigates this issue by intercepting guest +attempts to transition out of C0. A VMM can use the KVM_CAP_X86_DISABLE_EXITS +capability to override those interceptions, but since this is not common, the +mitigation that covers this path is not enabled by default. + +The mitigation for the KVM_CAP_X86_DISABLE_EXITS capability can be turned on +using the boolean module parameter mitigate_smt_rsb, e.g.: + kvm.mitigate_smt_rsb=1
Documentation/admin-guide/hw-vuln/index.rst +1 -0
@@ -18,3 +18,4 @@ are configurable at compile, boot or run time. core-scheduling.rst l1d_flush.rst processor_mmio_stale_data.rst + cross-thread-rsb.rst
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 1 -SUBLEVEL = 11 +SUBLEVEL = 12 EXTRAVERSION = NAME = Hurr durr I'ma ninja sloth
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +2 -2
@@ -1885,7 +1885,7 @@ apb: bus@ffe00000 { sd_emmc_b: sd@5000 { compatible = "amlogic,meson-axg-mmc"; reg = <0x0 0x5000 0x0 0x800>; - interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; clocks = <&clkc CLKID_SD_EMMC_B>, <&clkc CLKID_SD_EMMC_B_CLK0>,
@@ -1897,7 +1897,7 @@ sd_emmc_b: sd@5000 { sd_emmc_c: mmc@7000 { compatible = "amlogic,meson-axg-mmc"; reg = <0x0 0x7000 0x0 0x800>; - interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; clocks = <&clkc CLKID_SD_EMMC_C>, <&clkc CLKID_SD_EMMC_C_CLK0>,
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +3 -3
@@ -2318,7 +2318,7 @@ uart_A: serial@24000 { sd_emmc_a: sd@ffe03000 { compatible = "amlogic,meson-axg-mmc"; reg = <0x0 0xffe03000 0x0 0x800>; - interrupts = <GIC_SPI 189 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; clocks = <&clkc CLKID_SD_EMMC_A>, <&clkc CLKID_SD_EMMC_A_CLK0>,
@@ -2330,7 +2330,7 @@ sd_emmc_a: sd@ffe03000 { sd_emmc_b: sd@ffe05000 { compatible = "amlogic,meson-axg-mmc"; reg = <0x0 0xffe05000 0x0 0x800>; - interrupts = <GIC_SPI 190 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; clocks = <&clkc CLKID_SD_EMMC_B>, <&clkc CLKID_SD_EMMC_B_CLK0>,
@@ -2342,7 +2342,7 @@ sd_emmc_b: sd@ffe05000 { sd_emmc_c: mmc@ffe07000 { compatible = "amlogic,meson-axg-mmc"; reg = <0x0 0xffe07000 0x0 0x800>; - interrupts = <GIC_SPI 191 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; clocks = <&clkc CLKID_SD_EMMC_C>, <&clkc CLKID_SD_EMMC_C_CLK0>,
arch/arm64/boot/dts/amlogic/meson-gx.dtsi +3 -3
@@ -602,21 +602,21 @@ apb: apb@d0000000 { sd_emmc_a: mmc@70000 { compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; reg = <0x0 0x70000 0x0 0x800>; - interrupts = <GIC_SPI 216 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; }; sd_emmc_b: mmc@72000 { compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; reg = <0x0 0x72000 0x0 0x800>; - interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; }; sd_emmc_c: mmc@74000 { compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; reg = <0x0 0x74000 0x0 0x800>; - interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; }; };
arch/arm64/boot/dts/mediatek/mt8195.dtsi +2 -2
@@ -1966,7 +1966,7 @@ vencsys_core1: clock-controller@1b000000 { }; vdosys0: syscon@1c01a000 { - compatible = "mediatek,mt8195-mmsys", "syscon"; + compatible = "mediatek,mt8195-vdosys0", "mediatek,mt8195-mmsys", "syscon"; reg = <0 0x1c01a000 0 0x1000>; mboxes = <&gce0 0 CMDQ_THR_PRIO_4>; #clock-cells = <1>;
@@ -2101,7 +2101,7 @@ larb1: larb@1c019000 { }; vdosys1: syscon@1c100000 { - compatible = "mediatek,mt8195-mmsys", "syscon"; + compatible = "mediatek,mt8195-vdosys1", "syscon"; reg = <0 0x1c100000 0 0x1000>; #clock-cells = <1>; };
arch/arm64/boot/dts/rockchip/rk3399.dtsi +0 -2
@@ -2221,13 +2221,11 @@ pcfg_input_enable: pcfg-input-enable { pcfg_input_pull_up: pcfg-input-pull-up { input-enable; bias-pull-up; - drive-strength = <2>; }; pcfg_input_pull_down: pcfg-input-pull-down { input-enable; bias-pull-down; - drive-strength = <2>; }; clock {
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +1 -1
@@ -642,7 +642,7 @@ &sdmmc0 { disable-wp; pinctrl-names = "default"; pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; - sd-uhs-sdr104; + sd-uhs-sdr50; vmmc-supply = <&vcc3v3_sd>; vqmmc-supply = <&vccio_sd>; status = "okay";
arch/powerpc/kernel/interrupt.c +4 -2
@@ -50,16 +50,18 @@ static inline bool exit_must_hard_disable(void)*/ static notrace __always_inline bool prep_irq_for_enabled_exit(bool restartable) { +bool must_hard_disable = (exit_must_hard_disable () || !restartable); +/* This must be done with RI=1 because tracing may touch vmaps */ trace_hardirqs_on (); -if (exit_must_hard_disable () || !restartable) +if (must_hard_disable)__hard_EE_RI_disable ();#ifdef CONFIG_PPC64 /* This pattern matches prep_irq_for_idle */ if (unlikely (lazy_irq_pending_nocheck ())) { -if (exit_must_hard_disable () || !restartable) { +if (must_hard_disable) { local_paca->irq_happened |=PACA_IRQ_HARD_DIS ;__hard_RI_enable (); }
arch/riscv/kernel/probes/kprobes.c +5 -3
@@ -65,16 +65,18 @@ static bool __kprobes arch_check_kprobe(struct kprobe *p)int __kprobes arch_prepare_kprobe (struct kprobe *p) { -unsigned long probe_addr = (unsigned long )p->addr; +u16 *insn = (u16 *)p->addr; -if (probe_addr &0x1 ) +if ((unsigned long )insn &0x1 )return -EILSEQ ;if (!arch_check_kprobe (p))return -EILSEQ ;/* copy instruction */ - p->opcode = *p->addr; + p->opcode = (kprobe_opcode_t)(*insn++); +if (GET_INSN_LENGTH (p->opcode) ==4 ) + p->opcode |= (kprobe_opcode_t)(*insn) <<16 ;/* decode instruction */ switch (riscv_probe_decode_insn (p->addr, &p->ainsn.api)) {
arch/riscv/kernel/stacktrace.c +2 -1
@@ -30,6 +30,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, fp = (unsigned long )__builtin_frame_address (0 ); sp = current_stack_pointer; pc = (unsigned long )walk_stackframe; + level =-1 ; }else {/* task blocked in __switch_to */ fp = task->thread.s[0 ];
@@ -41,7 +42,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,unsigned long low, high;struct stackframe *frame; -if (unlikely (!__kernel_text_address (pc) || (level++ >=1 && !fn (arg, pc)))) +if (unlikely (!__kernel_text_address (pc) || (level++ >=0 && !fn (arg, pc))))break ;/* Validate frame pointer */
arch/riscv/mm/cacheflush.c +3 -1
@@ -83,8 +83,10 @@ void flush_icache_pte(pte_t pte) {struct page *page =pte_page (pte); -if (!test_and_set_bit (PG_dcache_clean, &page->flags)) +if (!test_bit (PG_dcache_clean, &page->flags)) {flush_icache_all (); +set_bit (PG_dcache_clean, &page->flags); + } }#endif /* CONFIG_MMU */
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -463,5 +463,6 @@#define X86_BUG_MMIO_UNKNOWN X86_BUG(26)/* CPU is too old and its MMIO Stale Data status is unknown */ #define X86_BUG_RETBLEED X86_BUG(27)/* CPU is affected by RETBleed */ #define X86_BUG_EIBRS_PBRSB X86_BUG(28)/* EIBRS is vulnerable to Post Barrier RSB Predictions */ +#define X86_BUG_SMT_RSB X86_BUG(29)/* CPU is vulnerable to Cross-Thread Return Address Predictions */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/kernel/cpu/common.c +7 -2
@@ -1235,6 +1235,8 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = {#define MMIO_SBDS BIT(2)/* CPU is affected by RETbleed, speculating where you would not expect it */ #define RETBLEED BIT(3) +/* CPU is affected by SMT (cross-thread) return predictions */ +#define SMT_RSB BIT(4)static const struct x86_cpu_id cpu_vuln_blacklist[]__initconst = {VULNBL_INTEL_STEPPINGS (IVYBRIDGE ,X86_STEPPING_ANY ,SRBDS ),
@@ -1266,8 +1268,8 @@ static const struct x86_cpu_id cpu_vuln_blacklist[] __initconst = {VULNBL_AMD (0x15 ,RETBLEED ),VULNBL_AMD (0x16 ,RETBLEED ), -VULNBL_AMD (0x17 ,RETBLEED ), - VULNBL_HYGON(0x18, RETBLEED), +VULNBL_AMD (0x17 ,RETBLEED |SMT_RSB ), + VULNBL_HYGON(0x18, RETBLEED | SMT_RSB), {} };
@@ -1385,6 +1387,9 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c) !(ia32_cap & ARCH_CAP_PBRSB_NO))setup_force_cpu_bug (X86_BUG_EIBRS_PBRSB ); +if (cpu_matches (cpu_vuln_blacklist,SMT_RSB )) +setup_force_cpu_bug (X86_BUG_SMT_RSB ); +if (cpu_matches (cpu_vuln_whitelist,NO_MELTDOWN ))return ;
arch/x86/kvm/x86.c +32 -11
69 lines not on this page · raw message
drivers/clk/ingenic/jz4760-cgu.c +8 -10
@@ -58,7 +58,7 @@ jz4760_cgu_calc_m_n_od(const struct ingenic_cgu_pll_info *pll_info, unsigned long rate, unsigned long parent_rate, unsigned int *pm, unsigned int *pn, unsigned int *pod) { - unsigned int m, n, od, m_max = (1 << pll_info->m_bits) - 2; + unsigned int m, n, od, m_max = (1 << pll_info->m_bits) - 1;/* The frequency after the N divider must be between 1 and 50 MHz. */ n = parent_rate / (1 *MHZ );
@@ -66,19 +66,17 @@ jz4760_cgu_calc_m_n_od(const struct ingenic_cgu_pll_info *pll_info,/* The N divider must be >= 2. */ n =clamp_val (n,2 ,1 << pll_info->n_bits); -for (;; n >>=1 ) { - od = (unsigned int )-1 ; + rate /=MHZ ; + parent_rate /=MHZ ; -do { - m = (rate /MHZ ) * (1 << ++od) * n / (parent_rate /MHZ ); - }while ((m > m_max || m &1 ) && (od <4 )); - -if (od <4 && m >=4 && m <= m_max) -break ; +for (m = m_max; m >= m_max && n >=2 ; n--) { + m = rate * n / parent_rate; + od = m &1 ; + m <<= od; } *pm = m; - *pn = n; + *pn = n +1 ; *pod =1 << od; }
drivers/clk/microchip/clk-mpfs-ccc.c +4 -6
@@ -164,12 +164,11 @@ static int mpfs_ccc_register_outputs(struct device *dev, struct mpfs_ccc_out_hw_for (unsigned int i =0 ; i < num_clks; i++) {struct mpfs_ccc_out_hw_clock *out_hw = &out_hws[i]; -char *name =devm_kzalloc (dev,23 ,GFP_KERNEL ); +char *name =devm_kasprintf (dev,GFP_KERNEL ,"%s_out%u" , parent->name, i);if (!name)return -ENOMEM ; -snprintf (name,23 ,"%s_out%u" , parent->name, i); out_hw->divider.hw.init =CLK_HW_INIT_HW (name, &parent->hw, &clk_divider_ops,0 ); out_hw->divider.reg = data->pll_base[i /MPFS_CCC_OUTPUTS_PER_PLL ] + out_hw->reg_offset;
@@ -201,14 +200,13 @@ static int mpfs_ccc_register_plls(struct device *dev, struct mpfs_ccc_pll_hw_clofor (unsigned int i =0 ; i < num_clks; i++) {struct mpfs_ccc_pll_hw_clock *pll_hw = &pll_hws[i]; -char *name =devm_kzalloc (dev,18 ,GFP_KERNEL ); -if (!name) + pll_hw->name =devm_kasprintf (dev,GFP_KERNEL ,"ccc%s_pll%u" , +strchrnul (dev->of_node->full_name,'@' ), i); +if (!pll_hw->name)return -ENOMEM ; pll_hw->base = data->pll_base[i]; -snprintf (name,18 ,"ccc%s_pll%u" ,strchrnul (dev->of_node->full_name,'@' ), i); - pll_hw->name = (const char *)name; pll_hw->hw.init =CLK_HW_INIT_PARENTS_DATA_FIXED_SIZE (pll_hw->name, pll_hw->parents, &mpfs_ccc_pll_ops,0 );
drivers/cpufreq/qcom-cpufreq-hw.c +13 -11
@@ -137,40 +137,42 @@ static unsigned long qcom_lmh_get_throttle_freq(struct qcom_cpufreq_data *data)return lval * xo_rate; } -/* Get the current frequency of the CPU (after throttling) */ -static unsigned int qcom_cpufreq_hw_get (unsigned int cpu) +/* Get the frequency requested by the cpufreq core for the CPU */ +static unsigned int qcom_cpufreq_get_freq (unsigned int cpu) {struct qcom_cpufreq_data *data; +const struct qcom_cpufreq_soc_data *soc_data;struct cpufreq_policy *policy; +unsigned int index; policy =cpufreq_cpu_get_raw (cpu);if (!policy)return 0 ; data = policy->driver_data; + soc_data = data->soc_data; -return qcom_lmh_get_throttle_freq (data) /HZ_PER_KHZ ; + index =readl_relaxed (data->base + soc_data->reg_perf_state); + index =min (index,LUT_MAX_ENTRIES -1 ); + +return policy->freq_table[index].frequency; } -/* Get the frequency requested by the cpufreq core for the CPU */ -static unsigned int qcom_cpufreq_get_freq (unsigned int cpu) +static unsigned int qcom_cpufreq_hw_get (unsigned int cpu) {struct qcom_cpufreq_data *data; -const struct qcom_cpufreq_soc_data *soc_data;struct cpufreq_policy *policy; -unsigned int index; policy =cpufreq_cpu_get_raw (cpu);if (!policy)return 0 ; data = policy->driver_data; - soc_data = data->soc_data; - index =readl_relaxed (data->base + soc_data->reg_perf_state); - index =min (index,LUT_MAX_ENTRIES -1 ); +if (data->throttle_irq >=0 ) +return qcom_lmh_get_throttle_freq (data) /HZ_PER_KHZ ; -return policy->freq_table[index].frequency; +return qcom_cpufreq_get_freq (cpu); } static unsigned int qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy,
drivers/cxl/core/region.c +7 -5
@@ -131,7 +131,7 @@ static int cxl_region_decode_reset(struct cxl_region *cxlr, int count)struct cxl_memdev *cxlmd =cxled_to_memdev (cxled);struct cxl_port *iter =cxled_to_port (cxled);struct cxl_ep *ep; -int rc; +int rc =0 ;while (!is_cxl_root (to_cxl_port (iter->dev.parent))) iter =to_cxl_port (iter->dev.parent);
@@ -143,7 +143,8 @@ static int cxl_region_decode_reset(struct cxl_region *cxlr, int count) cxl_rr =cxl_rr_load (iter, cxlr); cxld = cxl_rr->decoder; - rc = cxld->reset (cxld); +if (cxld->reset) + rc = cxld->reset (cxld);if (rc)return rc; }
@@ -186,7 +187,8 @@ static int cxl_region_decode_commit(struct cxl_region *cxlr) iter = ep->next, ep = cxl_ep_load(iter, cxlmd)) { cxl_rr =cxl_rr_load (iter, cxlr); cxld = cxl_rr->decoder; - cxld->reset (cxld); +if (cxld->reset) + cxld->reset (cxld); } cxled->cxld.reset (&cxled->cxld);
@@ -991,10 +993,10 @@ static int cxl_port_setup_targets(struct cxl_port *port,int i, distance;/* -* Passthrough ports impose no distance requirements between +* Passthrough decoders impose no distance requirements between * peers */ -if (port->nr_dports ==1 ) +if (cxl_rr->nr_targets ==1 ) distance =0 ;else distance = p->nr_targets / cxl_rr->nr_targets;
drivers/firmware/efi/libstub/arm64-stub.c +6 -3
@@ -20,10 +20,13 @@ static bool system_needs_vamap(void)const u8 *type1_family =efi_get_smbios_string (1 , family);/* -* Ampere Altra machines crash in SetTime() if SetVirtualAddressMap() -* has not been called prior. +* Ampere eMAG, Altra, and Altra Max machines crash in SetTime() if +* SetVirtualAddressMap() has not been called prior. */ -if (!type1_family ||strcmp (type1_family,"Altra" )) +if (!type1_family || ( +strcmp (type1_family,"eMAG" ) && +strcmp (type1_family,"Altra" ) && +strcmp (type1_family,"Altra Max" )))return false;efi_warn ("Working around broken SetVirtualAddressMap()\n" );
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +7 -1
@@ -564,7 +564,13 @@ void amdgpu_fence_driver_sw_fini(struct amdgpu_device *adev)if (!ring || !ring->fence_drv.initialized)continue ; -if (!ring->no_scheduler) +/* +* Notice we check for sched.ops since there's some +* override on the meaning of sched.ready by amdgpu. +* The natural check would be sched.ready, which is +* set as drm_sched_init() finishes... +*/ +if (ring->sched.ops)drm_sched_fini (&ring->sched);for (j =0 ; j <= ring->fence_drv.num_fences_mask; ++j)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c +1 -1
@@ -974,7 +974,7 @@ int amdgpu_vm_ptes_update(struct amdgpu_vm_update_params *params,trace_amdgpu_vm_update_ptes (params, frag_start, upd_end,min (nptes,32u ), dst, incr, upd_flags, - vm->task_info.pid, + vm->task_info.tgid, vm->immediate.fence_context); amdgpu_vm_pte_update_flags(params, to_amdgpu_bo_vm(pt), cursor.level, pe_start, dst,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +28 -14
52 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +1 -1
@@ -3612,7 +3612,7 @@ void dcn10_set_cursor_position(struct pipe_ctx *pipe_ctx) (int)hubp->curs_attr.width || pos_cpy.x <= (int)hubp->curs_attr.width + pipe_ctx->plane_state->src_rect.x) { - pos_cpy.x = temp_x + viewport_width; + pos_cpy.x =2 * viewport_width - temp_x; } } }else {
drivers/gpu/drm/amd/pm/amdgpu_pm.c +2 -0
@@ -1991,6 +1991,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_case IP_VERSION (9 ,4 ,2 ):case IP_VERSION (10 ,3 ,0 ):case IP_VERSION (11 ,0 ,0 ): +case IP_VERSION (11 ,0 ,1 ): +case IP_VERSION (11 ,0 ,2 ): *states =ATTR_STATE_SUPPORTED ;break ;default :
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h +3 -2
@@ -123,7 +123,8 @@ (1 << FEATURE_DS_FCLK_BIT) | \ (1 << FEATURE_DS_LCLK_BIT) | \ (1 << FEATURE_DS_DCFCLK_BIT) | \ - (1 << FEATURE_DS_UCLK_BIT)) + (1 << FEATURE_DS_UCLK_BIT) | \ + (1ULL << FEATURE_DS_VCN_BIT))//For use with feature control messages typedef enum {
@@ -522,9 +523,9 @@ typedef enum {TEMP_HOTSPOT_M ,TEMP_MEM ,TEMP_VR_GFX , -TEMP_VR_SOC ,TEMP_VR_MEM0 ,TEMP_VR_MEM1 , +TEMP_VR_SOC ,TEMP_VR_U ,TEMP_LIQUID0 , TEMP_LIQUID1,
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h +15 -14
@@ -113,20 +113,21 @@#define NUM_FEATURES 64#define ALLOWED_FEATURE_CTRL_DEFAULT 0xFFFFFFFFFFFFFFFFULL -#define ALLOWED_FEATURE_CTRL_SCPM (1 << FEATURE_DPM_GFXCLK_BIT) | \ - (1 << FEATURE_DPM_GFX_POWER_OPTIMIZER_BIT) | \ - (1 << FEATURE_DPM_UCLK_BIT) | \ - (1 << FEATURE_DPM_FCLK_BIT) | \ - (1 << FEATURE_DPM_SOCCLK_BIT) | \ - (1 << FEATURE_DPM_MP0CLK_BIT) | \ - (1 << FEATURE_DPM_LINK_BIT) | \ - (1 << FEATURE_DPM_DCN_BIT) | \ - (1 << FEATURE_DS_GFXCLK_BIT) | \ - (1 << FEATURE_DS_SOCCLK_BIT) | \ - (1 << FEATURE_DS_FCLK_BIT) | \ - (1 << FEATURE_DS_LCLK_BIT) | \ - (1 << FEATURE_DS_DCFCLK_BIT) | \ - (1 << FEATURE_DS_UCLK_BIT) +#define ALLOWED_FEATURE_CTRL_SCPM ((1 << FEATURE_DPM_GFXCLK_BIT) | \ + (1 << FEATURE_DPM_GFX_POWER_OPTIMIZER_BIT) | \ + (1 << FEATURE_DPM_UCLK_BIT) | \ + (1 << FEATURE_DPM_FCLK_BIT) | \ + (1 << FEATURE_DPM_SOCCLK_BIT) | \ + (1 << FEATURE_DPM_MP0CLK_BIT) | \ + (1 << FEATURE_DPM_LINK_BIT) | \ + (1 << FEATURE_DPM_DCN_BIT) | \ + (1 << FEATURE_DS_GFXCLK_BIT) | \ + (1 << FEATURE_DS_SOCCLK_BIT) | \ + (1 << FEATURE_DS_FCLK_BIT) | \ + (1 << FEATURE_DS_LCLK_BIT) | \ + (1 << FEATURE_DS_DCFCLK_BIT) | \ + (1 << FEATURE_DS_UCLK_BIT) | \ + (1ULL << FEATURE_DS_VCN_BIT))//For use with feature control messages typedef enum {
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h +2 -2
@@ -28,11 +28,11 @@#define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF#define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x04#define SMU13_DRIVER_IF_VERSION_ALDE 0x08 -#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_0 0x34 +#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_0 0x37#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_4 0x07#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_5 0x04#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_10 0x32 -#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_7 0x35 +#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_7 0x37#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_10 0x1D#define SMU13_MODE1_RESET_WAIT_TIME_IN_MS 500 //500ms
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +6 -0
@@ -407,6 +407,9 @@ static int smu_v13_0_0_setup_pptable(struct smu_context *smu)struct amdgpu_device *adev = smu->adev;int ret =0 ; +if (amdgpu_sriov_vf (smu->adev)) +return 0 ; + ret =smu_v13_0_0_get_pptable_from_pmfw (smu, &smu_table->power_play_table, &smu_table->power_play_table_size);
@@ -1257,6 +1260,9 @@ static int smu_v13_0_0_get_thermal_temperature_range(struct smu_context *smu, table_context->power_play_table;PPTable_t *pptable = smu->smu_table.driver_pptable; +if (amdgpu_sriov_vf (smu->adev)) +return 0 ; +if (!range)return -EINVAL ;
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +1 -0
@@ -124,6 +124,7 @@ static struct cmn2asic_msg_mapping smu_v13_0_7_message_map[SMU_MSG_MAX_COUNT] =MSG_MAP (DFCstateControl, PPSMC_MSG_SetExternalClientDfCstateAllow,0 ),MSG_MAP (ArmD3, PPSMC_MSG_ArmD3,0 ),MSG_MAP (AllowGpo, PPSMC_MSG_SetGpoAllow,0 ), + MSG_MAP(GetPptLimit, PPSMC_MSG_GetPptLimit, 0), }; static struct cmn2asic_mapping smu_v13_0_7_clk_map[SMU_CLK_COUNT] = {
drivers/gpu/drm/i915/display/intel_bios.c +23 -10
@@ -2466,6 +2466,22 @@ static enum port dvo_port_to_port(struct drm_i915_private *i915, dvo_port); } +static enum port +dsi_dvo_port_to_port (struct drm_i915_private *i915,u8 dvo_port) +{ +switch (dvo_port) { +case DVO_PORT_MIPIA : +return PORT_A ; +case DVO_PORT_MIPIC : +if (DISPLAY_VER (i915) >=11 ) +return PORT_B ; +else +return PORT_C ; +default : +return PORT_NONE ; + } +} +static int parse_bdb_230_dp_max_link_rate (const int vbt_max_link_rate) {switch (vbt_max_link_rate) {
@@ -3406,19 +3422,16 @@ bool intel_bios_is_dsi_present(struct drm_i915_private *i915, dvo_port = child->dvo_port; -if (dvo_port ==DVO_PORT_MIPIA || - (dvo_port ==DVO_PORT_MIPIB &&DISPLAY_VER (i915) >=11 ) || - (dvo_port ==DVO_PORT_MIPIC &&DISPLAY_VER (i915) <11 )) { -if (port) - *port = dvo_port -DVO_PORT_MIPIA ; -return true; - }else if (dvo_port ==DVO_PORT_MIPIB || - dvo_port ==DVO_PORT_MIPIC || - dvo_port ==DVO_PORT_MIPID ) { +if (dsi_dvo_port_to_port (i915, dvo_port) ==PORT_NONE ) {drm_dbg_kms (&i915->drm,"VBT has unsupported DSI port %c\n" ,port_name (dvo_port -DVO_PORT_MIPIA )); +continue ; } + +if (port) + *port =dsi_dvo_port_to_port (i915, dvo_port); +return true; }return false;
@@ -3503,7 +3516,7 @@ bool intel_bios_get_dsc_params(struct intel_encoder *encoder,if (!(child->device_type &DEVICE_TYPE_MIPI_OUTPUT ))continue ; -if (child->dvo_port -DVO_PORT_MIPIA == encoder->port) { +if (dsi_dvo_port_to_port (i915, child->dvo_port) == encoder->port) {if (!devdata->dsc)return false;
drivers/gpu/drm/i915/display/skl_watermark.c +2 -1
@@ -1587,7 +1587,8 @@ skl_crtc_allocate_plane_ddb(struct intel_atomic_state *state,skl_check_wm_level (&wm->wm[level], ddb);if (icl_need_wm1_wa (i915, plane_id) && - level ==1 && wm->wm[0 ].enable) { + level ==1 && !wm->wm[level].enable && + wm->wm[0 ].enable) { wm->wm[level].blocks = wm->wm[0 ].blocks; wm->wm[level].lines = wm->wm[0 ].lines; wm->wm[level].ignore_lines = wm->wm[0 ].ignore_lines;
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +7 -7
@@ -3478,6 +3478,13 @@ i915_gem_do_execbuffer(struct drm_device *dev, eb.composite_fence : &eb.requests[0]->fence); +if (unlikely (eb.gem_context->syncobj)) { +drm_syncobj_replace_fence (eb.gem_context->syncobj, + eb.composite_fence ? + eb.composite_fence : + &eb.requests[0 ]->fence); + } +if (out_fence) {if (err ==0 ) {fd_install (out_fence_fd, out_fence->file);
@@ -3489,13 +3496,6 @@ i915_gem_do_execbuffer(struct drm_device *dev, } } -if (unlikely (eb.gem_context->syncobj)) { -drm_syncobj_replace_fence (eb.gem_context->syncobj, - eb.composite_fence ? - eb.composite_fence : - &eb.requests[0 ]->fence); - } -if (!out_fence && eb.composite_fence)dma_fence_put (eb.composite_fence);
drivers/gpu/drm/i915/gem/i915_gem_shmem.c +1 -1
@@ -579,7 +579,7 @@ static int shmem_object_init(struct intel_memory_region *mem,mapping_set_gfp_mask (mapping, mask);GEM_BUG_ON (!(mapping_gfp_mask (mapping) & __GFP_RECLAIM)); -i915_gem_object_init (obj, &i915_gem_shmem_ops, &lock_class,0 ); +i915_gem_object_init (obj, &i915_gem_shmem_ops, &lock_class, flags); obj->mem_flags |=I915_BO_FLAG_STRUCT_PAGE ; obj->write_domain =I915_GEM_DOMAIN_CPU ; obj->read_domains =I915_GEM_DOMAIN_CPU ;
drivers/gpu/drm/virtio/virtgpu_ioctl.c +1 -4
@@ -126,7 +126,6 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,void __user *user_bo_handles =NULL ;struct virtio_gpu_object_array *buflist =NULL ;struct sync_file *sync_file; -int in_fence_fd = exbuf->fence_fd;int out_fence_fd =-1 ;void *buf;uint64_t fence_ctx;
@@ -152,13 +151,11 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, ring_idx = exbuf->ring_idx; } - exbuf->fence_fd =-1 ; -virtio_gpu_create_context (dev, file);if (exbuf->flags &VIRTGPU_EXECBUF_FENCE_FD_IN ) {struct dma_fence *in_fence; - in_fence =sync_file_get_fence (in_fence_fd); + in_fence =sync_file_get_fence (exbuf->fence_fd);if (!in_fence)return -EINVAL ;
drivers/hid/amd-sfh-hid/amd_sfh_client.c +11 -2
@@ -227,6 +227,7 @@ int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata) cl_data->num_hid_devices =amd_mp2_get_sensor_num (privdata, &cl_data->sensor_idx[0 ]);if (cl_data->num_hid_devices ==0 )return -ENODEV ; + cl_data->is_any_sensor_enabled = false;INIT_DELAYED_WORK (&cl_data->work, amd_sfh_work);INIT_DELAYED_WORK (&cl_data->work_buffer, amd_sfh_work_buffer);
@@ -287,6 +288,7 @@ int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata) status =amd_sfh_wait_for_response (privdata, cl_data->sensor_idx[i],SENSOR_ENABLED );if (status ==SENSOR_ENABLED ) { + cl_data->is_any_sensor_enabled = true; cl_data->sensor_sts[i] =SENSOR_ENABLED ; rc =amdtp_hid_probe (cl_data->cur_hid_dev, cl_data);if (rc) {
@@ -301,19 +303,26 @@ int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata) cl_data->sensor_sts[i]); goto cleanup; } + }else { + cl_data->sensor_sts[i] =SENSOR_DISABLED ; +dev_dbg (dev,"sid 0x%x (%s) status 0x%x\n" , + cl_data->sensor_idx[i], +get_sensor_name (cl_data->sensor_idx[i]), + cl_data->sensor_sts[i]); }dev_dbg (dev,"sid 0x%x (%s) status 0x%x\n" , cl_data->sensor_idx[i],get_sensor_name (cl_data->sensor_idx[i]), cl_data->sensor_sts[i]); } -if (mp2_ops->discovery_status && mp2_ops->discovery_status (privdata) ==0 ) { +if (!cl_data->is_any_sensor_enabled || + (mp2_ops->discovery_status && mp2_ops->discovery_status (privdata) ==0 )) {amd_sfh_hid_client_deinit (privdata);for (i =0 ; i < cl_data->num_hid_devices; i++) {devm_kfree (dev, cl_data->feature_report[i]);devm_kfree (dev, in_data->input_report[i]);devm_kfree (dev, cl_data->report_descr[i]); } -dev_warn (dev,"Failed to discover, sensors not enabled\n" ); +dev_warn (dev,"Failed to discover, sensors not enabled is %d\n" , cl_data->is_any_sensor_enabled);return -EOPNOTSUPP ; }schedule_delayed_work (&cl_data->work_buffer,msecs_to_jiffies (AMD_SFH_IDLE_LOOP ));
drivers/hid/amd-sfh-hid/amd_sfh_hid.h +1 -0
@@ -32,6 +32,7 @@ struct amd_input_data {struct amdtp_cl_data {u8 init_done;u32 cur_hid_dev; +bool is_any_sensor_enabled;u32 hid_dev_count;u32 num_hid_devices;struct device_info *hid_devices;
drivers/hid/hid-logitech-hidpp.c +2 -1
@@ -3978,7 +3978,8 @@ static void hidpp_connect_event(struct hidpp_device *hidpp) }hidpp_initialize_battery (hidpp); -hidpp_initialize_hires_scroll (hidpp); +if (!hid_is_usb (hidpp->hid_dev)) +hidpp_initialize_hires_scroll (hidpp);/* forward current battery state */ if (hidpp->capabilities &HIDPP_CAPABILITY_HIDPP10_BATTERY ) {
drivers/infiniband/hw/hfi1/file_ops.c +5 -2
@@ -1318,12 +1318,15 @@ static int user_exp_rcv_setup(struct hfi1_filedata *fd, unsigned long arg, addr = arg + offsetof(struct hfi1_tid_info , tidcnt);if (copy_to_user ((void __user *)addr, &tinfo.tidcnt,sizeof (tinfo.tidcnt))) -return -EFAULT ; + ret = -EFAULT ; addr = arg + offsetof(struct hfi1_tid_info , length); -if (copy_to_user ((void __user *)addr, &tinfo.length, +if (!ret &©_to_user ((void __user *)addr, &tinfo.length,sizeof (tinfo.length))) ret = -EFAULT ; + +if (ret) +hfi1_user_exp_rcv_invalid (fd, &tinfo); }return ret;
drivers/infiniband/hw/irdma/cm.c +3 -0
@@ -1722,6 +1722,9 @@ static int irdma_add_mqh_4(struct irdma_device *iwdev,continue ; idev =in_dev_get (ip_dev); +if (!idev) +continue ; +in_dev_for_each_ifa_rtnl (ifa, idev) { ibdev_dbg(&iwdev->ibdev, "CM: Allocating child CM Listener forIP=%pI4, vlan_id=%d, MAC=%pM\n",
drivers/infiniband/hw/usnic/usnic_uiom.c +4 -4
@@ -277,8 +277,8 @@ static int usnic_uiom_map_sorted_intervals(struct list_head *intervals, size = pa_end - pa_start +PAGE_SIZE ;usnic_dbg ("va 0x%lx pa %pa size 0x%zx flags 0x%x" , va_start, &pa_start, size, flags); - err =iommu_map (pd->domain, va_start, pa_start, - size, flags); + err =iommu_map_atomic (pd->domain, va_start, + pa_start, size, flags);if (err) {usnic_err ("Failed to map va 0x%lx pa %pa size 0x%zx with err %d\n" , va_start, &pa_start, size, err);
@@ -294,8 +294,8 @@ static int usnic_uiom_map_sorted_intervals(struct list_head *intervals, size = pa - pa_start +PAGE_SIZE ;usnic_dbg ("va 0x%lx pa %pa size 0x%zx flags 0x%x\n" , va_start, &pa_start, size, flags); - err =iommu_map (pd->domain, va_start, pa_start, - size, flags); + err =iommu_map_atomic (pd->domain, va_start, + pa_start, size, flags);if (err) {usnic_err ("Failed to map va 0x%lx pa %pa size 0x%zx with err %d\n" , va_start, &pa_start, size, err);
drivers/infiniband/ulp/ipoib/ipoib_main.c +8 -0
@@ -2200,6 +2200,14 @@ int ipoib_intf_init(struct ib_device *hca, u32 port, const char *name, rn->attach_mcast = ipoib_mcast_attach; rn->detach_mcast = ipoib_mcast_detach; rn->hca = hca; + + rc =netif_set_real_num_tx_queues (dev,1 ); +if (rc) + goto out; + + rc =netif_set_real_num_rx_queues (dev,1 ); +if (rc) + goto out; } priv->rn_ops = dev->netdev_ops;
drivers/net/bonding/bond_debugfs.c +1 -1
@@ -76,7 +76,7 @@ void bond_debug_reregister(struct bonding *bond) d =debugfs_rename (bonding_debug_root, bond->debug_dir, bonding_debug_root, bond->dev->name); -if (d) { +if (!IS_ERR (d)) { bond->debug_dir = d; }else {netdev_warn (bond->dev,"failed to reregister, so just unregister old one\n" );
drivers/net/dsa/mt7530.c +19 -7
@@ -1309,14 +1309,26 @@ mt7530_port_set_vlan_aware(struct dsa_switch *ds, int port)if (!priv->ports[port].pvid)mt7530_rmw (priv,MT7530_PVC_P (port),ACC_FRM_MASK ,MT7530_VLAN_ACC_TAGGED ); - } -/* Set the port as a user port which is to be able to recognize VID -* from incoming packets before fetching entry within the VLAN table. -*/ -mt7530_rmw (priv,MT7530_PVC_P (port),VLAN_ATTR_MASK |PVC_EG_TAG_MASK , -VLAN_ATTR (MT7530_VLAN_USER ) | -PVC_EG_TAG (MT7530_VLAN_EG_DISABLED )); +/* Set the port as a user port which is to be able to recognize +* VID from incoming packets before fetching entry within the +* VLAN table. +*/ +mt7530_rmw (priv,MT7530_PVC_P (port), +VLAN_ATTR_MASK |PVC_EG_TAG_MASK , +VLAN_ATTR (MT7530_VLAN_USER ) | +PVC_EG_TAG (MT7530_VLAN_EG_DISABLED )); + }else { +/* Also set CPU ports to the "user" VLAN port attribute, to +* allow VLAN classification, but keep the EG_TAG attribute as +* "consistent" (i.o.w. don't change its value) for packets +* received by the switch from the CPU, so that tagged packets +* are forwarded to user ports as tagged, and untagged as +* untagged. +*/ +mt7530_rmw (priv,MT7530_PVC_P (port),VLAN_ATTR_MASK , +VLAN_ATTR (MT7530_VLAN_USER )); + } } static void
drivers/net/ethernet/cadence/macb_main.c +16 -15
@@ -4614,25 +4614,26 @@ static int init_reset_optional(struct platform_device *pdev)if (ret)return dev_err_probe (&pdev->dev, ret,"failed to init SGMII PHY\n" ); - } - ret =zynqmp_pm_is_function_supported (PM_IOCTL ,IOCTL_SET_GEM_CONFIG ); -if (!ret) { -u32 pm_info[2 ]; + ret =zynqmp_pm_is_function_supported (PM_IOCTL ,IOCTL_SET_GEM_CONFIG ); +if (!ret) { +u32 pm_info[2 ]; + + ret =of_property_read_u32_array (pdev->dev.of_node,"power-domains" , + pm_info,ARRAY_SIZE (pm_info)); +if (ret) { +dev_err (&pdev->dev,"Failed to read power management information\n" ); + goto err_out_phy_exit; + } + ret =zynqmp_pm_set_gem_config (pm_info[1 ],GEM_CONFIG_FIXED ,0 ); +if (ret) + goto err_out_phy_exit; - ret =of_property_read_u32_array (pdev->dev.of_node,"power-domains" , - pm_info,ARRAY_SIZE (pm_info)); -if (ret) { -dev_err (&pdev->dev,"Failed to read power management information\n" ); - goto err_out_phy_exit; + ret =zynqmp_pm_set_gem_config (pm_info[1 ],GEM_CONFIG_SGMII_MODE ,1 ); +if (ret) + goto err_out_phy_exit; } - ret =zynqmp_pm_set_gem_config (pm_info[1 ],GEM_CONFIG_FIXED ,0 ); -if (ret) - goto err_out_phy_exit; - ret =zynqmp_pm_set_gem_config (pm_info[1 ],GEM_CONFIG_SGMII_MODE ,1 ); -if (ret) - goto err_out_phy_exit; }/* Fully reset controller at hardware level if mapped in device tree */
drivers/net/ethernet/intel/ice/ice_main.c +1 -1
@@ -5518,7 +5518,7 @@ static int __init ice_module_init(void)pr_info ("%s\n" , ice_driver_string);pr_info ("%s\n" , ice_copyright); - ice_wq =alloc_workqueue ("%s" ,WQ_MEM_RECLAIM ,0 ,KBUILD_MODNAME ); + ice_wq =alloc_workqueue ("%s" ,0 ,0 ,KBUILD_MODNAME );if (!ice_wq) {pr_err ("Failed to create workqueue\n" );return -ENOMEM ;
drivers/net/ethernet/intel/ice/ice_switch.c +1 -1
@@ -5420,7 +5420,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,*/ status =ice_add_special_words (rinfo, lkup_exts,ice_is_dvm_ena (hw));if (status) - goto err_free_lkup_exts; + goto err_unroll;/* Group match words into recipes using preferred recipe grouping * criteria.
drivers/net/ethernet/intel/ice/ice_vf_vsi_vlan_ops.c +15 -1
@@ -44,13 +44,17 @@ void ice_vf_vsi_init_vlan_ops(struct ice_vsi *vsi)/* outer VLAN ops regardless of port VLAN config */ vlan_ops->add_vlan = ice_vsi_add_vlan; - vlan_ops->dis_rx_filtering = ice_vsi_dis_rx_vlan_filtering; vlan_ops->ena_tx_filtering = ice_vsi_ena_tx_vlan_filtering; vlan_ops->dis_tx_filtering = ice_vsi_dis_tx_vlan_filtering;if (ice_vf_is_port_vlan_ena (vf)) {/* setup outer VLAN ops */ vlan_ops->set_port_vlan = ice_vsi_set_outer_port_vlan; +/* all Rx traffic should be in the domain of the +* assigned port VLAN, so prevent disabling Rx VLAN +* filtering +*/ + vlan_ops->dis_rx_filtering = noop_vlan; vlan_ops->ena_rx_filtering = ice_vsi_ena_rx_vlan_filtering;
@@ -63,6 +67,9 @@ void ice_vf_vsi_init_vlan_ops(struct ice_vsi *vsi) vlan_ops->ena_insertion = ice_vsi_ena_inner_insertion; vlan_ops->dis_insertion = ice_vsi_dis_inner_insertion; }else { + vlan_ops->dis_rx_filtering = + ice_vsi_dis_rx_vlan_filtering; +if (!test_bit (ICE_FLAG_VF_VLAN_PRUNING , pf->flags)) vlan_ops->ena_rx_filtering = noop_vlan;else
@@ -96,7 +103,14 @@ void ice_vf_vsi_init_vlan_ops(struct ice_vsi *vsi) vlan_ops->set_port_vlan = ice_vsi_set_inner_port_vlan; vlan_ops->ena_rx_filtering = ice_vsi_ena_rx_vlan_filtering; +/* all Rx traffic should be in the domain of the +* assigned port VLAN, so prevent disabling Rx VLAN +* filtering +*/ + vlan_ops->dis_rx_filtering = noop_vlan; }else { + vlan_ops->dis_rx_filtering = + ice_vsi_dis_rx_vlan_filtering;if (!test_bit (ICE_FLAG_VF_VLAN_PRUNING , pf->flags)) vlan_ops->ena_rx_filtering = noop_vlan;else
drivers/net/ethernet/intel/igc/igc_main.c +23 -2
@@ -2942,7 +2942,9 @@ static bool igc_clean_tx_irq(struct igc_q_vector *q_vector, int napi_budget)if (tx_buffer->next_to_watch &&time_after (jiffies, tx_buffer->time_stamp + (adapter->tx_timeout_factor *HZ )) && - !(rd32 (IGC_STATUS ) &IGC_STATUS_TXOFF )) { + !(rd32 (IGC_STATUS ) &IGC_STATUS_TXOFF ) && + (rd32 (IGC_TDH (tx_ring->reg_idx)) != +readl (tx_ring->tail))) {/* detected Tx unit hang */ netdev_err (tx_ring->netdev, "Detected Tx Unit Hang\n"
@@ -5068,6 +5070,24 @@ static int igc_change_mtu(struct net_device *netdev, int new_mtu)return 0 ; } +/** +* igc_tx_timeout - Respond to a Tx Hang +* @netdev: network interface device structure +* @txqueue: queue number that timed out +**/ +static void igc_tx_timeout (struct net_device *netdev, +unsigned int __always_unused txqueue) +{ +struct igc_adapter *adapter =netdev_priv (netdev); +struct igc_hw *hw = &adapter->hw; + +/* Do the reset outside of interrupt context */ + adapter->tx_timeout_count++; +schedule_work (&adapter->reset_task); +wr32 (IGC_EICS , + (adapter->eims_enable_mask & ~adapter->eims_other)); +} +/** * igc_get_stats64 - Get System Network Statistics * @netdev: network interface device structure
@@ -5495,7 +5515,7 @@ static void igc_watchdog_task(struct work_struct *work)case SPEED_100 :case SPEED_1000 :case SPEED_2500 : - adapter->tx_timeout_factor =7 ; + adapter->tx_timeout_factor =1 ;break ; }
@@ -6313,6 +6333,7 @@ static const struct net_device_ops igc_netdev_ops = { .ndo_set_rx_mode = igc_set_rx_mode, .ndo_set_mac_address = igc_set_mac, .ndo_change_mtu = igc_change_mtu, + .ndo_tx_timeout = igc_tx_timeout, .ndo_get_stats64 = igc_get_stats64, .ndo_fix_features = igc_fix_features, .ndo_set_features = igc_set_features,
drivers/net/ethernet/mediatek/mtk_eth_soc.c +2 -2
@@ -1495,8 +1495,8 @@ static struct page_pool *mtk_create_page_pool(struct mtk_eth *eth,if (IS_ERR (pp))return pp; - err =__xdp_rxq_info_reg (xdp_q, ð->dummy_dev, eth->rx_napi.napi_id, - id,PAGE_SIZE ); + err =__xdp_rxq_info_reg (xdp_q, ð->dummy_dev, id, + eth->rx_napi.napi_id,PAGE_SIZE );if (err <0 ) goto err_free_pp;
drivers/net/ethernet/mellanox/mlx5/core/debugfs.c +3 -2
@@ -245,8 +245,9 @@ void mlx5_pages_debugfs_init(struct mlx5_core_dev *dev) pages = dev->priv.dbg.pages_debugfs;debugfs_create_u32 ("fw_pages_total" ,0400 , pages, &dev->priv.fw_pages); -debugfs_create_u32 ("fw_pages_vfs" ,0400 , pages, &dev->priv.vfs_pages); -debugfs_create_u32 ("fw_pages_host_pf" ,0400 , pages, &dev->priv.host_pf_pages); +debugfs_create_u32 ("fw_pages_vfs" ,0400 , pages, &dev->priv.page_counters[MLX5_VF ]); +debugfs_create_u32 ("fw_pages_sfs" ,0400 , pages, &dev->priv.page_counters[MLX5_SF ]); +debugfs_create_u32 ("fw_pages_host_pf" ,0400 , pages, &dev->priv.page_counters[MLX5_HOST_PF ]);debugfs_create_u32 ("fw_pages_alloc_failed" ,0400 , pages, &dev->priv.fw_pages_alloc_failed);debugfs_create_u32 ("fw_pages_give_dropped" ,0400 , pages, &dev->priv.give_pages_dropped); debugfs_create_u32("fw_pages_reclaim_discard", 0400, pages,
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c +2 -1
@@ -64,6 +64,7 @@ static int mlx5_query_mtrc_caps(struct mlx5_fw_tracer *tracer)MLX5_GET (mtrc_cap, out, num_string_trace); tracer->str_db.num_string_db =MLX5_GET (mtrc_cap, out, num_string_db); tracer->owner = !!MLX5_GET (mtrc_cap, out, trace_owner); + tracer->str_db.loaded = false;for (i =0 ; i < tracer->str_db.num_string_db; i++) { mtrc_cap_sp =MLX5_ADDR_OF (mtrc_cap, out, string_db_param[i]);
@@ -756,6 +757,7 @@ static int mlx5_fw_tracer_set_mtrc_conf(struct mlx5_fw_tracer *tracer)if (err)mlx5_core_warn (dev,"FWTracer: Failed to set tracer configurations %d\n" , err); + tracer->buff.consumer_index =0 ;return err; }
@@ -820,7 +822,6 @@ static void mlx5_fw_tracer_ownership_change(struct work_struct *work)mlx5_core_dbg (tracer->dev,"FWTracer: ownership changed, current=(%d)\n" , tracer->owner);if (tracer->owner) { tracer->owner = false; - tracer->buff.consumer_index =0 ;return ; }
drivers/net/ethernet/mellanox/mlx5/core/ecpf.c +1 -1
@@ -87,7 +87,7 @@ void mlx5_ec_cleanup(struct mlx5_core_dev *dev)mlx5_host_pf_cleanup (dev); - err =mlx5_wait_for_pages (dev, &dev->priv.host_pf_pages); + err =mlx5_wait_for_pages (dev, &dev->priv.page_counters[MLX5_HOST_PF ]);if (err)mlx5_core_warn (dev,"Timeout reclaiming external host PF pages err(%d)\n" , err); }
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c +0 -4
@@ -438,10 +438,6 @@ static int mlx5_esw_bridge_switchdev_event(struct notifier_block *nb,switch (event) {case SWITCHDEV_FDB_ADD_TO_BRIDGE : -/* only handle the event on native eswtich of representor */ -if (!mlx5_esw_bridge_is_local (dev, rep, esw)) -break ; - fdb_info =container_of (info, struct switchdev_notifier_fdb_info, info);
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c +1 -1
@@ -443,7 +443,7 @@ void mlx5e_enable_cvlan_filter(struct mlx5e_flow_steering *fs, bool promisc)void mlx5e_disable_cvlan_filter (struct mlx5e_flow_steering *fs,bool promisc) { -if (fs->vlan->cvlan_filter_disabled) +if (!fs->vlan || fs->vlan->cvlan_filter_disabled)return ; fs->vlan->cvlan_filter_disabled = true;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +19 -71
128 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c +1 -1
@@ -1715,7 +1715,7 @@ void mlx5_esw_bridge_fdb_update_used(struct net_device *dev, u16 vport_num, u16struct mlx5_esw_bridge *bridge; port =mlx5_esw_bridge_port_lookup (vport_num, esw_owner_vhca_id, br_offloads); -if (!port || port->flags &MLX5_ESW_BRIDGE_PORT_FLAG_PEER ) +if (!port)return ; bridge = port->bridge;
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c +5 -8
@@ -189,16 +189,16 @@ static inline int mlx5_ptys_rate_enum_to_int(enum mlx5_ptys_rate rate) } } -static int mlx5i_get_speed_settings (u16 ib_link_width_oper,u16 ib_proto_oper) +static u32 mlx5i_get_speed_settings (u16 ib_link_width_oper,u16 ib_proto_oper) {int rate, width; rate =mlx5_ptys_rate_enum_to_int (ib_proto_oper);if (rate <0 ) -return -EINVAL ; +return SPEED_UNKNOWN ; width =mlx5_ptys_width_enum_to_int (ib_link_width_oper);if (width <0 ) -return -EINVAL ; +return SPEED_UNKNOWN ;return rate * width; }
@@ -221,16 +221,13 @@ static int mlx5i_get_link_ksettings(struct net_device *netdev,ethtool_link_ksettings_zero_link_mode (link_ksettings, advertising); speed =mlx5i_get_speed_settings (ib_link_width_oper, ib_proto_oper); -if (speed <0 ) -return -EINVAL ; + link_ksettings->base.speed = speed; + link_ksettings->base.duplex = speed ==SPEED_UNKNOWN ?DUPLEX_UNKNOWN :DUPLEX_FULL ; - link_ksettings->base.duplex =DUPLEX_FULL ; link_ksettings->base.port =PORT_OTHER ; link_ksettings->base.autoneg =AUTONEG_DISABLE ; - link_ksettings->base.speed = speed; -return 0 ; }
drivers/net/ethernet/mellanox/mlx5/core/main.c +7 -7
@@ -2094,7 +2094,7 @@ static int __init mlx5_init(void)mlx5_core_verify_params ();mlx5_register_debugfs (); - err =pci_register_driver (&mlx5_core_driver); + err =mlx5e_init ();if (err) goto err_debug;
@@ -2102,16 +2102,16 @@ static int __init mlx5_init(void)if (err) goto err_sf; - err =mlx5e_init (); + err =pci_register_driver (&mlx5_core_driver);if (err) - goto err_en; + goto err_pci;return 0 ; -err_en: +err_pci:mlx5_sf_driver_unregister (); err_sf: -pci_unregister_driver (&mlx5_core_driver); +mlx5e_cleanup (); err_debug:mlx5_unregister_debugfs ();return err;
@@ -2119,9 +2119,9 @@ static int __init mlx5_init(void) static void __exit mlx5_cleanup(void) { -mlx5e_cleanup (); -mlx5_sf_driver_unregister ();pci_unregister_driver (&mlx5_core_driver); +mlx5_sf_driver_unregister (); +mlx5e_cleanup ();mlx5_unregister_debugfs (); }
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c +21 -16
@@ -74,6 +74,14 @@ static u32 get_function(u16 func_id, bool ec_function)return (u32 )func_id | (ec_function <<16 ); } +static u16 func_id_to_type (struct mlx5_core_dev *dev,u16 func_id,bool ec_function) +{ +if (!func_id) +return mlx5_core_is_ecpf (dev) && !ec_function ?MLX5_HOST_PF :MLX5_PF ; + +return func_id <=mlx5_core_max_vfs (dev) ?MLX5_VF :MLX5_SF ; +} +static struct rb_root *page_root_per_function (struct mlx5_core_dev *dev,u32 function) {struct rb_root *root;
@@ -332,6 +340,7 @@ static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages,u32 out[MLX5_ST_SZ_DW (manage_pages_out)] = {0 };int inlen =MLX5_ST_SZ_BYTES (manage_pages_in);int notify_fail = event; +u16 func_type;u64 addr;int err;u32 *in;
@@ -383,11 +392,9 @@ static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages, goto out_dropped; } + func_type =func_id_to_type (dev, func_id, ec_function); + dev->priv.page_counters[func_type] += npages; dev->priv.fw_pages += npages; -if (func_id) - dev->priv.vfs_pages += npages; -else if (mlx5_core_is_ecpf (dev) && !ec_function) - dev->priv.host_pf_pages += npages;mlx5_core_dbg (dev,"npages %d, ec_function %d, func_id 0x%x, err %d\n" , npages, ec_function, func_id, err);
@@ -414,6 +421,7 @@ static void release_all_pages(struct mlx5_core_dev *dev, u16 func_id,struct rb_root *root;struct rb_node *p;int npages =0 ; +u16 func_type; root =xa_load (&dev->priv.page_root_xa, function);if (WARN_ON_ONCE (!root))
@@ -428,11 +436,9 @@ static void release_all_pages(struct mlx5_core_dev *dev, u16 func_id,free_fwp (dev, fwp, fwp->free_count); } + func_type =func_id_to_type (dev, func_id, ec_function); + dev->priv.page_counters[func_type] -= npages; dev->priv.fw_pages -= npages; -if (func_id) - dev->priv.vfs_pages -= npages; -else if (mlx5_core_is_ecpf (dev) && !ec_function) - dev->priv.host_pf_pages -= npages;mlx5_core_dbg (dev,"npages %d, ec_function %d, func_id 0x%x\n" , npages, ec_function, func_id);
@@ -498,6 +504,7 @@ static int reclaim_pages(struct mlx5_core_dev *dev, u16 func_id, int npages,int outlen =MLX5_ST_SZ_BYTES (manage_pages_out);u32 in[MLX5_ST_SZ_DW (manage_pages_in)] = {};int num_claimed; +u16 func_type;u32 *out;int err;int i;
@@ -549,11 +556,9 @@ static int reclaim_pages(struct mlx5_core_dev *dev, u16 func_id, int npages,if (nclaimed) *nclaimed = num_claimed; + func_type =func_id_to_type (dev, func_id, ec_function); + dev->priv.page_counters[func_type] -= num_claimed; dev->priv.fw_pages -= num_claimed; -if (func_id) - dev->priv.vfs_pages -= num_claimed; -else if (mlx5_core_is_ecpf (dev) && !ec_function) - dev->priv.host_pf_pages -= num_claimed; out_free:kvfree (out);
@@ -706,12 +711,12 @@ int mlx5_reclaim_startup_pages(struct mlx5_core_dev *dev)WARN (dev->priv.fw_pages,"FW pages counter is %d after reclaiming all pages\n" , dev->priv.fw_pages); -WARN (dev->priv.vfs_pages, +WARN (dev->priv.page_counters[MLX5_VF ],"VFs FW pages counter is %d after reclaiming all pages\n" , - dev->priv.vfs_pages); -WARN (dev->priv.host_pf_pages, + dev->priv.page_counters[MLX5_VF ]); +WARN (dev->priv.page_counters[MLX5_HOST_PF ],"External host PF FW pages counter is %d after reclaiming all pages\n" , - dev->priv.host_pf_pages); + dev->priv.page_counters[MLX5_HOST_PF ]);return 0 ; }
drivers/net/ethernet/mellanox/mlx5/core/sriov.c +1 -1
@@ -147,7 +147,7 @@ mlx5_device_disable_sriov(struct mlx5_core_dev *dev, int num_vfs, bool clear_vf)mlx5_eswitch_disable_sriov (dev->priv.eswitch, clear_vf); -if (mlx5_wait_for_pages (dev, &dev->priv.vfs_pages)) +if (mlx5_wait_for_pages (dev, &dev->priv.page_counters[MLX5_VF ]))mlx5_core_warn (dev,"timeout reclaiming VFs pages\n" ); }
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c +2 -2
@@ -633,7 +633,7 @@ int sparx5_ptp_init(struct sparx5 *sparx5)/* Enable master counters */ spx5_wr (PTP_PTP_DOM_CFG_PTP_ENA_SET (0x7 ), sparx5,PTP_PTP_DOM_CFG ); -for (i =0 ; i < sparx5->port_count; i++) { +for (i =0 ; i <SPX5_PORTS ; i++) { port = sparx5->ports[i];if (!port)continue ;
@@ -649,7 +649,7 @@ void sparx5_ptp_deinit(struct sparx5 *sparx5)struct sparx5_port *port;int i; -for (i =0 ; i < sparx5->port_count; i++) { +for (i =0 ; i <SPX5_PORTS ; i++) { port = sparx5->ports[i];if (!port)continue ;
drivers/net/ethernet/mscc/ocelot_flower.c +12 -12
@@ -605,6 +605,18 @@ ocelot_flower_parse_key(struct ocelot *ocelot, int port, bool ingress,flow_rule_match_control (rule, &match); } +if (flow_rule_match_key (rule,FLOW_DISSECTOR_KEY_VLAN )) { +struct flow_match_vlan match; + +flow_rule_match_vlan (rule, &match); + filter->key_type =OCELOT_VCAP_KEY_ANY ; + filter->vlan.vid.value = match.key->vlan_id; + filter->vlan.vid.mask = match.mask->vlan_id; + filter->vlan.pcp.value[0 ] = match.key->vlan_priority; + filter->vlan.pcp.mask[0 ] = match.mask->vlan_priority; + match_protocol = false; + } +if (flow_rule_match_key (rule,FLOW_DISSECTOR_KEY_ETH_ADDRS )) {struct flow_match_eth_addrs match;
@@ -737,18 +749,6 @@ ocelot_flower_parse_key(struct ocelot *ocelot, int port, bool ingress, match_protocol = false; } -if (flow_rule_match_key (rule,FLOW_DISSECTOR_KEY_VLAN )) { -struct flow_match_vlan match; - -flow_rule_match_vlan (rule, &match); - filter->key_type =OCELOT_VCAP_KEY_ANY ; - filter->vlan.vid.value = match.key->vlan_id; - filter->vlan.vid.mask = match.mask->vlan_id; - filter->vlan.pcp.value[0 ] = match.key->vlan_priority; - filter->vlan.pcp.mask[0 ] = match.mask->vlan_priority; - match_protocol = false; - } - finished_key_parsing:if (match_protocol && proto !=ETH_P_ALL ) {if (filter->block_id ==VCAP_ES0 ) {
drivers/net/ethernet/mscc/ocelot_ptp.c +4 -4
@@ -335,8 +335,8 @@ static void ocelot_populate_ipv6_ptp_event_trap_key(struct ocelot_vcap_filter *trap) { trap->key_type =OCELOT_VCAP_KEY_IPV6 ; - trap->key.ipv4.proto.value[0 ] =IPPROTO_UDP ; - trap->key.ipv4.proto.mask[0 ] =0xff ; + trap->key.ipv6.proto.value[0 ] =IPPROTO_UDP ; + trap->key.ipv6.proto.mask[0 ] =0xff ; trap->key.ipv6.dport.value =PTP_EV_PORT ; trap->key.ipv6.dport.mask =0xffff ; }
@@ -355,8 +355,8 @@ static void ocelot_populate_ipv6_ptp_general_trap_key(struct ocelot_vcap_filter *trap) { trap->key_type =OCELOT_VCAP_KEY_IPV6 ; - trap->key.ipv4.proto.value[0 ] =IPPROTO_UDP ; - trap->key.ipv4.proto.mask[0 ] =0xff ; + trap->key.ipv6.proto.value[0 ] =IPPROTO_UDP ; + trap->key.ipv6.proto.mask[0 ] =0xff ; trap->key.ipv6.dport.value =PTP_GEN_PORT ; trap->key.ipv6.dport.mask =0xffff ; }
drivers/net/ethernet/pensando/ionic/ionic_dev.c +8 -1
@@ -694,9 +694,16 @@ void ionic_q_post(struct ionic_queue *q, bool ring_doorbell, ionic_desc_cb cb, q->lif->index, q->name, q->hw_type, q->hw_index, q->head_idx, ring_doorbell); -if (ring_doorbell) +if (ring_doorbell) {ionic_dbell_ring (lif->kern_dbpage, q->hw_type, q->dbval | q->head_idx); + + q->dbell_jiffies = jiffies; + +if (q_to_qcq (q)->napi_qcq) +mod_timer (&q_to_qcq (q)->napi_qcq->napi_deadline, + jiffies +IONIC_NAPI_DEADLINE ); + } }static bool ionic_q_is_posted (struct ionic_queue *q,unsigned int pos)
drivers/net/ethernet/pensando/ionic/ionic_dev.h +12 -0
@@ -25,6 +25,12 @@#define IONIC_DEV_INFO_REG_COUNT 32#define IONIC_DEV_CMD_REG_COUNT 32 +#define IONIC_NAPI_DEADLINE (HZ / 200)/* 5ms */ +#define IONIC_ADMIN_DOORBELL_DEADLINE (HZ / 2)/* 500ms */ +#define IONIC_TX_DOORBELL_DEADLINE (HZ / 100)/* 10ms */ +#define IONIC_RX_MIN_DOORBELL_DEADLINE (HZ / 100)/* 10ms */ +#define IONIC_RX_MAX_DOORBELL_DEADLINE (HZ * 5)/* 5s */ +struct ionic_dev_bar {void __iomem *vaddr;phys_addr_t bus_addr;
@@ -214,6 +220,8 @@ struct ionic_queue {struct ionic_lif *lif;struct ionic_desc_info *info;u64 dbval; +unsigned long dbell_deadline; +unsigned long dbell_jiffies;u16 head_idx;u16 tail_idx;unsigned int index;
@@ -358,4 +366,8 @@ void ionic_q_service(struct ionic_queue *q, struct ionic_cq_info *cq_info,int ionic_heartbeat_check (struct ionic *ionic);bool ionic_is_fw_running (struct ionic_dev *idev); +bool ionic_adminq_poke_doorbell (struct ionic_queue *q); +bool ionic_txq_poke_doorbell (struct ionic_queue *q); +bool ionic_rxq_poke_doorbell (struct ionic_queue *q); +#endif /* _IONIC_DEV_H_ */
drivers/net/ethernet/pensando/ionic/ionic_lif.c +52 -4
137 lines not on this page · raw message
drivers/net/ethernet/pensando/ionic/ionic_lif.h +2 -0
@@ -74,8 +74,10 @@ struct ionic_qcq {struct ionic_queue q;struct ionic_cq cq;struct ionic_intr_info intr; +struct timer_list napi_deadline;struct napi_struct napi;unsigned int flags; +struct ionic_qcq *napi_qcq;struct dentry *dentry; };
drivers/net/ethernet/pensando/ionic/ionic_main.c +29 -0
@@ -289,6 +289,35 @@ static void ionic_adminq_cb(struct ionic_queue *q,complete_all (&ctx->work); } +bool ionic_adminq_poke_doorbell (struct ionic_queue *q) +{ +struct ionic_lif *lif = q->lif; +unsigned long now, then, dif; +unsigned long irqflags; + +spin_lock_irqsave (&lif->adminq_lock, irqflags); + +if (q->tail_idx == q->head_idx) { +spin_unlock_irqrestore (&lif->adminq_lock, irqflags); +return false; + } + + now =READ_ONCE (jiffies); + then = q->dbell_jiffies; + dif = now - then; + +if (dif > q->dbell_deadline) { +ionic_dbell_ring (q->lif->kern_dbpage, q->hw_type, + q->dbval | q->head_idx); + + q->dbell_jiffies = now; + } + +spin_unlock_irqrestore (&lif->adminq_lock, irqflags); + +return true; +} +int ionic_adminq_post (struct ionic_lif *lif,struct ionic_admin_ctx *ctx) {struct ionic_desc_info *desc_info;
drivers/net/ethernet/pensando/ionic/ionic_txrx.c +97 -13
191 lines not on this page · raw message
drivers/net/hyperv/netvsc.c +1 -1
@@ -1034,7 +1034,7 @@ static int netvsc_dma_map(struct hv_device *hv_dev, packet->dma_range =kcalloc (page_count,sizeof (*packet->dma_range), -GFP_KERNEL ); +GFP_ATOMIC );if (!packet->dma_range)return -ENOMEM ;
drivers/net/phy/meson-gxl.c +2 -0
@@ -261,6 +261,8 @@ static struct phy_driver meson_gxl_phy[] = { .handle_interrupt = meson_gxl_handle_interrupt, .suspend = genphy_suspend, .resume = genphy_resume, + .read_mmd = genphy_read_mmd_unsupported, + .write_mmd = genphy_write_mmd_unsupported, }, { PHY_ID_MATCH_EXACT(0x01803301), .name = "Meson G12A Internal PHY",
drivers/net/phy/phylink.c +2 -3
@@ -1793,10 +1793,9 @@ int phylink_fwnode_phy_connect(struct phylink *pl, ret =phy_attach_direct (pl->netdev, phy_dev, flags, pl->link_interface); -if (ret) { -phy_device_free (phy_dev); +phy_device_free (phy_dev); +if (ret)return ret; - } ret =phylink_bringup_phy (pl, phy_dev, pl->link_config.interface);if (ret)
drivers/net/usb/plusb.c +1 -3
@@ -57,9 +57,7 @@static inline int pl_vendor_req (struct usbnet *dev,u8 req,u8 val,u8 index) { -return usbnet_read_cmd (dev, req, -USB_DIR_IN |USB_TYPE_VENDOR | -USB_RECIP_DEVICE , +return usbnet_write_cmd (dev, req,USB_TYPE_VENDOR |USB_RECIP_DEVICE , val, index,NULL ,0 ); }
drivers/nvdimm/Kconfig +19 -0
@@ -102,6 +102,25 @@ config NVDIMM_KEYS depends on ENCRYPTED_KEYS depends on (LIBNVDIMM=ENCRYPTED_KEYS) || LIBNVDIMM=m +config NVDIMM_KMSAN + bool + depends on KMSAN + help + KMSAN, and other memory debug facilities, increase the size of + 'struct page' to contain extra metadata. This collides with + the NVDIMM capability to store a potentially + larger-than-"System RAM" size 'struct page' array in a + reservation of persistent memory rather than limited / + precious DRAM. However, that reservation needs to persist for + the life of the given NVDIMM namespace. If you are using KMSAN + to debug an issue unrelated to NVDIMMs or DAX then say N to this + option. Otherwise, say Y but understand that any namespaces + (with the page array stored pmem) created with this build of + the kernel will permanently reserve and strand excess + capacity compared to the CONFIG_KMSAN=n case. + + Select N if unsure. + config NVDIMM_TEST_BUILD tristate "Build the unit test core" depends on m
drivers/nvdimm/nd.h +1 -1
@@ -652,7 +652,7 @@ void devm_namespace_disable(struct device *dev, struct nd_namespace_common *ndns);#if IS_ENABLED (CONFIG_ND_CLAIM )/* max struct page size independent of kernel config */ -#define MAX_STRUCT_PAGE_SIZE 128 +#define MAX_STRUCT_PAGE_SIZE 64int nvdimm_setup_pfn (struct nd_pfn *nd_pfn,struct dev_pagemap *pgmap);#else static inline int nvdimm_setup_pfn(struct nd_pfn *nd_pfn,
drivers/nvdimm/pfn_devs.c +27 -15
72 lines not on this page · raw message
drivers/of/address.c +15 -6
@@ -965,8 +965,19 @@ int of_dma_get_range(struct device_node *np, const struct bus_dma_region **map) }of_dma_range_parser_init (&parser, node); -for_each_of_range (&parser, &range) +for_each_of_range (&parser, &range) { +if (range.cpu_addr ==OF_BAD_ADDR ) { +pr_err ("translation of DMA address(%llx) to CPU address failed node(%pOF)\n" , + range.bus_addr, node); +continue ; + } num_ranges++; + } + +if (!num_ranges) { + ret = -EINVAL ; + goto out; + } r =kcalloc (num_ranges +1 ,sizeof (*r),GFP_KERNEL );if (!r) {
@@ -975,18 +986,16 @@ int of_dma_get_range(struct device_node *np, const struct bus_dma_region **map) }/* -* Record all info in the generic DMA ranges array for struct device. +* Record all info in the generic DMA ranges array for struct device, +* returning an error if we don't find any parsable ranges. */ *map = r;of_dma_range_parser_init (&parser, node);for_each_of_range (&parser, &range) {pr_debug ("dma_addr(%llx) cpu_addr(%llx) size(%llx)\n" , range.bus_addr, range.cpu_addr, range.size); -if (range.cpu_addr ==OF_BAD_ADDR ) { -pr_err ("translation of DMA address(%llx) to CPU address failed node(%pOF)\n" , - range.bus_addr, node); +if (range.cpu_addr ==OF_BAD_ADDR )continue ; - } r->cpu_start = range.cpu_addr; r->dma_start = range.bus_addr; r->size = range.size;
drivers/of/platform.c +10 -2
@@ -526,6 +526,7 @@ static int __init of_platform_default_populate_init(void)if (IS_ENABLED (CONFIG_PPC )) {struct device_node *boot_display =NULL ;struct platform_device *dev; +int display_number =0 ;int ret;/* Check if we have a MacOS display without a node spec */
@@ -556,16 +557,23 @@ static int __init of_platform_default_populate_init(void)if (!of_get_property (node,"linux,opened" ,NULL ) || !of_get_property (node,"linux,boot-display" ,NULL ))continue ; - dev =of_platform_device_create (node,"of-display" ,NULL ); + dev =of_platform_device_create (node,"of-display.0" ,NULL ); +of_node_put (node);if (WARN_ON (!dev))return -ENOMEM ; boot_display = node; + display_number++;break ; }for_each_node_by_type (node,"display" ) { +char buf[14 ]; +const char *of_display_format ="of-display.%d" ; +if (!of_get_property (node,"linux,opened" ,NULL ) || node == boot_display)continue ; -of_platform_device_create (node,"of-display" ,NULL ); + ret =snprintf (buf,sizeof (buf), of_display_format, display_number++); +if (ret <sizeof (buf)) +of_platform_device_create (node, buf,NULL ); } }else {
drivers/pci/pci.c +0 -7
@@ -1665,7 +1665,6 @@ int pci_save_state(struct pci_dev *dev)return i;pci_save_ltr_state (dev); -pci_save_aspm_l1ss_state (dev);pci_save_dpc_state (dev);pci_save_aer_state (dev);pci_save_ptm_state (dev);
@@ -1772,7 +1771,6 @@ void pci_restore_state(struct pci_dev *dev)* LTR itself (in the PCIe capability). */ pci_restore_ltr_state (dev); -pci_restore_aspm_l1ss_state (dev);pci_restore_pcie_state (dev);pci_restore_pasid_state (dev);
@@ -3465,11 +3463,6 @@ void pci_allocate_cap_save_buffers(struct pci_dev *dev)if (error)pci_err (dev,"unable to allocate suspend buffer for LTR\n" ); - error =pci_add_ext_cap_save_buffer (dev,PCI_EXT_CAP_ID_L1SS , -2 *sizeof (u32)); -if (error) -pci_err (dev,"unable to allocate suspend buffer for ASPM-L1SS\n" ); -pci_allocate_vc_save_buffers (dev); }
drivers/pci/pci.h +0 -4
@@ -565,14 +565,10 @@ bool pcie_wait_for_link(struct pci_dev *pdev, bool active);void pcie_aspm_init_link_state (struct pci_dev *pdev);void pcie_aspm_exit_link_state (struct pci_dev *pdev);void pcie_aspm_powersave_config_link (struct pci_dev *pdev); -void pci_save_aspm_l1ss_state (struct pci_dev *dev); -void pci_restore_aspm_l1ss_state (struct pci_dev *dev);#else static inline void pcie_aspm_init_link_state (struct pci_dev *pdev) { }static inline void pcie_aspm_exit_link_state (struct pci_dev *pdev) { }static inline void pcie_aspm_powersave_config_link (struct pci_dev *pdev) { } -static inline void pci_save_aspm_l1ss_state (struct pci_dev *dev) { } -static inline void pci_restore_aspm_l1ss_state (struct pci_dev *dev) { }#endif #ifdef CONFIG_PCIE_ECRC
drivers/pci/pcie/aspm.c +34 -77
135 lines not on this page · raw message
drivers/pinctrl/aspeed/pinctrl-aspeed.c +11 -2
@@ -92,10 +92,19 @@ static int aspeed_sig_expr_enable(struct aspeed_pinmux_data *ctx,static int aspeed_sig_expr_disable (struct aspeed_pinmux_data *ctx,const struct aspeed_sig_expr *expr) { +int ret; +pr_debug ("Disabling signal %s for %s\n" , expr->signal, expr->function); -return aspeed_sig_expr_set (ctx, expr, false); + ret =aspeed_sig_expr_eval (ctx, expr, true); +if (ret <0 ) +return ret; + +if (ret) +return aspeed_sig_expr_set (ctx, expr, false); + +return 0 ; }/**
@@ -113,7 +122,7 @@ static int aspeed_disable_sig(struct aspeed_pinmux_data *ctx,int ret =0 ;if (!exprs) -return true; +return -EINVAL ;while (*exprs && !ret) { ret =aspeed_sig_expr_disable (ctx, *exprs);
drivers/pinctrl/intel/pinctrl-intel.c +13 -3
@@ -1676,6 +1676,12 @@ const struct intel_pinctrl_soc_data *intel_pinctrl_get_soc_data(struct platform_EXPORT_SYMBOL_GPL (intel_pinctrl_get_soc_data);#ifdef CONFIG_PM_SLEEP +static bool __intel_gpio_is_direct_irq (u32 value) +{ +return (value &PADCFG0_GPIROUTIOXAPIC ) && (value &PADCFG0_GPIOTXDIS ) && + (__intel_gpio_get_gpio_mode (value) ==PADCFG0_PMODE_GPIO ); +} +static bool intel_pinctrl_should_save (struct intel_pinctrl *pctrl,unsigned int pin) {const struct pin_desc *pd =pin_desc_get (pctrl->pctldev, pin);
@@ -1709,8 +1715,7 @@ static bool intel_pinctrl_should_save(struct intel_pinctrl *pctrl, unsigned int* See https://bugzilla.kernel.org/show_bug.cgi?id=214749. */ value =readl (intel_get_padcfg (pctrl, pin,PADCFG0 )); -if ((value &PADCFG0_GPIROUTIOXAPIC ) && (value &PADCFG0_GPIOTXDIS ) && - (__intel_gpio_get_gpio_mode (value) ==PADCFG0_PMODE_GPIO )) +if (__intel_gpio_is_direct_irq (value))return true;return false;
@@ -1840,7 +1845,12 @@ int intel_pinctrl_resume_noirq(struct device *dev)for (i =0 ; i < pctrl->soc->npins; i++) {const struct pinctrl_pin_desc *desc = &pctrl->soc->pins[i]; -if (!intel_pinctrl_should_save (pctrl, desc->number)) +if (!(intel_pinctrl_should_save (pctrl, desc->number) || +/* +* If the firmware mangled the register contents too much, +* check the saved value for the Direct IRQ mode. +*/ +__intel_gpio_is_direct_irq (pads[i].padcfg0)))continue ;intel_restore_padcfg (pctrl, desc->number,PADCFG0 , pads[i].padcfg0);
drivers/pinctrl/mediatek/pinctrl-mt8195.c +2 -2
@@ -659,7 +659,7 @@ static const struct mtk_pin_field_calc mt8195_pin_drv_range[] = {PIN_FIELD_BASE (10 ,10 ,4 ,0x010 ,0x10 ,9 ,3 ),PIN_FIELD_BASE (11 ,11 ,4 ,0x000 ,0x10 ,24 ,3 ),PIN_FIELD_BASE (12 ,12 ,4 ,0x010 ,0x10 ,12 ,3 ), -PIN_FIELD_BASE (13 ,13 ,4 ,0x010 ,0x10 ,27 ,3 ), +PIN_FIELD_BASE (13 ,13 ,4 ,0x000 ,0x10 ,27 ,3 ),PIN_FIELD_BASE (14 ,14 ,4 ,0x010 ,0x10 ,15 ,3 ),PIN_FIELD_BASE (15 ,15 ,4 ,0x010 ,0x10 ,0 ,3 ), PIN_FIELD_BASE(16, 16, 4, 0x010, 0x10, 18, 3),
@@ -708,7 +708,7 @@ static const struct mtk_pin_field_calc mt8195_pin_drv_range[] = {PIN_FIELD_BASE (78 ,78 ,3 ,0x000 ,0x10 ,15 ,3 ),PIN_FIELD_BASE (79 ,79 ,3 ,0x000 ,0x10 ,18 ,3 ),PIN_FIELD_BASE (80 ,80 ,3 ,0x000 ,0x10 ,21 ,3 ), -PIN_FIELD_BASE (81 ,81 ,3 ,0x000 ,0x10 ,28 ,3 ), +PIN_FIELD_BASE (81 ,81 ,3 ,0x000 ,0x10 ,24 ,3 ),PIN_FIELD_BASE (82 ,82 ,3 ,0x000 ,0x10 ,27 ,3 ),PIN_FIELD_BASE (83 ,83 ,3 ,0x010 ,0x10 ,0 ,3 ), PIN_FIELD_BASE(84, 84, 3, 0x010, 0x10, 3, 3),
drivers/pinctrl/pinctrl-single.c +2 -0
@@ -372,6 +372,8 @@ static int pcs_set_mux(struct pinctrl_dev *pctldev, unsigned fselector,if (!pcs->fmask)return 0 ; function =pinmux_generic_get_function (pctldev, fselector); +if (!function) +return -EINVAL ; func = function->data;if (!func)return -EINVAL ;
drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c +1 -1
@@ -105,7 +105,7 @@ static const struct pinctrl_pin_desc sm8450_lpi_pins[] = {static const char *const swr_tx_clk_groups[] = {"gpio0" };static const char *const swr_tx_data_groups[] = {"gpio1" ,"gpio2" ,"gpio14" };static const char *const swr_rx_clk_groups[] = {"gpio3" }; -static const char *const swr_rx_data_groups[] = {"gpio4" ,"gpio5" ,"gpio15" }; +static const char *const swr_rx_data_groups[] = {"gpio4" ,"gpio5" };static const char *const dmic1_clk_groups[] = {"gpio6" };static const char *const dmic1_data_groups[] = {"gpio7" };static const char *const dmic2_clk_groups[] = {"gpio8" };
drivers/spi/spi-dw-core.c +1 -1
@@ -366,7 +366,7 @@ static void dw_spi_irq_setup(struct dw_spi *dws)* will be adjusted at the final stage of the IRQ-based SPI transfer * execution so not to lose the leftover of the incoming data. */ - level =min_t (u16, dws->fifo_len /2 , dws->tx_len); + level = min_t(unsigned int, dws->fifo_len / 2, dws->tx_len);dw_writel (dws,DW_SPI_TXFTLR , level);dw_writel (dws,DW_SPI_RXFTLR , level -1 );
drivers/usb/core/quirks.c +3 -0
@@ -526,6 +526,9 @@ static const struct usb_device_id usb_quirk_list[] = {/* DJI CineSSD */ { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM }, + /* Alcor Link AK9563 SC Reader used in 2022 Lenovo ThinkPads */ + { USB_DEVICE(0x2ce3, 0x9563), .driver_info = USB_QUIRK_NO_LPM }, + /* DELL USB GEN2 */ { USB_DEVICE(0x413c, 0xb062), .driver_info = USB_QUIRK_NO_LPM | USB_QUIRK_RESET_RESUME },
drivers/usb/typec/altmodes/displayport.c +4 -4
@@ -535,10 +535,10 @@ int dp_altmode_probe(struct typec_altmode *alt)/* FIXME: Port can only be DFP_U. */ /* Make sure we have compatiple pin configurations */ -if (!(DP_CAP_DFP_D_PIN_ASSIGN (port->vdo) & -DP_CAP_UFP_D_PIN_ASSIGN (alt->vdo)) && - !(DP_CAP_UFP_D_PIN_ASSIGN (port->vdo) & -DP_CAP_DFP_D_PIN_ASSIGN (alt->vdo))) +if (!(DP_CAP_PIN_ASSIGN_DFP_D (port->vdo) & +DP_CAP_PIN_ASSIGN_UFP_D (alt->vdo)) && + !(DP_CAP_PIN_ASSIGN_UFP_D (port->vdo) & +DP_CAP_PIN_ASSIGN_DFP_D (alt->vdo)))return -ENODEV ; ret =sysfs_create_group (&alt->dev.kobj, &dp_altmode_group);
drivers/video/fbdev/nvidia/nvidia.c +42 -39
154 lines not on this page · raw message
fs/btrfs/tree-log.c +17 -6
@@ -3607,17 +3607,19 @@ static noinline int insert_dir_log_key(struct btrfs_trans_handle *trans, }static int flush_dir_items_batch (struct btrfs_trans_handle *trans, -struct btrfs_root *log, +struct btrfs_inode *inode,struct extent_buffer *src,struct btrfs_path *dst_path,int start_slot,int count) { +struct btrfs_root *log = inode->root->log_root;char *ins_data =NULL ;struct btrfs_item_batch batch;struct extent_buffer *dst;unsigned long src_offset;unsigned long dst_offset; +u64 last_index;struct btrfs_key key;u32 item_size;int ret;
@@ -3675,6 +3677,19 @@ static int flush_dir_items_batch(struct btrfs_trans_handle *trans, src_offset =btrfs_item_ptr_offset (src, start_slot + count -1 );copy_extent_buffer (dst, src, dst_offset, src_offset, batch.total_data_size);btrfs_release_path (dst_path); + + last_index = batch.keys[count -1 ].offset; +ASSERT (last_index > inode->last_dir_index_offset); + +/* +* If for some unexpected reason the last item's index is not greater +* than the last index we logged, warn and return an error to fallback +* to a transaction commit. +*/ +if (WARN_ON (last_index <= inode->last_dir_index_offset)) + ret = -EUCLEAN ; +else + inode->last_dir_index_offset = last_index; out:kfree (ins_data);
@@ -3724,7 +3739,6 @@ static int process_dir_items_leaf(struct btrfs_trans_handle *trans, } di = btrfs_item_ptr(src, i, struct btrfs_dir_item); - ctx->last_dir_item_offset = key.offset;/* * Skip ranges of items that consist only of dir item keys created
@@ -3787,7 +3801,7 @@ static int process_dir_items_leaf(struct btrfs_trans_handle *trans,if (batch_size >0 ) {int ret; - ret =flush_dir_items_batch (trans, log, src, dst_path, + ret =flush_dir_items_batch (trans, inode, src, dst_path, batch_start, batch_size);if (ret <0 )return ret;
@@ -4075,7 +4089,6 @@ static noinline int log_directory_changes(struct btrfs_trans_handle *trans, min_key =BTRFS_DIR_START_INDEX ; max_key =0 ; - ctx->last_dir_item_offset = inode->last_dir_index_offset;while (1 ) { ret = log_dir_items(trans, inode, path, dst_path,
@@ -4087,8 +4100,6 @@ static noinline int log_directory_changes(struct btrfs_trans_handle *trans, min_key = max_key +1 ; } - inode->last_dir_index_offset = ctx->last_dir_item_offset; -return 0 ; }
fs/btrfs/tree-log.h +0 -2
@@ -23,8 +23,6 @@ struct btrfs_log_ctx {bool logging_new_delayed_dentries;/* Indicate if the inode being logged was logged before. */ bool logged_before; -/* Tracks the last logged dir item/index key offset. */ -u64 last_dir_item_offset;struct inode *inode;struct list_head list;/* Only used for fast fsyncs. */
fs/btrfs/volumes.c +20 -2
@@ -408,6 +408,7 @@ void btrfs_free_device(struct btrfs_device *device)static void free_fs_devices (struct btrfs_fs_devices *fs_devices) {struct btrfs_device *device; +WARN_ON (fs_devices->opened);while (!list_empty (&fs_devices->devices)) { device = list_entry(fs_devices->devices.next,
@@ -1194,9 +1195,22 @@ void btrfs_close_devices(struct btrfs_fs_devices *fs_devices)mutex_lock (&uuid_mutex);close_fs_devices (fs_devices); -if (!fs_devices->opened) +if (!fs_devices->opened) {list_splice_init (&fs_devices->seed_list, &list); +/* +* If the struct btrfs_fs_devices is not assembled with any +* other device, it can be re-initialized during the next mount +* without the needing device-scan step. Therefore, it can be +* fully freed. +*/ +if (fs_devices->num_devices ==1 ) { +list_del (&fs_devices->fs_list); +free_fs_devices (fs_devices); + } + } + +list_for_each_entry_safe (fs_devices, tmp, &list, seed_list) {close_fs_devices (fs_devices);list_del (&fs_devices->seed_list);
@@ -1612,7 +1626,7 @@ static int find_free_dev_extent_start(struct btrfs_device *device,if (ret <0 ) goto out; -while (1 ) { +while (search_start < search_end) { l = path->nodes[0 ]; slot = path->slots[0 ];if (slot >=btrfs_header_nritems (l)) {
@@ -1635,6 +1649,9 @@ static int find_free_dev_extent_start(struct btrfs_device *device,if (key.type !=BTRFS_DEV_EXTENT_KEY ) goto next; +if (key.offset > search_end) +break ; +if (key.offset > search_start) { hole_size = key.offset - search_start; dev_extent_hole_check(device, &search_start, &hole_size,
@@ -1695,6 +1712,7 @@ static int find_free_dev_extent_start(struct btrfs_device *device,else ret =0 ; +ASSERT (max_hole_start + max_hole_size <= search_end); out:btrfs_free_path (path); *start = max_hole_start;
fs/btrfs/zlib.c +1 -1
@@ -63,7 +63,7 @@ struct list_head *zlib_alloc_workspace(unsigned int level) workspacesize =max (zlib_deflate_workspacesize (MAX_WBITS ,MAX_MEM_LEVEL ),zlib_inflate_workspacesize ()); - workspace->strm.workspace =kvmalloc (workspacesize,GFP_KERNEL ); + workspace->strm.workspace =kvzalloc (workspacesize,GFP_KERNEL ); workspace->level = level; workspace->buf =NULL ;/*
fs/ceph/mds_client.c +6 -0
@@ -3662,6 +3662,12 @@ static void handle_session(struct ceph_mds_session *session,break ;case CEPH_SESSION_FLUSHMSG : +/* flush cap releases */ +spin_lock (&session->s_cap_lock); +if (session->s_num_cap_releases) +ceph_flush_cap_releases (mdsc, session); +spin_unlock (&session->s_cap_lock); +send_flushmsg_ack (mdsc, session, seq);break ;
fs/cifs/file.c +2 -2
@@ -3880,7 +3880,7 @@ uncached_fill_pages(struct TCP_Server_Info *server, rdata->got_bytes += result; } -return rdata->got_bytes >0 && result != -ECONNABORTED ? +return result != -ECONNABORTED && rdata->got_bytes >0 ? rdata->got_bytes : result; }
@@ -4656,7 +4656,7 @@ readpages_fill_pages(struct TCP_Server_Info *server, rdata->got_bytes += result; } -return rdata->got_bytes >0 && result != -ECONNABORTED ? +return result != -ECONNABORTED && rdata->got_bytes >0 ? rdata->got_bytes : result; }
include/linux/mlx5/driver.h +10 -3
@@ -573,6 +573,14 @@ struct mlx5_debugfs_entries {struct dentry *lag_debugfs; }; +enum mlx5_func_type { +MLX5_PF , +MLX5_VF , +MLX5_SF , +MLX5_HOST_PF , +MLX5_FUNC_TYPE_NUM , +}; +struct mlx5_ft_pool ;struct mlx5_priv {/* IRQ table valid only for real pci devices PF or VF */
@@ -583,11 +591,10 @@ struct mlx5_priv {struct mlx5_nb pg_nb;struct workqueue_struct *pg_wq;struct xarray page_root_xa; -u32 fw_pages;atomic_t reg_pages;struct list_head free_list; -u32 vfs_pages; -u32 host_pf_pages; +u32 fw_pages; +u32 page_counters[MLX5_FUNC_TYPE_NUM ];u32 fw_pages_alloc_failed;u32 give_pages_dropped;u32 reclaim_pages_discard;
include/linux/trace_events.h +1 -0
@@ -270,6 +270,7 @@ struct trace_event_fields {const int align;const int is_signed;const int filter_type; +const int len; };int (*define_fields)(struct trace_event_call *); };
include/trace/stages/stage4_event_fields.h +2 -1
@@ -26,7 +26,8 @@#define __array (_type, _item, _len) { \ .type = #_type"["__stringify(_len)"]", .name = #_item, \ .size = sizeof(_type[_len]), .align = ALIGN_STRUCTFIELD(_type), \ - .is_signed = is_signed_type(_type), .filter_type = FILTER_OTHER }, + .is_signed = is_signed_type(_type), .filter_type = FILTER_OTHER,\ + .len = _len },#undef __dynamic_array#define __dynamic_array (_type, _item, _len) { \
include/uapi/drm/virtgpu_drm.h +1 -0
@@ -64,6 +64,7 @@ struct drm_virtgpu_map {__u32 pad; }; +/* fence_fd is modified on success if VIRTGPU_EXECBUF_FENCE_FD_OUT flag is set. */ struct drm_virtgpu_execbuffer {__u32 flags;__u32 size;
include/uapi/linux/ip.h +1 -0
@@ -18,6 +18,7 @@#ifndef _UAPI_LINUX_IP_H#define _UAPI_LINUX_IP_H#include <linux/types.h> +#include <linux/stddef.h> #include <asm/byteorder.h> #define IPTOS_TOS_MASK 0x1E
include/uapi/linux/ipv6.h +1 -0
@@ -4,6 +4,7 @@#include <linux/libc-compat.h> #include <linux/types.h> +#include <linux/stddef.h> #include <linux/in6.h> #include <asm/byteorder.h>
kernel/cgroup/cpuset.c +11 -7
@@ -1201,12 +1201,13 @@ void rebuild_sched_domains(void)/** * update_tasks_cpumask - Update the cpumasks of tasks in the cpuset. * @cs: the cpuset in which each task's cpus_allowed mask needs to be changed +* @new_cpus: the temp variable for the new effective_cpus mask * * Iterate through each task of @cs updating its cpus_allowed to the * effective cpuset's. As this function is called with cpuset_rwsem held, * cpuset membership stays stable. */ -static void update_tasks_cpumask (struct cpuset *cs) +static void update_tasks_cpumask (struct cpuset *cs,struct cpumask *new_cpus) {struct css_task_iter it;struct task_struct *task;
@@ -1220,7 +1221,10 @@ static void update_tasks_cpumask(struct cpuset *cs)if (top_cs && (task->flags &PF_KTHREAD ) &&kthread_is_per_cpu (task))continue ; -set_cpus_allowed_ptr (task, cs->effective_cpus); + +cpumask_and (new_cpus, cs->effective_cpus, +task_cpu_possible_mask (task)); +set_cpus_allowed_ptr (task, new_cpus); }css_task_iter_end (&it); }
@@ -1505,7 +1509,7 @@ static int update_parent_subparts_cpumask(struct cpuset *cs, int cmd,spin_unlock_irq (&callback_lock);if (adding || deleting) -update_tasks_cpumask (parent); +update_tasks_cpumask (parent, tmp->new_cpus);/* * Set or clear CS_SCHED_LOAD_BALANCE when partcmd_update, if necessary.
@@ -1657,7 +1661,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp,WARN_ON (!is_in_v2_mode () && !cpumask_equal (cp->cpus_allowed, cp->effective_cpus)); -update_tasks_cpumask (cp); +update_tasks_cpumask (cp, tmp->new_cpus);/* * On legacy hierarchy, if the effective cpumask of any non-
@@ -2305,7 +2309,7 @@ static int update_prstate(struct cpuset *cs, int new_prs) } } -update_tasks_cpumask (parent); +update_tasks_cpumask (parent, tmpmask.new_cpus);if (parent->child_ecpus_count)update_sibling_cpumasks (parent, cs, &tmpmask);
@@ -3318,7 +3322,7 @@ hotplug_update_tasks_legacy(struct cpuset *cs,* as the tasks will be migrated to an ancestor. */ if (cpus_updated && !cpumask_empty (cs->cpus_allowed)) -update_tasks_cpumask (cs); +update_tasks_cpumask (cs, new_cpus);if (mems_updated && !nodes_empty (cs->mems_allowed))update_tasks_nodemask (cs);
@@ -3355,7 +3359,7 @@ hotplug_update_tasks(struct cpuset *cs,spin_unlock_irq (&callback_lock);if (cpus_updated) -update_tasks_cpumask (cs); +update_tasks_cpumask (cs, new_cpus);if (mems_updated)update_tasks_nodemask (cs); }
kernel/locking/rtmutex.c +3 -2
@@ -901,8 +901,9 @@ static int __sched rt_mutex_adjust_prio_chain(struct task_struct *task,* then we need to wake the new top waiter up to try * to get the lock. */ -if (prerequeue_top_waiter !=rt_mutex_top_waiter (lock)) -wake_up_state (waiter->task, waiter->wake_state); + top_waiter =rt_mutex_top_waiter (lock); +if (prerequeue_top_waiter != top_waiter) +wake_up_state (top_waiter->task, top_waiter->wake_state);raw_spin_unlock_irq (&lock->wait_lock);return 0 ; }
kernel/trace/trace.c +0 -3
@@ -9144,9 +9144,6 @@ buffer_percent_write(struct file *filp, const char __user *ubuf,if (val >100 )return -EINVAL ; -if (!val)
Lines of this file are not shown. View the raw message.
sound/soc/codecs/tas5805m.c +90 -41
131 lines not on this page · raw message
tools/testing/selftests/net/forwarding/lib.sh +2 -2
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/mptcp_join.sh +17 -5
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/test_vxlan_vnifiltering.sh +5 -13
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.