Linux 7.2.13
Greg Kroah-Hartman
maintainerI'm announcing the release of the 7.2.13 kernel.
All users of the 7.2 kernel series must upgrade.
The updated 7.2.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-7.2.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/netlink/specs/conntrack.yaml | 21 + Makefile | 2 arch/arm/boot/dts/ti/omap/dra7xx-clocks.dtsi | 2 arch/arm/configs/sama5_defconfig | 4 arch/nios2/include/asm/checksum.h | 2 arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts | 18 - arch/s390/kernel/perf_pai.c | 25 + arch/s390/pci/pci_sysfs.c | 3 arch/x86/events/intel/uncore_snbep.c | 5 arch/x86/hyperv/hv_init.c | 3 arch/x86/include/asm/insn.h | 2 arch/x86/kernel/kvm.c | 32 ++ arch/x86/kvm/mmu.h | 16 - arch/x86/kvm/mmu/paging_tmpl.h | 3 arch/x86/kvm/svm/sev.c | 2 arch/x86/kvm/vmx/nested.c | 4 block/bsg-lib.c | 13 - drivers/accel/amdxdna/Kconfig | 1 drivers/accel/rocket/rocket_device.c | 2 drivers/accel/rocket/rocket_device.h | 1 drivers/accel/rocket/rocket_drv.c | 7 drivers/accel/rocket/rocket_job.c | 2 drivers/base/regmap/regcache-maple.c | 9 drivers/base/regmap/regcache.c | 6 drivers/firewire/core-transaction.c | 8 drivers/gpio/gpio-mxc.c | 36 +- drivers/gpio/gpio-nct6694.c | 2 drivers/gpio/gpiolib-shared.c | 19 + drivers/gpio/gpiolib.c | 9 drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 3 drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 22 - drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 21 - drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 17 - drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 13 - drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 25 + drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 2 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 2 drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 18 + drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 55 ++++ drivers/gpu/drm/drm_exec.c | 73 +++-- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 12 drivers/gpu/drm/i915/display/intel_dmc.c | 76 +++++- drivers/gpu/drm/i915/display/intel_dmc_regs.h | 12 drivers/gpu/drm/panthor/panthor_hw.c | 2 drivers/gpu/drm/vc4/vc4_hdmi.c | 20 - drivers/gpu/drm/xe/xe_bo.c | 11 drivers/gpu/drm/xe/xe_exec.c | 7 drivers/gpu/drm/xe/xe_oa.c | 7 drivers/gpu/drm/xe/xe_vm.c | 31 ++ drivers/gpu/drm/xe/xe_vm.h | 2 drivers/hv/channel_mgmt.c | 12 drivers/hv/connection.c | 1 drivers/hv/mshv_vtl_main.c | 3 drivers/hv/vmbus_drv.c | 1 drivers/i2c/busses/i2c-qcom-cci.c | 4 drivers/i2c/busses/i2c-qcom-geni.c | 37 +- drivers/i2c/busses/i2c-viai2c-wmt.c | 2 drivers/i2c/busses/i2c-xiic.c | 49 +++ drivers/iommu/generic_pt/fmt/Makefile | 2 drivers/md/dm-cache-target.c | 59 ++-- drivers/md/dm-crypt.c | 3 drivers/md/dm-ebs-target.c | 3 drivers/md/dm-integrity.c | 6 drivers/net/ethernet/actions/owl-emac.c | 3 drivers/net/ethernet/aeroflex/greth.c | 3 drivers/net/ethernet/amd/au1000_eth.c | 3 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 10 drivers/net/ethernet/ethoc.c | 3 drivers/net/ethernet/hisilicon/hip04_eth.c | 3 drivers/net/ethernet/hisilicon/hisi_femac.c | 3 drivers/net/ethernet/marvell/mv643xx_eth.c | 4 drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c | 5 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 6 drivers/net/ethernet/ti/icssm/icssm_prueth.c | 3 drivers/net/ntb_netdev.c | 47 ++- drivers/net/wireless/intersil/p54/fwio.c | 42 ++- drivers/pci/pci.c | 15 - drivers/pci/quirks.c | 12 drivers/pinctrl/pinctrl-amd.c | 9 drivers/pinctrl/qcom/pinctrl-hawi.c | 1 drivers/pinctrl/qcom/pinctrl-ipq5018.c | 10 drivers/pinctrl/qcom/pinctrl-nord.c | 1 drivers/pinctrl/qcom/pinctrl-qcs8300.c | 1 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 37 ++ drivers/pinctrl/sunxi/pinctrl-sunxi-dt.c | 1 drivers/power/sequencing/pwrseq-qcom-wcn.c | 16 - drivers/power/supply/ds2780_battery.c | 2 drivers/power/supply/generic-adc-battery.c | 9 drivers/power/supply/power_supply_core.c | 26 +- drivers/s390/net/ctcm_mpc.c | 3 drivers/scsi/libiscsi.c | 14 - drivers/scsi/libsas/sas_expander.c | 14 - drivers/scsi/mpi3mr/mpi3mr_app.c | 2 drivers/scsi/scsi_transport_fc.c | 6 drivers/scsi/scsi_transport_iscsi.c | 2 drivers/scsi/scsi_transport_sas.c | 6 drivers/scsi/st.c | 18 - drivers/scsi/xen-scsifront.c | 1 drivers/soc/tegra/fuse/tegra-apbmisc.c | 2 drivers/soc/tegra/pmc.c | 1 drivers/spi/spi-imx.c | 9 drivers/spi/spi-tegra114.c | 7 drivers/target/iscsi/iscsi_target_configfs.c | 26 +- drivers/target/target_core_transport.c | 8 drivers/ufs/core/ufs_bsg.c | 2 fs/9p/v9fs.h | 1 fs/9p/vfs_super.c | 4 fs/afs/internal.h | 2 fs/afs/super.c | 2 fs/autofs/waitq.c | 25 + fs/ext4/ext4.h | 2 fs/ext4/extents-test.c | 2 fs/ext4/extents.c | 1 fs/ext4/extents_status.c | 7 fs/ext4/extents_status.h | 1 fs/ext4/super.c | 13 - fs/namei.c | 3 fs/namespace.c | 19 + fs/notify/mark.c | 11 fs/ntfs/attrib.c | 8 fs/ntfs/bitmap.c | 8 fs/ntfs/ea.c | 126 ++++++++-- fs/ntfs/file.c | 41 +-- fs/ntfs/super.c | 4 fs/ntfs3/ntfs_fs.h | 1 fs/ntfs3/super.c | 33 +- fs/ocfs2/dlm/dlmcommon.h | 2 fs/ocfs2/dlm/dlmdebug.c | 5 fs/ocfs2/dlm/dlmrecovery.c | 2 fs/pipe.c | 6 fs/smb/client/cifssmb.c | 24 + fs/smb/client/connect.c | 21 + fs/smb/client/file.c | 38 ++- fs/smb/client/smb2ops.c | 7 fs/smb/server/smb2pdu.c | 6 fs/tracefs/event_inode.c | 10 fs/unicode/utf8-core.c | 21 + fs/xfs/libxfs/xfs_rtgroup.h | 6 fs/xfs/libxfs/xfs_sb.c | 37 +- fs/xfs/xfs_aops.c | 3 fs/xfs/xfs_fsmap.c | 2 fs/xfs/xfs_ioctl.c | 2 fs/xfs/xfs_iomap.c | 3 fs/xfs/xfs_iops.c | 2 include/drm/drm_exec.h | 15 - include/linux/bsg-lib.h | 3 include/linux/cgroup-defs.h | 5 include/linux/fsnotify_backend.h | 1 include/linux/futex.h | 19 - include/linux/futex_types.h | 2 include/linux/irq-entry-common.h | 23 + include/linux/maple_tree.h | 4 include/linux/power_supply.h | 16 + include/linux/sched/signal.h | 4 include/linux/sched/user.h | 8 include/linux/unicode.h | 1 include/net/af_vsock.h | 3 io_uring/cancel.c | 7 ipc/namespace.c | 2 kernel/cgroup/cgroup.c | 6 kernel/events/core.c | 33 +- kernel/exit.c | 2 kernel/futex/core.c | 51 ++-- kernel/irq/proc.c | 24 + kernel/pid_namespace.c | 2 kernel/printk/printk.c | 2 kernel/sched/core.c | 19 - kernel/sched/ext/ext.c | 95 +++++-- kernel/sched/ext/idle.c | 50 +++ kernel/sched/ext/internal.h | 5 kernel/trace/Makefile | 5 kernel/trace/ring_buffer.c | 60 ++-- kernel/trace/trace.c | 28 +- kernel/trace/trace_events_filter.c | 9 kernel/trace/trace_events_hist.c | 19 + kernel/trace/trace_probe.c | 3 kernel/trace/trace_snapshot.c | 5 kernel/trace/undefsyms_base.c | 5 kernel/watch_queue.c | 11 kernel/workqueue.c | 27 +- lib/crypto/arm64/poly1305-armv8.pl | 2 lib/crypto/poly1305.c | 2 net/bridge/br_multicast.c | 13 - net/core/page_pool.c | 3 net/core/sock.c | 3 net/ipv4/fib_semantics.c | 2 net/ipv4/tcp.c | 18 + net/ipv4/tcp_cong.c | 4 net/ipv4/tcp_dctcp.c | 4 net/ipv4/tcp_minisocks.c | 2 net/ipv4/tcp_output.c | 2 net/ipv6/calipso.c | 6 net/iucv/af_iucv.c | 42 +-- net/mac802154/ieee802154_i.h | 7 net/mac802154/main.c | 1 net/mac802154/scan.c | 51 +++- net/netlink/af_netlink.c | 10 net/rds/rdma_transport.c | 38 ++- net/sched/act_api.c | 11 net/sched/cls_flower.c | 5 net/sctp/inqueue.c | 6 net/sctp/socket.c | 33 +- net/tipc/node.c | 2 net/vmw_vsock/af_vsock.c | 49 +++ net/vmw_vsock/virtio_transport_common.c | 3 net/vmw_vsock/vmci_transport.c | 34 ++ samples/pidfd/Makefile | 2 security/selinux/hooks.c | 36 -- sound/soc/amd/yc/pci-acp6x.c | 38 ++- sound/soc/codecs/cs42l52.c | 2 sound/soc/codecs/cs42l56.c | 2 sound/soc/codecs/max98371.c | 2 sound/soc/codecs/nau8822.c | 4 sound/soc/codecs/pcm3168a.c | 2 sound/soc/codecs/wm8978.c | 4 sound/soc/intel/avs/pcm.c | 2 sound/soc/sof/ipc4-topology.c | 9 sound/soc/sof/sof-client.c | 6 sound/soc/stm/stm32_spdifrx.c | 2 tools/arch/x86/include/asm/insn.h | 2 tools/bootconfig/main.c | 3 tools/gpio/Makefile | 6 tools/power/x86/turbostat/turbostat.c | 74 +++-- 225 files changed, 2040 insertions(+), 873 deletions(-)
Abdurrahman Hussain (1):
i2c: xiic: restore non-managed runtime PM to fix clk WARN flood
Abel Vesa (1):
i2c: qcom-geni: Restore the source-clock selection policy
Adriel Santos (1):
pinctrl: qcom: ipq5018: replace gcc_plltest with pwm2 on gpio12
Aleksandr Khromov (3):
ksmbd: fill in FileSysIdentifier in FS_POSIX_INFORMATION
ksmbd: initialize FileSystemControlFlags in FS_CONTROL_INFORMATION
ksmbd: zero the FS_OBJECT_ID_INFORMATION buffer before filling it in
Alexander Gruhlke (2):
PCI: Ignore Immediate Readiness on Samsung 990 PRO and 990 EVO Plus NVMe
PCI: Don't treat ~0 as ready in pci_dev_wait() with RRS SV
Alexandre Cassen (2):
net/mlx5: HWS, release L2 to L3 tunnel reformats to their own pool net/mlx5: HWS, fix flow meter offset within its bulk
Alexey Charkov (1):
power: supply: core: prevent unregistering a power supply while a callback runs
Ali Ahmet Memis (1):
tools/power turbostat: Read complete CPU lists
Allison Henderson (1):
net/rds: don't let the rdma_cm destroy an id RDS still owns on route failure
Amirmohammad Eftekhar (1):
KVM: nVMX: Reset MMU back to the root MMU if loading L2 state fails for !VM-Entry
Amit Machhiwal (1):
tracing: Do not initialize tracefs work if tracing is disabled
Antoine Huret (1):
perf: Update cgroup time when rotating multiplexed events
Aohan Mei (2):
net: rds: fix uninitialized trans dereference in CM event handler net/sched: cls_flower: validate mask pointer after nla_next()
Aswin Karuvally (1):
s390/ctcm: Prevent XID null dereference
Avi Weiss (1):
ASoC: stm32: spdifrx: fix synchronization state check
Aviv Vaknin (1):
pid_namespace: make zap_pid_ns_processes() freezable
Bartosz Golaszewski (2):
gpio: shared: fix use-after-free bug when adding shared proxies
gpio: shared: gracefully handle no-device lookup of shared GPIOs
Ben Cressey (2):
dm-crypt: fix a tiny race condition in crypt_dec_pending
dm-integrity: fix infinite loop on discard with large tag size
Benjamin Cheng (1):
drm/amdgpu/userq: actually validate userq BOs
Benjamin Marzinski (1):
dm cache: fix issue with background work locking
Bommu Krishnaiah (1):
drm/xe/oa: Zero OA buffer at allocation
Bryam Vargas (1):
net/iucv: fix the recvmsg window update
Carlos Jones Jr (1):
spi: tegra114: assert CS GPIO for every transfer in a message
Carlos Maiolino (1):
xfs: fix capability check in xfs
Cen Zhang (1):
ocfs2/dlm: Protect the recovery list during debugfs reads
Cen Zhang (Microsoft Security FORGE Labs) (3):
tcp: fix use-after-free in do_tcp_getsockopt(TCP_CONGESTION)
tcp: fix use-after-free in do_tcp_getsockopt(TCP_CC_INFO) io_uring/cancel: don't spin on local work the task can't run
Cen Zhang (Microsoft) (1):
watch_queue: Fix note pool publication race in watch_queue_set_size()
Charles Vosburgh (1):
sctp: validate chunk length in the inqueue parser
Chen Cheng (1):
dm-integrity: require stable writes for internal hash modes
Chengfeng Ye (1):
tipc: protect node reset trace dump with node lock
Christian Brauner (9):
9p: free the session after a grace period
afs: free the super info after a grace period
unicode: free the map after a grace period
ext4: free the sbi after a grace period
eventfs: Free the eventfs_inode after an rcu grace period too
ipc: drop the mqueue mount with kern_unmount() on setup failure
ntfs3: free the sbi after a grace period
namespace: a mount that copy_tree() leaves out can't take over a lock
namei: test for a negative dentry the way traverse_mounts() does
Christian König (1):
drm/exec: don't immediately add prelocked obj to array of locked objs
Christoph Hellwig (1):
xfs: fix zoned write iomap flags assignments
Conor Dooley (1):
riscv: dts: microchip: beaglev-fire: remove double definition of gpio interrupts
Daehyeon Ko (3):
sctp: revalidate output stream after association connect wait vsock/virtio: validate packet source for connected sockets vsock/vmci: validate packet source for connected sockets
Dave Stevenson (1):
drm/vc4: hdmi: Move packet RAM enable to PM runtime
David Carlier (2):
ring-buffer: Do not show buffer_meta for CPUs without a buffer
tracing: Take trace_types_lock when dropping the buffer_meta reference
David Oberhollenzer (1):
ARM: dts: ti/omap: dra7: fix PCIe PHY clock divider definition
David Rosca (1):
drm/amdgpu: Fix VCE 3 ring align_mask
David Yang (8):
net: hisilicon: hisi_femac: Move setting of netops to fix crash
net: hisilicon: hip04_eth: Move setting of netops to fix crash
net: ethernet: actions: Move setting of netops to fix crash
net: mv643xx: move setting of netops to fix crash
net: au1000: move setting of netops to fix crash
net: ethoc: move setting of netops to fix crash
net: ethernet: aeroflex: move setting of netops to fix crash
net: ti: icssm-prueth: Move setting of netops to fix crash
Dibin Moolakadan Subrahmanian (2):
drm/i915/dmc: Add sanity check for DMC load address drm/i915/dmc: Harden DMC firmware payload parsing
Dmitry Kandybka (1):
tracing: Fix ignored return value of resize_buffer_duplicate_size()
Dnyaneshwar Bhadane (1):
drm/i915/cx0_phy: Fix ARL-S host bridge detection
Donggeun Yoo (2):
ring-buffer: Fix the sub-buffer array base in rb_meta_subbuf_idx()
tracing: Fix the shift out of bounds in the log2 histogram modifier
EJ Campbell (1):
x86/kvm: Don't consume async #PF flags on a kernel #PF in NMI context
Eric Biggers (1):
lib/crypto: poly1305: Use memzero_explicit() in poly1305_final()
Erik Faye-Lund (1):
drm/panthor: fix immortalis condition
Etienne Perot (1):
cgroup: fix spurious SIGKILL of CLONE_INTO_CGROUP children
Florian Schauer (1):
page_pool: keep frag_offset aligned for odd-sized requests
Frank Sorenson (3):
cifs: add revalidation on FSCTL failure in smb2_duplicate_extents()
cifs: don't update i_size in cifs_do_truncate without a cached handle
smb: client: fix heap overflow in cifs_do_set_acl()
François Roux (1):
power: sequencing: qcom-wcn: power off WLAN at probe
Gael Blivet (1):
ksmbd: exempt FSCTL_PIPE_TRANSCEIVE from the generic file-id lookup
Genjian Zhang (1):
dm-ebs: fix incorrect device offset check in ebs_ctr()
Gilberto Conde (1):
pinctrl: qcom: ipq5018: add missing pwm3 function on gpio13
Greg Kroah-Hartman (1):
Linux 7.2.13
Guangshuo Li (1):
accel/rocket: clear rdev on device init failure
Guixiong Wei (1):
perf/x86/intel/uncore: Fix DMR CXL CM invert filter
Hao Ge (1):
tracing: Fix crash in print_graph_function_event()
Hardik Garg (1):
mshv_vtl: Check per-CPU register page before mmap
Haris Okanovic (2):
perf: Fix perf_pmu_migrate_context() leaving events behind genirq/proc: Fix missing CPU header in /proc/interrupts
Heyang Tan (1):
wifi: p54: validate firmware record lengths
Hongling Zeng (5):
ntfs: handle signal interruption in fallocate
ntfs: fix incorrect MFT record pointer passed to ntfs_attr_record_resize
ntfs: fix undefined behavior in mft/index record size calculation
ntfs: take invalidate_lock in ntfs_setattr_size()
ntfs: fix memmove overlap in ntfs_new_attr_flags
Hui Su (1):
sched_ext: idle: Respect task affinity in restricted CPU selection
HyeongJun An (6):
ASoC: cs42l56: Put the Limiter Cushion control on the limiter register
ASoC: cs42l52: Fix the NG Type Switch bit
ASoC: pcm3168a: Fix the DAC zero flag polarity bit
ASoC: max98371: Fix the Speaker DHT Min Volume bits
ASoC: wm8978: Fix the 128x oversampling switch bits
ASoC: nau8822: Fix the 128x oversampling switch bits
Hyunchul Lee (1):
ntfs: fix resident conversion in ntfs_new_attr_flags
Igor Paunovic (2):
accel/rocket: search every core slot when a core is removed accel/rocket: search every core slot when looking up a scheduler
Igor Velkov (1):
net: stmmac: dwmac1000: clear the RGMII status interrupt
Ilya Maximets (2):
netlink: specs: fix the conntrack filter type
netlink: specs: add missing mask attributes for conntrack dump
Jacopo Labardi (1):
ntfs: fix FITRIM range alignment
Jann Horn (2):
KVM: SEV: Fix page dirtying in sev_gmem_post_populate()
futex: Fix mm reuse handling for FUT_OFF_MMSHARED
Jason Gunthorpe (1):
iommupt/kunit: Use if_changed_rule for the kunit
Jesse Zhang (4):
drm/amdgpu: don't drop the runtime PM reference twice in amdgpu_gpr drm/amdgpu: keep the eviction fence until the last handle is closed drm/amdgpu: report the BO alignment in bytes in GEM_LIST_HANDLES drm/amdgpu: free the userptr ranges when a CS fails after parser_bos
Jinhui Guo (1):
soc/tegra: fuse: Add missing newline to APBMISC error message
Joas Antonio dos Santos (1):
calipso: keep BIG TCP payload_len in calipso_skbuff_setattr()
John Ogness (1):
printk: Postpone kthread startup
Jon Hunter (1):
soc/tegra: pmc: Fix uninitialised clock rate
Jun Yang (1):
net: bridge: mcast: don't truncate the port group walk on teardown
Jérémy Jean (2):
lib/crypto: arm64: Fix lost Poly1305 carry when resuming NEON state net/sched: fix use-after-free in __tcf_action_put()
K Prateek Nayak (1):
sched/core: Call wakeup_preempt() for queued tasks during class change
Kaiwen Shi (1):
mac802154: fix data race and NULL deref on local->assoc_dev
Karl Mehltretter (1):
power: supply: Fix maintenance charge table kernel-doc
Keith Busch (1):
nios2: fix __wsum type degradation in csum_fold()
Kenneth Feng (1):
drm/amd/pm: add zero fan stop temperature support on smu 14.0.2
Kent Gibson (1):
gpiolib: fix memory leak in gpiod_set_array_value_complex() on error paths
Koichiro Den (1):
net: ntb_netdev: Fix statistics races
Konrad Dybcio (2):
pinctrl: qcom: hawi: Fix intr_target_width
pinctrl: qcom: qcs8300: Fix intr_target_width
Krystian Kaniewski (1):
ring-buffer: Fix false warning in ring_buffer_map_get_reader()
Kyle Zeng (4):
netlink: reset skb headers before unicast and multicast filtering
pipe: preserve existing fasync readers on writer setup failure
netlink: avoid hashing the network namespace pointer
fsnotify: prevent mark additions during connector teardown
Laurence Oberman (2):
scsi: st: Save the visited block for the partition the drive is in
scsi: st: Fix use-after-free race between st_remove() and st_open()
Lee Jones (1):
tracing/histograms: Reject non-stacktrace fields for synthetic stacktrace fields
Len Brown (5):
tools/power turbostat: Warn, but don't Err on out-dated perf systems tools/power turbostat: Fix fd_perf leak on reset tools/power turbostat: Fix CWF PMT off-by-one tools/power turbostat: Fix PMT error path fd handling tools/power turbostat: Fix add_counter issue if > 24 counters.
Liam R. Howlett (1):
accel/amdxdna: Fix Kconfig invalid configuration
Linfeng Sun (1):
scsi: target: iscsi: Fix race in discovery auth updates
Loic Poulain (1):
i2c: qcom-cci: Fix HALT_ACK reset request being dropped
Lorenzo Stoakes (ARM) (1):
perf: Track the perf mlock gift separately
Lukas Zobernig (1):
x86/insn-eval: Fix shadowed segment index in get_seg_reg_override_idx()
Mario Limonciello (2):
ASoC: amd: yc: disable MSI on resume
pinctrl: amd: Clear S4 wake bits when firmware has _AEI
Martin Kaiser (1):
tracing: probes: error if BTF is required but unavailable
Michael Kelley (2):
x86/hyperv: Avoid using per-cpu output page in hv_apicid_to_vp_index()
Drivers: hv: Don't reset VMBus connection state on error/exit paths
Michael Reeves (1):
regmap: Drop map lock during cache init and exit
Michal Luczaj (1):
vsock: treat TCP_CLOSING as once-established
Mikhail Gavrilov (1):
entry: Account the deferred hrtimer rearm as hardirq context for lockdep
Ming Yu (1):
gpio: nct6694: Mark the GPIO controller as sleeping
Ming-Hung Tsai (1):
dm cache: fix demotion stats in passthrough mode
Namjae Jeon (2):
ntfs: use pagecache_isize_extended() on size extension
ntfs: move attribute payload before shrinking its record
Nickolai Zeldovich (1):
exit: fix lost-update race on the child_subreaper bitfields
Nicolai Buchwitz (1):
net: bcmgenet: unshare the skb before writing the control block
Niklas Schnelle (1):
s390/pci: Fix leak of uninitialized kernel data in SCLP report
Niranjana Vishwanathapura (1):
drm/xe: skip eviction of a BO with no resource
Norbert Szetei (1):
net: psp: do not inherit the Rx association on clone
Pablo Mazzini (1):
pinctrl: sunxi: dt: do not accumulate npins across probe attempts
Paolo Bonzini (1):
KVM: x86/mmu: Cope with the SS bit being set in #NPF exit codes
Paul Moore (1):
selinux: fix BPF token permission checks
Paulo Alcantara (3):
smb: client: fix data corruption with concurrent writes and O_TRUNC
smb: client: fix multiuser mount with krb5
smb: client: drain outstanding I/O before truncating on O_TRUNC open
Peng Fan (4):
gpio: mxc: fix race between chained IRQ handler install and probe completion
gpio: mxc: fix both_edges bit operations
gpio: mxc: fix wakeup_pads bit operations
gpio: mxc: fix race between gpiochip registration and IRQ domain setup
Pengpeng Hou (1):
ARM: configs: sama5: enable current Microchip KSZ DSA symbols
Perry Yuan (3):
drm/amdgpu: destroy mutex when tearing down ttm buffer entity drm/amdgpu: fix GEM object leak on ENOMEM in userptr ioctl drm/amdgpu: fix sched entity leak in ttm buffer entity init
Peter Ujfalusi (2):
ASoC: SOF: ipc4-topology: Fix shift-out-of-bounds for aggregated ALH capture
ASoC: SOF: sof-client: Use event-handler mutex consistently
Prike Liang (1):
drm/amdgpu: correct reservation fence slots for userq per-vm BOs eviction
Richard Leitner (1):
spi: imx: fix slab corruption from undersized DMA bounce buffers
Sasha Levin (3):
samples: pidfd: fix userprogs typo
bootconfig: give the footer size static_assert a message
tools: gpio: fix building from the top level with O=
Sergey Tiraspolsky (1):
ASoC: Intel: avs: Reset the stream unless it is already prepared
Shawn Guo (1):
pinctrl: qcom: spmi-gpio: make direction changes exclusive
Srinivasan Shanmugam (1):
drm/amd/display: Fix NULL sink dereference in USB4 bandwidth functions
Stanley Jhu (1):
scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies
Sung Byeongchan (1):
autofs: ignore notification errors from a replaced pipe
Svyatoslav Ryhel (1):
power: supply: generic-adc-battery: Fix temperature IIO channel conversion
Taeyang Lee (2):
tracing: Keep the predicate limit separate from program capacity
tracing: Check operator stack capacity before pushing
Takashi Sakamoto (1):
firewire: core: fix race condition in split transaction handling
Tejun Heo (5):
sched_ext: Fix use-after-free of a destroyed user DSQ by a deferred reenqueue
sched_ext: Propagate every bypass depth change to the descendants
workqueue: Annotate cb_lock nesting when draining a dead BH pool
sched_ext: Fix stall when a task enqueued with SCX_ENQ_LAST lands back on its CPU's local DSQ
sched_ext: Fix the bypass dispatch claim for schedulers bypassed by an ancestor
Tengda Wu (1):
tracing: Fix hist trigger timestamps for buffered events
Thomas Hellström (2):
drm/xe: Bump LRU for external objects on exec and rebind
drm/xe: Don't transfer shrinker pages for pinned bos on purgeable state change
Thomas Richter (1):
s390/pai: Handle multiple PMU stop callback invocations
Timur Kristóf (2):
drm/amdgpu/sdma3: Work around POLL_REGMEM / FENCE hang drm/amdgpu/uvd3.1: Fix checking whether UVD firmware keyselect was already set
Tvrtko Ursulin (1):
drm/amdgpu: Remove the bo list mutex
Vincent Donnefort (5):
tracing: Fix empty symbol names in simple_ring_buffer undef check
tracing: Fix simple_ring_buffer undef check on parisc
tracing: Fix simple_ring_buffer undef check on sparc64
ring-buffer: Skip si_mem_available() for persistent and remote buffers
ring-buffer: Use subbuf_order in available memory estimation
Waiman Long (1):
Drivers: hv: Avoid infinite retry loop in init_vp_index()
Wentao Liang (1):
i2c: viai2c-wmt: Fix clock leak in wmt_i2c_probe()
Xingui Yang (1):
scsi: libsas: Fix SMP IO deadlock during HA resume
Xueqin Luo (1):
power: supply: ds2780: Fix ds2780_get_capacity() returning raw value
Yao Kai (1):
workqueue: Fix unbound pool lifetime for pending pwqs
Yehyeong Lee (4):
scsi: xen/scsifront: Check for a NULL shadow entry on a backend response
scsi: libiscsi: Reject a negative task index from parse_pdu_itt
scsi: libiscsi: Validate the ITT reflected in a Reject PDU
scsi: libiscsi: Validate the task named by a management response
Yu Zhang (1):
scsi: target: Disable interrupts while holding delayed_cmd_lock
Yun Zhou (1):
xfs: don't hold buffer locks across sync transaction commit in xfs_sync_sb_buf
Yunpeng Tian (1):
smb: client: reject SetEA requests that do not fit the request buffer
Zhangfei Gao (1):
pinctrl: qcom: nord: fix GPIO interrupt target width
Zihan Xi (1):
ipv4: avoid divide by zero in fib_rebalance
Zqiang (1):
workqueue: Use raise_softirq() to trigger softirq in irq_work handler
Greg Kroah-Hartman
maintainerDocumentation/netlink/specs/conntrack.yaml +18 -3
@@ -360,6 +360,17 @@ attribute-sets: name: tsoff type: u32 byte-order: big-endian + - + name: filter-attrs + attributes: + - + name: orig-flags + type: u32 + doc: bitmask of tuple fields to filter on, original direction + - + name: reply-flags + type: u32 + doc: bitmask of tuple fields to filter on, reply direction - name: conntrack-attrs attributes:
@@ -466,7 +477,7 @@ attribute-sets: - name: filter type: nest - nested-attributes: tuple-attrs + nested-attributes: filter-attrs - name: status-mask type: u32
@@ -591,10 +602,14 @@ operations: request: value: 0x101 attributes: - - mark - - filter + - tuple-orig + - tuple-reply - status + - mark - zone + - mark-mask + - filter + - status-mask reply: value: 0x100 attributes:
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 7 PATCHLEVEL = 2 -SUBLEVEL = 12 +SUBLEVEL = 13 EXTRAVERSION = NAME = Baby Opossum Posse
arch/arm/boot/dts/ti/omap/dra7xx-clocks.dtsi +1 -1
@@ -1376,8 +1376,8 @@ optfclk_pciephy_div: clock-optfclk-pciephy-div-8@4a00821c { clocks = <&apll_pcie_ck>; #clock-cells = <0>; reg = <0x021c>; + ti,dividers = <2>, <1>; ti,bit-shift = <8>; - ti,max-div = <2>; }; apll_pcie_clkvcoldo: clock-apll-pcie-clkvcoldo {
arch/arm/configs/sama5_defconfig +2 -2
@@ -70,8 +70,8 @@ CONFIG_BLK_DEV_SD=y # CONFIG_BLK_DEV_BSG is not set # CONFIG_SCSI_LOWLEVEL is not set CONFIG_NETDEVICES=y -CONFIG_NET_DSA_MICROCHIP_KSZ9477=m -CONFIG_NET_DSA_MICROCHIP_KSZ9477_SPI=m +CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON=m +CONFIG_NET_DSA_MICROCHIP_KSZ_SPI=m # CONFIG_NET_VENDOR_BROADCOM is not set CONFIG_MACB=y # CONFIG_NET_VENDOR_CIRRUS is not set
arch/nios2/include/asm/checksum.h +1 -1
@@ -27,7 +27,7 @@ static inline __sum16 csum_fold(__wsum sum) "add %0, %0, r8\n" "nor %0, %0, %0\n" : "=r" (sum) - : "r" (sum << 16), "0" (sum) + : "r" ((__force u32)sum << 16), "0" (sum) : "r8");return (__force __sum16 ) sum; }
arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts +0 -18
@@ -90,10 +90,6 @@ regulator-1v8-syzygy { }; &gpio0 { - interrupts = <13>, <14>, <15>, <16>, - <17>, <18>, <19>, <20>, - <21>, <22>, <23>, <24>, - <25>, <26>; ngpios = <14>; gpio-line-names = "", "", "", "", "", "", "", "", "", "", "", "", "SD_CARD_CS", "USER_BUTTON";
@@ -101,12 +97,6 @@ &gpio0 { }; &gpio1 { - interrupts = <27>, <28>, <29>, <30>, - <31>, <32>, <33>, <34>, - <35>, <36>, <37>, <38>, - <39>, <40>, <41>, <42>, - <43>, <44>, <45>, <46>, - <47>, <48>, <49>, <50>; ngpios = <24>; gpio-line-names = "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
@@ -115,14 +105,6 @@ &gpio1 { }; &gpio2 { - interrupts = <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>; ngpios = <32>; gpio-line-names = "P8_PIN3_USER_LED_0", "P8_PIN4_USER_LED_1", "P8_PIN5_USER_LED_2", "P8_PIN6_USER_LED_3", "P8_PIN7_USER_LED_4", "P8_PIN8_USER_LED_5",
arch/s390/kernel/perf_pai.c +23 -2
@@ -502,6 +502,7 @@ static void pai_start(struct perf_event *event, int flags, cpump->event = event; } } + event->hw.state &= ~PERF_HES_STOPPED ; }static void paicrypt_start (struct perf_event *event,int flags)
@@ -548,6 +549,13 @@ static void pai_stop(struct perf_event *event, int flags)struct pai_mapptr *mp =this_cpu_ptr (pai_root[idx].mapptr);struct pai_map *cpump = mp->mapptr; +/* Cope with multiple invocations: +* 1. perf_event_throttle() --> PMU->stop() +* 2. task schedules out --> PMU->stop() +* Check for event already stopped. +*/ +if (event->hw.state &PERF_HES_STOPPED ) +return ;if (!event->attr.sample_period) {/* Counting */ pai_pmu[idx].pmu->read (event); }else {/* Sampling */
@@ -710,9 +718,9 @@ static void pai_have_samples(int idx) {struct pai_mapptr *mp =this_cpu_ptr (pai_root[idx].mapptr);struct pai_map *cpump = mp->mapptr; -struct perf_event *event; +struct perf_event *event, *e2; -list_for_each_entry (event, &cpump->syswide_list, hw.tp_list) +list_for_each_entry_safe (event, e2, &cpump->syswide_list, hw.tp_list)pai_have_sample (event, cpump); }
@@ -729,6 +737,17 @@ static void paicrypt_sched_task(struct perf_event_pmu_context *pmu_ctx,pai_have_samples (PAI_PMU_CRYPTO ); } +/* Prevent ioctl(fd, PERF_EVENT_IOC_PERIOD, ...) call. +* It sets perf_event::event_limit to a positive value and causes +* perf_event_overflow() to invoke pai_stop() call back function when +* perf_event::event_limit hits zero. This is not supported because the +* sample events CRYPTO_ALL and NNPA_ALL are always taken at schedule out +* of a task. +*/ +static int pai_check_period (struct perf_event *event,u64 value) +{ +return -EINVAL ; +}/* ============================= paiext ====================================*/ static void paiext_event_destroy (struct perf_event *event)
@@ -842,6 +861,7 @@ static struct pmu paicrypt = { .stop = paicrypt_stop, .read = paicrypt_read, .sched_task = paicrypt_sched_task, + .check_period = pai_check_period, .attr_groups = paicrypt_attr_groups };
@@ -1053,6 +1073,7 @@ static struct pmu paiext = { .stop = paiext_stop, .read = paiext_read, .sched_task = paiext_sched_task, + .check_period = pai_check_period, .attr_groups = paiext_attr_groups, };
arch/s390/pci/pci_sysfs.c +3 -0
@@ -153,6 +153,9 @@ static ssize_t report_error_write(struct file *filp, struct kobject *kobj,if (off || (count <sizeof (*report)))return -EINVAL ; +if (count < (report->length +sizeof (*report))) +return -EINVAL ; + ret =sclp_pci_report (report, zdev->fh, zdev->fid);return ret ? ret : count;
arch/x86/events/intel/uncore_snbep.c +4 -1
@@ -474,6 +474,9 @@/* DMR */ #define DMR_IMH1_HIOP_MMIO_BASE 0x1ffff6ae7000#define DMR_HIOP_MMIO_SIZE 0x8000 +#define DMR_CXLCM_PMON_CTL_INVERT BIT(21) +#define DMR_CXLCM_PMON_RAW_EVENT_MASK (GENERIC_PMON_RAW_EVENT_MASK | \ + DMR_CXLCM_PMON_CTL_INVERT)#define DMR_CXLCM_EVENT_MASK_EXT 0xf#define DMR_HAMVF_EVENT_MASK_EXT 0xffffffff#define DMR_PCIE4_EVENT_MASK_EXT 0xffffff
@@ -6696,7 +6699,7 @@ static struct event_constraint dmr_uncore_cxlcm_constraints[] = {static struct intel_uncore_type dmr_uncore_cxlcm = { .name ="cxlcm" , - .event_mask =GENERIC_PMON_RAW_EVENT_MASK , + .event_mask =DMR_CXLCM_PMON_RAW_EVENT_MASK , .event_mask_ext =DMR_CXLCM_EVENT_MASK_EXT , .constraints = dmr_uncore_cxlcm_constraints, .format_group = &dmr_cxlcm_uncore_format_group,
arch/x86/hyperv/hv_init.c +2 -1
@@ -726,7 +726,8 @@ int hv_apicid_to_vp_index(u32 apic_id) input->partition_id =HV_PARTITION_ID_SELF ; input->apic_ids[0 ] = apic_id; - output = *this_cpu_ptr (hyperv_pcpu_output_arg); +/* Treat input as having 2 APIC IDs so output is 64-bit aligned */ + output = (void *)input +struct_size (input, apic_ids,2 ); control =HV_HYPERCALL_REP_COMP_1 |HVCALL_GET_VP_INDEX_FROM_APIC_ID ; status =hv_do_hypercall (control, input, output);
arch/x86/include/asm/insn.h +1 -1
@@ -321,7 +321,7 @@ static inline int insn_offset_immediate(struct insn *insn)* are repeated, it cannot be used for looping over the prefixes. */ #define for_each_insn_prefix (insn, prefix) \ - for (int idx = 0; idx < ARRAY_SIZE(insn->prefixes.bytes) && (prefix = insn->prefixes.bytes[idx]) != 0; idx++) + for (int __i = 0; __i < ARRAY_SIZE(insn->prefixes.bytes) && (prefix = insn->prefixes.bytes[__i]) != 0; __i++)#define POP_SS_OPCODE 0x1f#define MOV_SREG_OPCODE 0x8e
arch/x86/kernel/kvm.c +29 -3
@@ -265,11 +265,39 @@ noinstr u32 kvm_read_and_reset_apf_flags(void) }EXPORT_SYMBOL_FOR_KVM (kvm_read_and_reset_apf_flags); +static __always_inline bool kvm_apf_reason_pending(void) +{ +return __this_cpu_read (async_pf_enabled) && +__this_cpu_read (apf_reason.flags); +} + noinstr bool __kvm_handle_async_pf(struct pt_regs *regs, u32 token) { -u32 flags =kvm_read_and_reset_apf_flags ();irqentry_state_t state; +u32 flags; + +if (!kvm_apf_reason_pending ()) +return false; + +/* +* The guest does not enable KVM_ASYNC_PF_SEND_ALWAYS, so the host +* delivers async #PF only to user mode (or as a #PF VM-exit, which KVM +* reads itself). A #PF from kernel mode can still arrive between that +* delivery and the read of the reason flags, inside an NMI that +* interrupted it, for instance perf reading user memory for a call +* chain. Such a fault is not async, so leave the async PF flags +* untouched for the outer handler. Outside NMI context, on the other +* hand, async PF flags on a kernel-mode fault mean the host is broken. +*/ +if (!user_mode (regs)) { +if (likely (in_nmi ())) +return false; + state =irqentry_enter (regs); +instrumentation_begin (); +panic ("Host injected async #PF in kernel mode\n" ); + } + flags =kvm_read_and_reset_apf_flags ();if (!flags)return false;
@@ -285,8 +313,6 @@ noinstr bool __kvm_handle_async_pf(struct pt_regs *regs, u32 token)panic ("Host injected async #PF in interrupt disabled region\n" );if (flags &KVM_PV_REASON_PAGE_NOT_PRESENT ) { -if (unlikely (!(user_mode (regs)))) -panic ("Host injected async #PF in kernel mode\n" );/* Page is swapped out by the host. */ kvm_async_pf_task_wait_schedule (token); }else {
arch/x86/kvm/mmu.h +12 -4
@@ -198,8 +198,18 @@ static inline u8 permission_fault(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, unsigned pte_access, unsigned pte_pkey, u64 access) { - /* strip nested paging fault error codes */ - unsigned int pfec = access; +/* +* Of the error codes that do not contribute to the index in +* mmu->permissions, PK and SS are not supported by shadow paging +* and also not provided to EPT violations, but SS *is* included +* in the NPT exit code. RSVD faults are handled elsewhere. +*/ +unsigned int pfec = access & ~PFERR_SS_MASK ; +if (WARN_ON_ONCE (pfec & ~(PFERR_PRESENT_MASK |PFERR_WRITE_MASK | +PFERR_USER_MASK |PFERR_FETCH_MASK ))) + pfec &= (PFERR_PRESENT_MASK |PFERR_WRITE_MASK | +PFERR_USER_MASK |PFERR_FETCH_MASK ); +unsigned long rflags =kvm_x86_call (get_rflags)(vcpu);/*
@@ -223,8 +233,6 @@ static inline u8 permission_fault(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,kvm_mmu_refresh_passthrough_bits (vcpu, mmu); fault = (mmu->permissions[index] >> pte_access) &1 ; - -WARN_ON_ONCE (pfec & (PFERR_PK_MASK |PFERR_SS_MASK |PFERR_RSVD_MASK ));if (unlikely (mmu->pkru_mask)) {u32 pkru_bits, offset;
arch/x86/kvm/mmu/paging_tmpl.h +1 -2
@@ -326,7 +326,6 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,int offset;u64 walk_nx_mask =0 ;const int write_fault = access &PFERR_WRITE_MASK ; -const int user_fault = access &PFERR_USER_MASK ;const int fetch_fault = access &PFERR_FETCH_MASK ;/* * Note! Track the error_code that's common to legacy shadow paging
@@ -484,7 +483,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,return 1 ; error: - errcode |= write_fault | user_fault; + errcode |= access & (PFERR_WRITE_MASK |PFERR_USER_MASK |PFERR_SS_MASK );if (fetch_fault &&has_pferr_fetch (mmu)) errcode |=PFERR_FETCH_MASK ;
arch/x86/kvm/svm/sev.c +1 -1
@@ -2431,7 +2431,7 @@ static int sev_gmem_post_populate(struct kvm *kvm, gfn_t gfn, kvm_pfn_t pfn,void *dst_vaddr =kmap_local_pfn (pfn);memcpy (src_vaddr, dst_vaddr,PAGE_SIZE ); -set_page_dirty (src_page); +set_page_dirty_lock (src_page);kunmap_local (dst_vaddr);kunmap_local (src_vaddr);
arch/x86/kvm/vmx/nested.c +3 -1
@@ -3774,8 +3774,10 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu, vmentry_fail_vmexit:vmx_switch_vmcs (vcpu, &vmx->vmcs01); -if (!from_vmentry) +if (!from_vmentry) { +nested_ept_uninit_mmu_context (vcpu);return NVMX_VMENTRY_VMEXIT ; + }nested_put_vmcs12_pages (vcpu);
block/bsg-lib.c +10 -3
@@ -23,11 +23,14 @@ struct bsg_set {struct bsg_device *bd;bsg_job_fn *job_fn;bsg_timeout_fn *timeout_fn; +unsigned int reply_len; };static int bsg_transport_sg_io_fn (struct request_queue *q,struct sg_io_v4 *hdr,bool open_for_write,unsigned int timeout) { +struct bsg_set *bset = + container_of(q->tag_set, struct bsg_set, tag_set);struct bsg_job *job;struct request *rq;struct bio *bio;
@@ -50,7 +53,7 @@ static int bsg_transport_sg_io_fn(struct request_queue *q, struct sg_io_v4 *hdr, reply = job->reply;memset (job,0 ,sizeof (*job)); job->reply = reply; - job->reply_len =SCSI_SENSE_BUFFERSIZE ; + job->reply_len = bset->reply_len; job->dd_data = job +1 ; job->request_len = hdr->request_len;
@@ -301,9 +304,10 @@ static blk_status_t bsg_queue_rq(struct blk_mq_hw_ctx *hctx,static int bsg_init_rq (struct blk_mq_tag_set *set,struct request *req,unsigned int hctx_idx,int numa_node) { + struct bsg_set *bset = container_of(set, struct bsg_set, tag_set);struct bsg_job *job =blk_mq_rq_to_pdu (req); - job->reply =kzalloc (SCSI_SENSE_BUFFERSIZE ,GFP_KERNEL ); + job->reply =kzalloc (bset->reply_len,GFP_KERNEL );if (!job->reply)return -ENOMEM ;return 0 ;
@@ -358,10 +362,12 @@ static const struct blk_mq_ops bsg_mq_ops = {* @job_fn: bsg job handler * @timeout: timeout handler function pointer * @dd_job_size: size of LLD data needed for each job +* @reply_len: size of the reply buffer needed for each job */ struct request_queue *bsg_setup_queue (struct device *dev,const char *name,struct queue_limits *lim,bsg_job_fn *job_fn, -bsg_timeout_fn *timeout,int dd_job_size) +bsg_timeout_fn *timeout,int dd_job_size, +unsigned int reply_len) {struct bsg_set *bset;struct blk_mq_tag_set *set;
@@ -374,6 +380,7 @@ struct request_queue *bsg_setup_queue(struct device *dev, const char *name, bset->job_fn = job_fn; bset->timeout_fn = timeout; + bset->reply_len = reply_len; set = &bset->tag_set; set->ops = &bsg_mq_ops;
drivers/accel/amdxdna/Kconfig +1 -0
@@ -6,6 +6,7 @@ config DRM_ACCEL_AMDXDNA depends on DRM_ACCEL depends on PCI && HAS_IOMEM depends on X86_64 + depends on AMD_PMF || !AMD_PMF select DRM_SCHED select DRM_GEM_SHMEM_HELPER select FW_LOADER
drivers/accel/rocket/rocket_device.c +2 -0
@@ -31,6 +31,8 @@ struct rocket_device *rocket_device_init(struct platform_device *pdev,if (of_device_is_available (core_node)) num_cores++; + rdev->max_cores = num_cores; + rdev->cores =devm_kcalloc (dev, num_cores,sizeof (*rdev->cores),GFP_KERNEL );if (!rdev->cores)return ERR_PTR (-ENOMEM );
drivers/accel/rocket/rocket_device.h +1 -0
@@ -19,6 +19,7 @@ struct rocket_device {struct rocket_core *cores;unsigned int num_cores; +unsigned int max_cores; }; struct rocket_device *rocket_device_init(struct platform_device *pdev,
drivers/accel/rocket/rocket_drv.c +5 -2
@@ -165,8 +165,11 @@ static int rocket_probe(struct platform_device *pdev)/* First core probing, initialize DRM device. */ rdev =rocket_device_init (drm_dev, &rocket_drm_driver);if (IS_ERR (rdev)) { +int err =PTR_ERR (rdev); +dev_err (&pdev->dev,"failed to initialize rocket device\n" ); -return PTR_ERR (rdev); + rdev =NULL ; +return err; } }
@@ -223,7 +226,7 @@ static int find_core_for_dev(struct device *dev) {struct rocket_device *rdev =dev_get_drvdata (dev); -for (unsigned int core =0 ; core < rdev->num_cores; core++) { +for (unsigned int core =0 ; core < rdev->max_cores; core++) {if (dev == rdev->cores[core].dev)return core; }
drivers/accel/rocket/rocket_job.c +1 -1
@@ -283,7 +283,7 @@ static struct rocket_core *sched_to_core(struct rocket_device *rdev, {unsigned int core; -for (core =0 ; core < rdev->num_cores; core++) { +for (core =0 ; core < rdev->max_cores; core++) {if (&rdev->cores[core].sched == sched)return &rdev->cores[core]; }
drivers/base/regmap/regcache-maple.c +7 -2
@@ -312,16 +312,21 @@ static int regcache_maple_exit(struct regmap *map)struct maple_tree *mt = map->cache;MA_STATE (mas, mt,0 ,UINT_MAX );unsigned int *entry; +unsigned long flags;/* if we've already been called then just return */ if (!mt)return 0 ; -mas_lock (&mas); +/* +* Register access may take the Maple lock from hard IRQ context, so +* preserve its IRQ-safe lockdep state during teardown. +*/ +mas_lock_irqsave (&mas, flags);mas_for_each (&mas, entry,UINT_MAX )kfree (entry);__mt_destroy (mt); -mas_unlock (&mas); +mas_unlock_irqrestore (&mas, flags);kfree (mt); map->cache =NULL ;
drivers/base/regmap/regcache.c +0 -6
@@ -225,9 +225,7 @@ int regcache_init(struct regmap *map, const struct regmap_config *config)if (map->cache_ops->init) {dev_dbg (map->dev,"Initializing %s cache\n" , map->cache_ops->name); - map->lock (map->lock_arg); ret = map->cache_ops->init (map); - map->unlock (map->lock_arg);if (ret) goto err_free_reg_defaults; }
@@ -259,9 +257,7 @@ int regcache_init(struct regmap *map, const struct regmap_config *config) err_exit:if (map->cache_ops->exit) {dev_dbg (map->dev,"Destroying %s cache\n" , map->cache_ops->name); - map->lock (map->lock_arg); map->cache_ops->exit (map); - map->unlock (map->lock_arg); } err_free_reg_defaults:kfree (map->reg_defaults);
@@ -281,9 +277,7 @@ void regcache_exit(struct regmap *map)if (map->cache_ops->exit) {dev_dbg (map->dev,"Destroying %s cache\n" , map->cache_ops->name); - map->lock (map->lock_arg); map->cache_ops->exit (map); - map->unlock (map->lock_arg); }kfree (map->reg_defaults);
drivers/firewire/core-transaction.c +6 -2
@@ -89,8 +89,12 @@ void fw_cancel_pending_transactions(struct fw_card *card)break ; \ } \ } \ -if (t &&try_cancel_split_timeout (t)) \ -remove_transaction_entry (card, t); \ +if (t) { \ +if (try_cancel_split_timeout (t)) \ +remove_transaction_entry (card, t); \ +else \ + t =NULL ; \ + } \ t; \ })
drivers/gpio/gpio-mxc.c +22 -14
@@ -7,6 +7,7 @@// Authors: Daniel Mack, Juergen Beisert. // Copyright (C) 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved. +#include <linux/bitops.h> #include <linux/cleanup.h> #include <linux/clk.h> #include <linux/err.h>
@@ -68,11 +69,11 @@ struct mxc_gpio_port {struct irq_domain *domain;struct gpio_generic_chip gen_gc;struct device *dev; -u32 both_edges; +unsigned long both_edges;struct mxc_gpio_reg_saved gpio_saved_reg;bool power_off; -u32 wakeup_pads;bool is_pad_wakeup; +unsigned long wakeup_pads;u32 pad_type[32 ];const struct mxc_gpio_hwdata *hwdata; };
@@ -168,7 +169,7 @@ static int gpio_set_irq_type(struct irq_data *d, u32 type)int edge;void __iomem *reg = port->base; - port->both_edges &= ~(1 << gpio_idx); +clear_bit (gpio_idx, &port->both_edges);switch (type) {case IRQ_TYPE_EDGE_RISING : edge =GPIO_INT_RISE_EDGE ;
@@ -188,7 +189,7 @@ static int gpio_set_irq_type(struct irq_data *d, u32 type) edge =GPIO_INT_HIGH_LEV ;pr_debug ("mxc: set GPIO %d to high trigger\n" , gpio_idx); } - port->both_edges |=1 << gpio_idx; +set_bit (gpio_idx, &port->both_edges); }break ;case IRQ_TYPE_LEVEL_LOW :
@@ -259,7 +260,7 @@ static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat)while (irq_stat !=0 ) {int irqoffset =fls (irq_stat) -1 ; -if (port->both_edges & (1 << irqoffset)) +if (test_bit (irqoffset, &port->both_edges))mxc_flip_edge (port, irqoffset);generic_handle_domain_irq (port->domain, irqoffset);
@@ -330,16 +331,18 @@ static int gpio_set_wake_irq(struct irq_data *d, u32 enable) ret =enable_irq_wake (port->irq_high); else ret =enable_irq_wake (port->irq); - port->wakeup_pads |=BIT (gpio_idx); }else {if (port->irq_high && (gpio_idx >=16 )) ret =disable_irq_wake (port->irq_high);else ret =disable_irq_wake (port->irq); - port->wakeup_pads &= ~BIT (gpio_idx); } +if (ret) +return ret; -return ret; +assign_bit (gpio_idx, &port->wakeup_pads, enable); + +return 0 ; }static int mxc_gpio_init_gc (struct mxc_gpio_port *port,int irq_base)
@@ -474,8 +477,6 @@ static int mxc_gpio_probe(struct platform_device *pdev) }else port->mx_irq_handler = mx3_gpio_irq_handler; -mxc_update_irq_chained_handler (port, true); - config.dev = &pdev->dev; config.sz =4 ; config.dat = port->base +GPIO_PSR ;
@@ -499,10 +500,6 @@ static int mxc_gpio_probe(struct platform_device *pdev)else /* silence boot time warning */ port->gen_gc.gc.base =-1 ; - err =devm_gpiochip_add_data (&pdev->dev, &port->gen_gc.gc, port); -if (err) - goto out_bgio; - irq_base =devm_irq_alloc_descs (&pdev->dev,-1 ,0 ,32 ,numa_node_id ());if (irq_base <0 ) { err = irq_base;
@@ -523,8 +520,19 @@ static int mxc_gpio_probe(struct platform_device *pdev)if (err <0 ) goto out_irqdomain_remove; +/* +* Register the GPIO chip last: devm_gpiochip_add_data() makes the +* chip visible to consumers immediately, so the IRQ domain and +* generic irq chip must be ready before any to_irq() call. +*/ + err =devm_gpiochip_add_data (&pdev->dev, &port->gen_gc.gc, port); +if (err) + goto out_irqdomain_remove; +list_add_tail (&port->node, &mxc_gpio_ports); +mxc_update_irq_chained_handler (port, true); +platform_set_drvdata (pdev, port);pm_runtime_put_autosuspend (&pdev->dev);
drivers/gpio/gpio-nct6694.c +1 -1
@@ -444,7 +444,7 @@ static int nct6694_gpio_probe(struct platform_device *pdev) data->gpio.set_config = nct6694_set_config; data->gpio.init_valid_mask = nct6694_init_valid_mask; data->gpio.base =-1 ; - data->gpio.can_sleep = false; + data->gpio.can_sleep = true; data->gpio.owner =THIS_MODULE ; data->gpio.ngpio =NCT6694_NR_GPIO ;
drivers/gpio/gpiolib-shared.c +14 -5
@@ -449,10 +449,14 @@ static bool gpio_shared_dev_is_reset_gpio(struct device *consumer,int gpio_shared_add_proxy_lookup (struct device *consumer,struct fwnode_handle *fwnode,const char *con_id,unsigned long lflags) { -const char *dev_id =dev_name (consumer); -struct gpiod_lookup_table *lookup;struct gpio_shared_entry *entry;struct gpio_shared_ref *ref; +const char *dev_id; + +if (!consumer) +return -EOPNOTSUPP ; + + dev_id =dev_name (consumer);list_for_each_entry (entry, &gpio_shared_list, list) {list_for_each_entry (ref, &entry->refs, list) {
@@ -480,18 +484,22 @@ int gpio_shared_add_proxy_lookup(struct device *consumer, struct fwnode_handle *if (!key)return -ENOMEM ; - lookup =kzalloc_flex (*lookup, table,2 ); + struct gpiod_lookup_table *lookup __free(kfree) = +kzalloc_flex (*lookup, table,2 );if (!lookup)return -ENOMEM ;pr_debug ("Adding machine lookup entry for a shared GPIO for consumer %s, with key '%s' and con_id '%s'\n" , dev_id, key, ref->con_id ?:"none" ); - lookup->dev_id = dev_id; + lookup->dev_id =kstrdup (dev_id,GFP_KERNEL ); +if (!lookup->dev_id) +return -ENOMEM ; + lookup->table[0 ] =GPIO_LOOKUP (no_free_ptr (key),0 , ref->con_id, lflags); - ref->lookup = lookup; + ref->lookup =no_free_ptr (lookup);gpiod_add_lookup_table (ref->lookup);return 0 ;
@@ -611,6 +619,7 @@ void gpio_device_teardown_shared(struct gpio_device *gdev)if (ref->lookup) {gpiod_remove_lookup_table (ref->lookup);kfree (ref->lookup->table[0 ].key); +kfree (ref->lookup->dev_id);kfree (ref->lookup); ref->lookup =NULL ; }
drivers/gpio/gpiolib.c +5 -4
@@ -3954,16 +3954,17 @@ int gpiod_set_array_value_complex(bool raw, bool can_sleep, }while ((i < array_size) &&gpio_device_chip_cmp (desc_array[i]->gdev, guard.gc));/* push collected bits to outputs */ -if (count !=0 ) { + ret =0 ; +if (count !=0 ) ret =gpiochip_set_multiple (guard.gc, mask, bits); -if (ret) -return ret; - }if (mask != fastpath_mask)bitmap_free (mask);if (bits != fastpath_bits)bitmap_free (bits); + +if (ret) +return ret; }return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +1 -2
@@ -42,7 +42,7 @@ static void amdgpu_bo_list_free_rcu(struct rcu_head *rcu) { struct amdgpu_bo_list *list = container_of(rcu, struct amdgpu_bo_list, rhead); -mutex_destroy (&list->bo_list_mutex); +kvfree (list); }
@@ -134,7 +134,6 @@ int amdgpu_bo_list_create(struct amdgpu_device *adev, struct drm_file *filp,trace_amdgpu_cs_bo_status (list->num_entries, total_size); -mutex_init (&list->bo_list_mutex); *result = list;return 0 ;
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h +0 -4
@@ -51,10 +51,6 @@ struct amdgpu_bo_list {unsigned first_userptr;unsigned num_entries; -/* Protect access during command submission. -*/ -struct mutex bo_list_mutex; - struct amdgpu_bo_list_entry entries[] __counted_by(num_entries); };
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +11 -11
@@ -898,8 +898,6 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,return r; } -mutex_lock (&p->bo_list->bo_list_mutex); -/* Get userptr backing pages. If pages are updated after registered * in amdgpu_gem_userptr_ioctl(), amdgpu_cs_list_validate() will do * amdgpu_ttm_backend_bind() to flush and invalidate new pages
@@ -1016,7 +1014,6 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,amdgpu_hmm_range_free (e->range); e->range =NULL ; } -mutex_unlock (&p->bo_list->bo_list_mutex);return r; }
@@ -1385,7 +1382,6 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,amdgpu_vm_move_to_lru_tail (p->adev, &fpriv->vm);mutex_unlock (&p->adev->notifier_lock); -mutex_unlock (&p->bo_list->bo_list_mutex);return 0 ; }
@@ -1438,6 +1434,7 @@ static void amdgpu_cs_parser_fini(struct amdgpu_cs_parser *parser)int amdgpu_cs_ioctl (struct drm_device *dev,void *data,struct drm_file *filp) {struct amdgpu_device *adev =drm_to_adev (dev); +struct amdgpu_bo_list_entry *e;struct amdgpu_cs_parser parser;int r;
@@ -1472,28 +1469,31 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) r =amdgpu_cs_patch_jobs (&parser);if (r) - goto error_backoff; + goto error_free_user_pages; r =amdgpu_cs_vm_handling (&parser);if (r) - goto error_backoff; + goto error_free_user_pages; r =amdgpu_cs_sync_rings (&parser);if (r) - goto error_backoff; + goto error_free_user_pages;trace_amdgpu_cs_ibs (&parser); r =amdgpu_cs_submit (&parser, data);if (r) - goto error_backoff; + goto error_free_user_pages;amdgpu_cs_parser_fini (&parser);return 0 ; -error_backoff: -mutex_unlock (&parser.bo_list->bo_list_mutex); - +error_free_user_pages: +/* amdgpu_cs_submit() only drops the ranges once it got that far. */ +amdgpu_bo_list_for_each_userptr_entry (e, parser.bo_list) { +amdgpu_hmm_range_free (e->range); + e->range =NULL ; + } error_fini:amdgpu_cs_parser_fini (&parser);return r;
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +3 -18
@@ -1265,7 +1265,6 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf, {struct amdgpu_device *adev = f->f_inode->i_private;int r; -ssize_t result =0 ;uint32_t offset, se, sh, cu, wave, simd, thread, bank, *data;if (size >4096 || size &3 || *pos &3 )
@@ -1309,25 +1308,11 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,mutex_unlock (&adev->grbm_idx_mutex);pm_runtime_put_autosuspend (adev_to_drm (adev)->dev); +amdgpu_virt_disable_access_debugfs (adev); -while (size) { -uint32_t value; - - value = data[result >>2 ]; - r =put_user (value, (uint32_t *)buf); -if (r) { -amdgpu_virt_disable_access_debugfs (adev); - goto err; - } - - result +=4 ; - buf +=4 ; - size -=4 ; - } - + r =copy_to_user (buf, data, size) ? -EFAULT : size;kfree (data); -amdgpu_virt_disable_access_debugfs (adev); -return result; +return r; err:pm_runtime_put_autosuspend (adev_to_drm (adev)->dev);
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +11 -6
@@ -337,11 +337,14 @@ static void amdgpu_gem_object_close(struct drm_gem_object *obj, goto out_unlock; } + bo_va =amdgpu_vm_bo_find (vm, bo); +/* the fence is attached once per bo_va, so keep it for other handles */ +if (bo_va && --bo_va->ref_count) + goto out_unlock; +if (!amdgpu_vm_is_bo_always_valid (vm, bo))amdgpu_evf_mgr_detach_fence (&fpriv->evf_mgr, bo); - - bo_va =amdgpu_vm_bo_find (vm, bo); -if (!bo_va || --bo_va->ref_count) +if (!bo_va) goto out_unlock;amdgpu_vm_bo_del (adev, bo_va);
@@ -567,8 +570,10 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,if (args->flags &AMDGPU_GEM_USERPTR_VALIDATE ) { range =amdgpu_hmm_range_alloc (NULL ); -if (unlikely (!range)) -return -ENOMEM ; +if (unlikely (!range)) { + r = -ENOMEM ; + goto release_object; + } r =amdgpu_ttm_tt_get_user_pages (bo, range);if (r) {amdgpu_hmm_range_free (range);
@@ -1236,7 +1241,7 @@ int amdgpu_gem_list_handles_ioctl(struct drm_device *dev, void *data, bo_entry->alloc_flags = bo->flags &AMDGPU_GEM_CREATE_SETTABLE_MASK ; bo_entry->preferred_domains = bo->preferred_domains; bo_entry->gem_handle = id; - bo_entry->alignment = bo->tbo.page_alignment; + bo_entry->alignment = (u64 )bo->tbo.page_alignment <<PAGE_SHIFT ;if (bo->tbo.base.import_attach) bo_entry->flags |=AMDGPU_GEM_LIST_HANDLES_FLAG_IS_IMPORT ;
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +5 -2
@@ -2043,14 +2043,15 @@ static int amdgpu_ttm_buffer_entity_init(struct amdgpu_gtt_mgr *mgr,int i, r, num_pages;const u64 GTT_MAX_PAGES = (AMDGPU_GTT_MAX_TRANSFER_SIZE >>PAGE_SHIFT ); +if (ARRAY_SIZE (entity->gart_window_offs) < num_gart_windows) +return -EINVAL ; + r =drm_sched_entity_init (&entity->base, prio, scheds, num_schedulers,NULL );if (r)return r;mutex_init (&entity->lock); -if (ARRAY_SIZE (entity->gart_window_offs) < num_gart_windows) -return -EINVAL ;if (num_gart_windows ==0 )return 0 ;
@@ -2058,6 +2059,7 @@ static int amdgpu_ttm_buffer_entity_init(struct amdgpu_gtt_mgr *mgr, r =amdgpu_gtt_mgr_alloc_entries (mgr, &entity->gart_node, num_pages,DRM_MM_INSERT_BEST );if (r) { +mutex_destroy (&entity->lock);drm_sched_entity_destroy (&entity->base);return r; }
@@ -2075,6 +2077,7 @@ static void amdgpu_ttm_buffer_entity_fini(struct amdgpu_gtt_mgr *mgr, struct amdgpu_ttm_buffer_entity *entity) {amdgpu_gtt_mgr_free_entries (mgr, &entity->gart_node); +mutex_destroy (&entity->lock);drm_sched_entity_destroy (&entity->base); }
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +8 -5
@@ -937,18 +937,21 @@ amdgpu_userq_bo_validate(struct amdgpu_device *adev, struct drm_exec *exec, {struct ttm_operation_ctx ctx = { false, false };struct amdgpu_bo_va *bo_va; -struct amdgpu_bo *bo; +struct amdgpu_bo *bo, *tmp;int ret;spin_lock (&vm->individual_lock); -while (!list_empty (&vm->always_valid.evicted)) { - bo_va =list_first_entry (&vm->always_valid.evicted, +while (!list_empty (&vm->individual.evicted)) { + bo_va =list_first_entry (&vm->individual.evicted, struct amdgpu_bo_va, base.vm_status); + bo = bo_va->base.bo; + tmp =amdgpu_bo_ref (bo);spin_unlock (&vm->individual_lock); - bo = bo_va->base.bo; - ret =drm_exec_prepare_obj (exec, &bo->tbo.base,2 ); + ret =drm_exec_prepare_obj (exec, &bo->tbo.base, +TTM_NUM_MOVE_FENCES +1 ); +amdgpu_bo_unref (&tmp);if (unlikely (ret))return ret;
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +21 -4
@@ -456,6 +456,9 @@ static void sdma_v3_0_ring_emit_hdp_flush(struct amdgpu_ring *ring)else ref_and_mask =REG_SET_FIELD (ref_and_mask,GPU_HDP_FLUSH_DONE ,SDMA1 ,1 ); +/* Hang workaround */ +amdgpu_ring_write (ring,SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP )); +amdgpu_ring_write (ring,SDMA_PKT_HEADER_OP (SDMA_OP_POLL_REGMEM ) |SDMA_PKT_POLL_REGMEM_HEADER_HDP_FLUSH (1 ) |SDMA_PKT_POLL_REGMEM_HEADER_FUNC (3 ));/* == */
@@ -483,6 +486,10 @@ static void sdma_v3_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 se unsigned flags) {bool write64bit = flags &AMDGPU_FENCE_FLAG_64BIT ; + +/* Hang workaround */ +amdgpu_ring_write (ring,SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP )); +/* write the fence */ amdgpu_ring_write (ring,SDMA_PKT_HEADER_OP (SDMA_OP_FENCE ));amdgpu_ring_write (ring,lower_32_bits (addr));
@@ -491,7 +498,11 @@ static void sdma_v3_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 se/* optionally write high bits as well */ if (write64bit) { +/* Hang workaround */ +amdgpu_ring_write (ring,SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP )); + addr +=4 ; +amdgpu_ring_write (ring,SDMA_PKT_HEADER_OP (SDMA_OP_FENCE ));amdgpu_ring_write (ring,lower_32_bits (addr));amdgpu_ring_write (ring,upper_32_bits (addr));
@@ -1032,6 +1043,9 @@ static void sdma_v3_0_ring_emit_pipeline_sync(struct amdgpu_ring *ring)uint32_t seq = ring->fence_drv.sync_seq;uint64_t addr = ring->fence_drv.gpu_addr; +/* Hang workaround */ +amdgpu_ring_write (ring,SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP )); +/* wait for idle */ amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_POLL_REGMEM) | SDMA_PKT_POLL_REGMEM_HEADER_HDP_FLUSH(0) |
@@ -1060,6 +1074,9 @@ static void sdma_v3_0_ring_emit_vm_flush(struct amdgpu_ring *ring, {amdgpu_gmc_emit_flush_gpu_tlb (ring, vmid, pd_addr); +/* Hang workaround */ +amdgpu_ring_write (ring,SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP )); +/* wait for flush */ amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_POLL_REGMEM) | SDMA_PKT_POLL_REGMEM_HEADER_HDP_FLUSH(0) |
@@ -1571,11 +1588,11 @@ static const struct amdgpu_ring_funcs sdma_v3_0_ring_funcs = { .get_wptr = sdma_v3_0_ring_get_wptr, .set_wptr = sdma_v3_0_ring_set_wptr, .emit_frame_size = -6 +/* sdma_v3_0_ring_emit_hdp_flush */ +6 +1 +/* sdma_v3_0_ring_emit_hdp_flush */ 3 +/* hdp invalidate */ -6 +/* sdma_v3_0_ring_emit_pipeline_sync */ -VI_FLUSH_GPU_TLB_NUM_WREG *3 +6 +/* sdma_v3_0_ring_emit_vm_flush */ - 10 + 10 + 10, /* sdma_v3_0_ring_emit_fence x3 for user fence, vm fence */ +6 +1 +/* sdma_v3_0_ring_emit_pipeline_sync */ +VI_FLUSH_GPU_TLB_NUM_WREG *3 +6 +1 +/* sdma_v3_0_ring_emit_vm_flush */ + (10 + 1) * 3, /* sdma_v3_0_ring_emit_fence x3 for user fence, vm fence */ .emit_ib_size = 7 + 6, /* sdma_v3_0_ring_emit_ib */ .emit_ib = sdma_v3_0_ring_emit_ib, .emit_fence = sdma_v3_0_ring_emit_fence,
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c +1 -1
@@ -288,7 +288,7 @@ static int uvd_v3_1_fw_validate(struct amdgpu_device *adev)int i;uint32_t keysel = adev->uvd.keyselect; -if (RREG32 (mmUVD_FW_START) &UVD_FW_STATUS__PASS_MASK ) { +if (RREG32 (mmUVD_FW_START)) {dev_dbg (adev->dev,"UVD keyselect already set: 0x%x (on CPU: 0x%x)\n" ,RREG32 (mmUVD_FW_START), adev->uvd.keyselect);return 0 ;
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +1 -1
@@ -960,7 +960,7 @@ static const struct amdgpu_ring_funcs vce_v3_0_ring_phys_funcs = {static const struct amdgpu_ring_funcs vce_v3_0_ring_vm_funcs = { .type =AMDGPU_RING_TYPE_VCE , - .align_mask =0xf , + .align_mask =0x1f , .nop =VCE_CMD_NO_OP , .support_64bit_ptrs = false, .no_user_fence = true,
drivers/gpu/drm/amd/display/dc/link/link_dpms.c +14 -4
@@ -2298,9 +2298,14 @@ static bool allocate_usb4_bandwidth_for_stream(struct dc_stream_state *stream, i {ASSERT (stream->sink); -struct dc_link *link = stream->sink->link; +struct dc_link *link;int req_bw = stream_bw; +if (!stream->sink) +return false; + + link = stream->sink->link; +DC_LOGGER_INIT (link->ctx->logger);if (!link->dpia_bw_alloc_config.bw_alloc_enabled)
@@ -2347,9 +2352,13 @@ static bool allocate_usb4_bandwidth(struct dc_stream_state *stream)ASSERT (stream->sink);bool ret; +int bw; -int bw =dc_bandwidth_in_kbps_from_timing (&stream->timing, -dc_link_get_highest_encoding_format (stream->sink->link)); +if (!stream->sink) +return false; + + bw =dc_bandwidth_in_kbps_from_timing (&stream->timing, +dc_link_get_highest_encoding_format (stream->sink->link)); ret =allocate_usb4_bandwidth_for_stream (stream, bw);
@@ -2410,7 +2419,8 @@ void link_set_dpms_off(struct pipe_ctx *pipe_ctx)update_psp_stream_config (pipe_ctx, true); dc->hwss.blank_stream (pipe_ctx); -if (pipe_ctx->link_config.dp_tunnel_settings.should_use_dp_bw_allocation) +if (pipe_ctx->link_config.dp_tunnel_settings.should_use_dp_bw_allocation && + stream->sink)deallocate_usb4_bandwidth (stream);if (stream->signal ==SIGNAL_TYPE_DISPLAY_PORT_MST )
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c +54 -1
97 lines not on this page · raw message
drivers/gpu/drm/drm_exec.c +43 -30
114 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_cx0_phy.c +7 -5
@@ -2341,12 +2341,14 @@ static void intel_c10pll_dump_hw_state(struct drm_printer *p,static bool is_arrowlake_s_by_host_bridge (void ) {struct pci_dev *pdev =NULL ; -u16 host_bridge_pci_dev_id; - -while ((pdev =pci_get_class (PCI_CLASS_BRIDGE_HOST <<8 , pdev))) - host_bridge_pci_dev_id = pdev->device; +while ((pdev =pci_get_class (PCI_CLASS_BRIDGE_HOST <<8 , pdev))) { +if (IS_ARROWLAKE_S_BY_HOST_BRIDGE_ID (pdev->device)) { +pci_dev_put (pdev); +return true; + } + } -return pdev &&IS_ARROWLAKE_S_BY_HOST_BRIDGE_ID (host_bridge_pci_dev_id); +return false; }static u16 intel_c20_hdmi_tmds_tx_cgf_1 (struct intel_display *display)
drivers/gpu/drm/i915/display/intel_dmc.c +71 -5
109 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_dmc_regs.h +12 -0
@@ -521,6 +521,18 @@ enum pipedmc_event_id {#define TGL_PIPE_MMIO_END (dmc_id) _PICK_EVEN(((dmc_id) - 1), _TGL_PIPEA_MMIO_END,\ _TGL_PIPEB_MMIO_END) +/* For DMC header version v3*/ +#define DMC_MAIN_PROGRAM_BASE_START 0x80000 +#define DMC_MAIN_PROGRAM_BASE_END 0x86fff +#define DMC_PIPEA_PROGRAM_BASE_START 0x90000 +#define DMC_PIPEA_PROGRAM_BASE_END 0x96fff +#define DMC_PIPEB_PROGRAM_BASE_START 0x98000 +#define DMC_PIPEB_PROGRAM_BASE_END 0x9efff +#define DMC_PIPEC_PROGRAM_BASE_START 0x52000 +#define DMC_PIPEC_PROGRAM_BASE_END 0x53fff +#define DMC_PIPED_PROGRAM_BASE_START 0x59000 +#define DMC_PIPED_PROGRAM_BASE_END 0x5afff +#define SKL_DMC_DC3_DC5_COUNT _MMIO(0x80030)#define SKL_DMC_DC5_DC6_COUNT _MMIO(0x8002C)#define BXT_DMC_DC3_DC5_COUNT _MMIO(0x80038)
drivers/gpu/drm/panthor/panthor_hw.c +1 -1
@@ -136,7 +136,7 @@ static char *get_gpu_model_name(struct panthor_device *ptdev)case GPU_PROD_ID_MAKE (10 ,7 ):return "Mali-G610" ;case GPU_PROD_ID_MAKE (11 ,2 ): -if (shader_core_count >10 && ray_intersection) +if (shader_core_count >=10 && ray_intersection)return "Mali-G715-Immortalis" ;else if (shader_core_count >=7 )return "Mali-G715" ;
drivers/gpu/drm/vc4/vc4_hdmi.c +11 -9
@@ -894,7 +894,7 @@ static void vc4_hdmi_encoder_post_crtc_disable(struct drm_encoder *encoder,spin_lock_irqsave (&vc4_hdmi->hw_lock, flags); -HDMI_WRITE (HDMI_RAM_PACKET_CONFIG ,0 ); +HDMI_WRITE (HDMI_RAM_PACKET_CONFIG ,VC4_HDMI_RAM_PACKET_ENABLE );HDMI_WRITE (HDMI_VID_CTL ,HDMI_READ (HDMI_VID_CTL ) |VC4_HD_VID_CTL_CLRRGB );
@@ -1663,9 +1663,6 @@ static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder,WARN_ONCE (ret,"Timeout waiting for " "VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE\n" ); }else { -HDMI_WRITE (HDMI_RAM_PACKET_CONFIG , -HDMI_READ (HDMI_RAM_PACKET_CONFIG ) & - ~(VC4_HDMI_RAM_PACKET_ENABLE ));HDMI_WRITE (HDMI_SCHEDULER_CONTROL ,HDMI_READ (HDMI_SCHEDULER_CONTROL ) & ~VC4_HDMI_SCHEDULER_CONTROL_MODE_HDMI );
@@ -1684,9 +1681,6 @@ static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder,WARN_ON (!(HDMI_READ (HDMI_SCHEDULER_CONTROL ) &VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE )); -HDMI_WRITE (HDMI_RAM_PACKET_CONFIG , -VC4_HDMI_RAM_PACKET_ENABLE ); -spin_unlock_irqrestore (&vc4_hdmi->hw_lock, flags); vc4_hdmi->packet_ram_enabled = true;
@@ -3143,6 +3137,11 @@ static int vc5_hdmi_init_resources(struct drm_device *drm,static int vc4_hdmi_runtime_suspend (struct device *dev) {struct vc4_hdmi *vc4_hdmi =dev_get_drvdata (dev); +unsigned long flags; + +spin_lock_irqsave (&vc4_hdmi->hw_lock, flags); +HDMI_WRITE (HDMI_RAM_PACKET_CONFIG ,0 ); +spin_unlock_irqrestore (&vc4_hdmi->hw_lock, flags);clk_disable_unprepare (vc4_hdmi->audio_clock);clk_disable_unprepare (vc4_hdmi->hsm_clock);
@@ -3153,9 +3152,8 @@ static int vc4_hdmi_runtime_suspend(struct device *dev)static int vc4_hdmi_runtime_resume (struct device *dev) {struct vc4_hdmi *vc4_hdmi =dev_get_drvdata (dev); -unsigned long __maybe_unused flags; +unsigned long rate, flags;u32 __maybe_unused value; -unsigned long rate;int ret; ret =clk_prepare_enable (vc4_hdmi->hsm_clock);
@@ -3201,6 +3199,10 @@ static int vc4_hdmi_runtime_resume(struct device *dev) }#endif +spin_lock_irqsave (&vc4_hdmi->hw_lock, flags); +HDMI_WRITE (HDMI_RAM_PACKET_CONFIG ,VC4_HDMI_RAM_PACKET_ENABLE ); +spin_unlock_irqrestore (&vc4_hdmi->hw_lock, flags); +return 0 ; err_disable_clk:
drivers/gpu/drm/xe/xe_bo.c +10 -1
@@ -330,6 +330,12 @@ static void xe_evict_flags(struct ttm_buffer_object *tbo,return ; } +/* No resource: nothing is placed/mapped, so there is nothing to evict. */ +if (!tbo->resource) { + placement->num_placement =0 ; +return ; + } + bo =ttm_to_xe_bo (tbo);if (bo->flags &XE_BO_FLAG_CPU_ADDR_MIRROR ) { *placement = sys_placement;
@@ -932,6 +938,8 @@ static int xe_bo_move_notify(struct xe_bo *bo,* * Transfers pages between shrinkable and purgeable buckets when the BO * purgeable state changes. Called automatically from xe_bo_set_purgeable_state(). +* For pinned BOs, whose pages are not accounted, only the purgeable flag is +* updated, so that the correct bucket is used when the BO is unpinned. */ static void xe_bo_set_purgeable_shrinker (struct xe_bo *bo,enum xe_madv_purgeable_state new_state)
@@ -948,7 +956,8 @@ static void xe_bo_set_purgeable_shrinker(struct xe_bo *bo,return ; xe_tt = container_of(tt, struct xe_ttm_tt, ttm); - tt_pages = tt->num_pages; +/* Pinned bos are not accounted. Only update the purgeable flag. */ + tt_pages =xe_bo_is_pinned (bo) ?0 : tt->num_pages;if (!xe_tt->purgeable && new_state ==XE_MADV_PURGEABLE_DONTNEED ) { xe_tt->purgeable = true;
drivers/gpu/drm/xe/xe_exec.c +2 -5
@@ -346,11 +346,8 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file)xe_sched_job_push (job);xe_vm_reactivate_rebind (vm); -if (!err && !xe_vm_in_lr_mode (vm)) { -spin_lock (&xe->ttm.lru_lock); -ttm_lru_bulk_move_tail (&vm->lru_bulk_move); -spin_unlock (&xe->ttm.lru_lock); - } +if (!err && !xe_vm_in_lr_mode (vm)) +xe_vm_bump_lru (vm, exec);if (mode ==EXEC_MODE_LR )xe_hw_engine_group_resume_faulting_lr_jobs (group);
drivers/gpu/drm/xe/xe_oa.c +7 -0
@@ -914,6 +914,13 @@ static int xe_oa_alloc_oa_buffer(struct xe_oa_stream *stream, size_t size)if (IS_ERR (bo))return PTR_ERR (bo); +/* +* ttm_bo_type_kernel BOs are not zeroed on allocation, so the buffer can +* hold stale data from previously freed pages. Since the OA buffer is +* mmap'able by userspace, clear it here to avoid leaking kernel memory. +*/ +xe_map_memset (stream->oa->xe, &bo->vmap,0 ,0 ,xe_bo_size (bo)); + stream->oa_buffer.bo = bo; stream->oa_buffer.bounce =kmalloc (stream->oa_buffer.format->size,GFP_KERNEL );
drivers/gpu/drm/xe/xe_vm.c +28 -3
@@ -394,6 +394,33 @@ int xe_vm_validate_rebind(struct xe_vm *vm, struct drm_exec *exec,return 0 ; } +/** +* xe_vm_bump_lru() - Bump the LRU position of BOs used by a submission +* @vm: The vm for which we are bumping LRUs. +* @exec: The struct drm_exec with the locked GEM objects. +* +* Move the VM's private BOs, and all external objects locked by @exec, +* to the LRU tail. Private BOs are moved in bulk using @vm's +* &xe_vm.lru_bulk_move. External objects, which may be shared with other +* VMs, are not part of that bulk move and are bumped individually. +*/ +void xe_vm_bump_lru (struct xe_vm *vm,struct drm_exec *exec) +{ +spinlock_t *lru_lock = &vm->xe->ttm.lru_lock; +struct drm_gem_object *obj; + +spin_lock (lru_lock); +ttm_lru_bulk_move_tail (&vm->lru_bulk_move); +drm_exec_for_each_locked_object (exec, obj) { +if (!drm_gpuvm_is_extobj (&vm->gpuvm, obj)) +continue ; + +ttm_bo_move_to_lru_tail (&gem_to_xe_bo (obj)->ttm); +cond_resched_lock (lru_lock); + } +spin_unlock (lru_lock); +} +static int xe_preempt_work_begin (struct drm_exec *exec,struct xe_vm *vm,bool *done) {
@@ -544,9 +571,7 @@ static void preempt_rebind_work_func(struct work_struct *w)#undef retry_required -spin_lock (&vm->xe->ttm.lru_lock); -ttm_lru_bulk_move_tail (&vm->lru_bulk_move); -spin_unlock (&vm->xe->ttm.lru_lock); +xe_vm_bump_lru (vm, &exec);/* Point of no return. */ arm_preempt_fences (vm, &preempt_fences);
drivers/gpu/drm/xe/xe_vm.h +2 -0
@@ -284,6 +284,8 @@ int xe_vm_lock_vma(struct drm_exec *exec, struct xe_vma *vma);int xe_vm_validate_rebind (struct xe_vm *vm,struct drm_exec *exec,unsigned int num_fences); +void xe_vm_bump_lru (struct xe_vm *vm,struct drm_exec *exec); +struct dma_fence *xe_vm_bind_kernel_bo (struct xe_vm *vm,struct xe_bo *bo,struct xe_exec_queue *q,u64 addr,enum xe_cache_level cache_lvl);
drivers/hv/channel_mgmt.c +9 -3
@@ -752,13 +752,14 @@ static void init_vp_index(struct vmbus_channel *channel)u32 i, ncpu =num_online_cpus ();cpumask_var_t available_mask;struct cpumask *allocated_mask; +const struct cpumask *node_mask;const struct cpumask *hk_mask =housekeeping_cpumask (HK_TYPE_MANAGED_IRQ );u32 target_cpu;int numa_node;if (!perf_chn || !alloc_cpumask_var (&available_mask,GFP_KERNEL ) || -cpumask_empty (hk_mask)) { + !cpumask_intersects (hk_mask, cpu_online_mask)) {/* * If the channel is not a performance critical * channel, bind it to VMBUS_CONNECT_CPU.
@@ -780,14 +781,19 @@ static void init_vp_index(struct vmbus_channel *channel) next_numa_node_id =0 ;continue ; } -if (cpumask_empty (cpumask_of_node (numa_node))) +/* +* Try next NUMA node if current NUMA node has no CPU +* or doesn't contain any housekeeping CPU. +*/ + node_mask =cpumask_of_node (numa_node); +if (!cpumask_intersects (node_mask, hk_mask))continue ;break ; } allocated_mask = &hv_context.hv_numa_map[numa_node]; retry: -cpumask_xor (available_mask, allocated_mask,cpumask_of_node (numa_node)); +cpumask_xor (available_mask, allocated_mask, node_mask);cpumask_and (available_mask, available_mask, hk_mask);if (cpumask_empty (available_mask)) {
drivers/hv/connection.c +0 -1
@@ -343,7 +343,6 @@ int vmbus_connect(void) cleanup:pr_err ("Unable to connect to host\n" ); - vmbus_connection.conn_state =DISCONNECTED ;vmbus_disconnect ();kfree (msginfo);
drivers/hv/mshv_vtl_main.c +3 -0
@@ -819,6 +819,9 @@ static vm_fault_t mshv_vtl_fault(struct vm_fault *vmf)return VM_FAULT_NOPAGE ; } +if (!page) +return VM_FAULT_SIGBUS ; +get_page (page); vmf->page = page;
drivers/hv/vmbus_drv.c +0 -1
@@ -3049,7 +3049,6 @@ static void __exit vmbus_exit(void)hv_remove_kexec_handler ();hv_remove_crash_handler (); - vmbus_connection.conn_state =DISCONNECTED ;hv_stimer_global_cleanup ();vmbus_disconnect ();if (vmbus_irq ==-1 )
drivers/i2c/busses/i2c-qcom-cci.c +2 -2
@@ -164,12 +164,12 @@ static irqreturn_t cci_isr(int irq, void *dev) }if (unlikely (val &CCI_IRQ_STATUS_0_I2C_M0_Q0Q1_HALT_ACK )) { - reset =CCI_RESET_CMD_M0_MASK ; + reset |=CCI_RESET_CMD_M0_MASK ; ret =IRQ_HANDLED ; }if (unlikely (val &CCI_IRQ_STATUS_0_I2C_M1_Q0Q1_HALT_ACK )) { - reset =CCI_RESET_CMD_M1_MASK ; + reset |=CCI_RESET_CMD_M1_MASK ; ret =IRQ_HANDLED ; }
drivers/i2c/busses/i2c-qcom-geni.c +20 -17
@@ -188,28 +188,31 @@ static const struct geni_i2c_clk_fld geni_i2c_clk_map_32mhz[] = {static int geni_i2c_clk_map_idx (struct geni_i2c_dev *gi2c) {const struct geni_i2c_clk_fld *itr; -unsigned long res_freq; +unsigned long req_freq, res_freq; +int ret;/* -* Frequency counter tables are calibrated for a specific source -* clock frequency and are not valid for any multiple of it -* (e.g. 64 MHz, 128 MHz). -* Use exact=true and verify res_freq matches req_freq literally -* to reject harmonics: a 64 MHz clock that divides evenly to -* 32 MHz would pass exact matching but produce double the intended -* I2C frequency with these counter values. +* Use 32 MHz only if already selected, otherwise use 19.2 MHz. +* Preferring 32 MHz merely because DFS supports it breaks I2C +* transfers on X1E80100 CRD. */ -if (!geni_se_clk_freq_match (&gi2c->se,GENI_SE_CLK_32MHZ , - &gi2c->clk_idx, &res_freq, true) && - res_freq ==GENI_SE_CLK_32MHZ ) { +if (clk_get_rate (gi2c->se.clk) ==GENI_SE_CLK_32MHZ ) { + req_freq =GENI_SE_CLK_32MHZ ; itr = geni_i2c_clk_map_32mhz; - }else if (!geni_se_clk_freq_match (&gi2c->se,GENI_SE_CLK_19P2MHZ , - &gi2c->clk_idx, &res_freq, true) && - res_freq ==GENI_SE_CLK_19P2MHZ ) { - itr = geni_i2c_clk_map_19p2mhz; }else { -dev_err (gi2c->se.dev, -"Unsupported SE source clock: must be exactly 32 MHz or 19.2 MHz\n" ); + req_freq =GENI_SE_CLK_19P2MHZ ; + itr = geni_i2c_clk_map_19p2mhz; + } + + ret =geni_se_clk_freq_match (&gi2c->se, req_freq, &gi2c->clk_idx, + &res_freq, true); +if (ret) +return dev_err_probe (gi2c->se.dev, ret, +"Failed to find SE source clock %lu Hz\n" , + req_freq); +if (res_freq != req_freq) { +dev_err (gi2c->se.dev,"Unsupported SE source clock %lu Hz\n" , + res_freq);return -EINVAL ; }
drivers/i2c/busses/i2c-viai2c-wmt.c +1 -1
@@ -117,7 +117,7 @@ static int wmt_i2c_probe(struct platform_device *pdev)return dev_err_probe (&pdev->dev, err,"failed to request irq %i\n" , i2c->irq); - i2c->clk =of_clk_get (np,0 ); + i2c->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (i2c->clk))return dev_err_probe (&pdev->dev,PTR_ERR (i2c->clk),"unable to request clock\n" );
drivers/i2c/busses/i2c-xiic.c +40 -9
104 lines not on this page · raw message
drivers/iommu/generic_pt/fmt/Makefile +1 -1
@@ -25,6 +25,6 @@ $(eval $(foreach fmt,$(iommu_pt_fmt-m),$(call create_format,$(fmt),m))) # with -DGENERIC_PT_KUNIT $(obj)/kunit_iommu_%.o: $(src)/iommu_%.c FORCE $(call rule_mkdir) - $(call if_changed_dep,cc_o_c) + $(call if_changed_rule,cc_o_c) obj-$(CONFIG_IOMMU_PT_KUNIT_TEST) += $(IOMMU_PT_KUNIT_TEST)
drivers/md/dm-cache-target.c +31 -28
129 lines not on this page · raw message
drivers/md/dm-crypt.c +1 -2
@@ -1745,7 +1745,6 @@ static void crypt_dec_pending(struct dm_crypt_io *io) {struct crypt_config *cc = io->cc;struct bio *base_bio = io->base_bio; -blk_status_t error = io->error;if (!atomic_dec_and_test (&io->io_pending))return ;
@@ -1767,7 +1766,7 @@ static void crypt_dec_pending(struct dm_crypt_io *io)else kfree (io->integrity_metadata); - base_bio->bi_status = error; + base_bio->bi_status = io->error;bio_endio (base_bio); }
drivers/md/dm-ebs-target.c +1 -2
@@ -265,8 +265,7 @@ static int ebs_ctr(struct dm_target *ti, unsigned int argc, char **argv) r = -EINVAL ;if (sscanf (argv[1 ],"%llu%c" , &tmp, &dummy) !=1 || - tmp != (sector_t )tmp || - (sector_t )tmp >= ti->len) { + tmp != (sector_t )tmp) { ti->error ="Invalid device offset sector" ; goto bad; }
drivers/md/dm-integrity.c +5 -1
@@ -1980,7 +1980,7 @@ static void integrity_metadata(struct work_struct *w)if (unlikely (dio->op ==REQ_OP_DISCARD )) {unsigned int bi_size = dio->bio_details.bi_iter.bi_size; -unsigned int max_size =likely (checksums != checksums_onstack) ?PAGE_SIZE :HASH_MAX_DIGESTSIZE ; +unsigned int max_size =likely (checksums != checksums_onstack) ?PAGE_SIZE :sizeof (checksums_onstack);unsigned int max_blocks = (max_size - extra_space) / ic->tag_size;sector_t sector = dio->range.logical_sector;
@@ -4176,6 +4176,10 @@ static void dm_integrity_io_hints(struct dm_target *ti, struct queue_limits *lim limits->dma_alignment = limits->logical_block_size -1 ; limits->discard_granularity = ic->sectors_per_block <<SECTOR_SHIFT ; +if (ic->internal_hash && + (ic->mode =='D' || ic->mode =='B' || ic->mode =='I' )) + limits->features |=BLK_FEAT_STABLE_WRITES ; +if (!ic->internal_hash) {struct blk_integrity *bi = &limits->integrity;
drivers/net/ethernet/actions/owl-emac.c +2 -1
@@ -1552,6 +1552,8 @@ static int owl_emac_probe(struct platform_device *pdev)return ret; } + netdev->netdev_ops = &owl_emac_netdev_ops; + ret =owl_emac_phy_init (netdev);if (ret) {dev_err (dev,"failed to initialize PHY\n" );
@@ -1563,7 +1565,6 @@ static int owl_emac_probe(struct platform_device *pdev) netdev->min_mtu =OWL_EMAC_MTU_MIN ; netdev->max_mtu =OWL_EMAC_MTU_MAX ; netdev->watchdog_timeo =OWL_EMAC_TX_TIMEOUT ; - netdev->netdev_ops = &owl_emac_netdev_ops; netdev->ethtool_ops = &owl_emac_ethtool_ops;netif_napi_add (netdev, &priv->napi, owl_emac_poll);
drivers/net/ethernet/aeroflex/greth.c +2 -1
@@ -1421,6 +1421,8 @@ static int greth_of_probe(struct platform_device *ofdev)/* Check if MAC can handle MDIO interrupts */ greth->mdio_int_en = (tmp >>26 ) &1 ; + dev->netdev_ops = &greth_netdev_ops; + err =greth_mdio_init (greth);if (err) {if (netif_msg_probe (greth))
@@ -1498,7 +1500,6 @@ static int greth_of_probe(struct platform_device *ofdev) dev->flags &= ~IFF_MULTICAST ; } - dev->netdev_ops = &greth_netdev_ops; dev->ethtool_ops = &greth_ethtool_ops; err =register_netdev (dev);
drivers/net/ethernet/amd/au1000_eth.c +2 -1
@@ -1225,6 +1225,8 @@ static int au1000_probe(struct platform_device *pdev) goto err_mdiobus_reg; } + dev->netdev_ops = &au1000_netdev_ops; + err =au1000_mii_probe (dev);if (err !=0 ) goto err_out;
@@ -1263,7 +1265,6 @@ static int au1000_probe(struct platform_device *pdev) dev->base_addr = base->start; dev->irq = irq; - dev->netdev_ops = &au1000_netdev_ops; dev->ethtool_ops = &au1000_ethtool_ops; dev->watchdog_timeo =ETH_TX_TIMEOUT ;
drivers/net/ethernet/broadcom/genet/bcmgenet.c +10 -0
@@ -2153,6 +2153,16 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev) goto out; } +/* We store Tx state in the control block, so the skb must not be +* shared, but ether_setup() leaves IFF_TX_SKB_SHARING set. +*/ + skb =skb_share_check (skb,GFP_ATOMIC ); +if (!skb) { +BCMGENET_STATS64_INC ((&ring->stats64), dropped); + ret =NETDEV_TX_OK ; + goto out; + } +/* Retain how many bytes will be sent on the wire, without TSB inserted * by transmit checksum offload */
drivers/net/ethernet/ethoc.c +2 -1
@@ -1211,6 +1211,8 @@ static int ethoc_probe(struct platform_device *pdev) goto free3; } + netdev->netdev_ops = ðoc_netdev_ops; + ret =ethoc_mdio_probe (netdev);if (ret) {dev_err (&netdev->dev,"failed to probe MDIO bus\n" );
@@ -1218,7 +1220,6 @@ static int ethoc_probe(struct platform_device *pdev) }/* setup the net_device structure */ - netdev->netdev_ops = ðoc_netdev_ops; netdev->watchdog_timeo =ETHOC_TIMEOUT ; netdev->features |=0 ; netdev->ethtool_ops = ðoc_ethtool_ops;
drivers/net/ethernet/hisilicon/hip04_eth.c +2 -1
@@ -976,6 +976,8 @@ static int hip04_mac_probe(struct platform_device *pdev) goto init_fail; } + ndev->netdev_ops = &hip04_netdev_ops; + priv->phy_node =of_parse_phandle (node,"phy-handle" ,0 );if (priv->phy_node) { priv->phy = of_phy_connect(ndev, priv->phy_node,
@@ -989,7 +991,6 @@ static int hip04_mac_probe(struct platform_device *pdev)INIT_WORK (&priv->tx_timeout_task, hip04_tx_timeout_task); - ndev->netdev_ops = &hip04_netdev_ops; ndev->ethtool_ops = &hip04_ethtool_ops; ndev->watchdog_timeo =TX_TIMEOUT ; ndev->priv_flags |=IFF_UNICAST_FLT ;
drivers/net/ethernet/hisilicon/hisi_femac.c +2 -1
@@ -830,6 +830,8 @@ static int hisi_femac_drv_probe(struct platform_device *pdev)hisi_femac_phy_reset (priv); } + ndev->netdev_ops = &hisi_femac_netdev_ops; + phy =of_phy_get_and_connect (ndev, node, hisi_femac_adjust_link);if (!phy) {dev_err (dev,"connect to PHY failed!\n" );
@@ -850,7 +852,6 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) ndev->watchdog_timeo =6 *HZ ; ndev->priv_flags |=IFF_UNICAST_FLT ; - ndev->netdev_ops = &hisi_femac_netdev_ops; ndev->ethtool_ops = &hisi_femac_ethtools_ops;netif_napi_add_weight (ndev, &priv->napi, hisi_femac_poll,FEMAC_POLL_WEIGHT );
drivers/net/ethernet/marvell/mv643xx_eth.c +2 -2
@@ -3171,6 +3171,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev)netif_set_real_num_tx_queues (dev, mp->txq_count);netif_set_real_num_rx_queues (dev, mp->rxq_count); + dev->netdev_ops = &mv643xx_eth_netdev_ops; + err =0 ;if (pd->phy_node) { phydev = of_phy_connect(mp->dev, pd->phy_node,
@@ -3221,8 +3223,6 @@ static int mv643xx_eth_probe(struct platform_device *pdev) } dev->irq = irq; - dev->netdev_ops = &mv643xx_eth_netdev_ops; - dev->watchdog_timeo =2 *HZ ; dev->base_addr =0 ;
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c +3 -2
@@ -928,6 +928,7 @@ static int mlx5_fs_fte_get_hws_actions(struct mlx5_flow_root_namespace *ns, goto free_actions; } (*ractions)[num_actions].aso_meter.offset = + (fte_action->exe_aso.object_id - fte_action->exe_aso.base_id) *2 + fte_action->exe_aso.flow_meter.meter_idx; (*ractions)[num_actions].aso_meter.init_color = fte_action->exe_aso.flow_meter.init_color;
@@ -1398,8 +1399,8 @@ static void mlx5_cmd_hws_packet_reformat_dealloc(struct mlx5_flow_root_namespace pr_data->data_size);break ;case MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL : - pr_pool =mlx5_fs_get_pr_encap_pool (dev, &hws_pool->el2tol2tnl_pools, -MLX5HWS_ACTION_TYP_REFORMAT_L2_TO_TNL_L2 , + pr_pool =mlx5_fs_get_pr_encap_pool (dev, &hws_pool->el2tol3tnl_pools, +MLX5HWS_ACTION_TYP_REFORMAT_L2_TO_TNL_L3 , pr_data->data_size);break ;case MLX5_REFORMAT_TYPE_L3_TUNNEL_TO_L2 :
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +6 -0
@@ -312,6 +312,12 @@ static int dwmac1000_irq_status(struct stmmac_priv *priv,if (intr_status & (PCS_ANE_IRQ |PCS_LINK_IRQ ))stmmac_integrated_pcs_irq (priv, intr_status, x); +/* Reading RGSMIIIS clears the interrupt the MAC reset unmasks. */ +if (intr_status &PCS_RGSMIIIS_IRQ ) { +readl (ioaddr +GMAC_RGSMIIIS ); + x->irq_rgmii_n++; + } +return ret; }
drivers/net/ethernet/ti/icssm/icssm_prueth.c +2 -1
@@ -1563,6 +1563,8 @@ static int icssm_prueth_netdev_init(struct prueth *prueth, }ether_addr_copy (emac->mac_addr, ndev->dev_addr); + ndev->netdev_ops = &emac_netdev_ops; +/* connect PHY */ emac->phydev =of_phy_get_and_connect (ndev, eth_node, icssm_emac_adjust_link);
@@ -1590,7 +1592,6 @@ static int icssm_prueth_netdev_init(struct prueth *prueth, } ndev->dev.of_node = eth_node; - ndev->netdev_ops = &emac_netdev_ops;netif_napi_add (ndev, &emac->napi, icssm_emac_napi_poll);
drivers/net/ntb_netdev.c +34 -13
111 lines not on this page · raw message
drivers/net/wireless/intersil/p54/fwio.c +37 -5
59 lines not on this page · raw message
drivers/pci/pci.c +11 -4
@@ -1213,9 +1213,11 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)* initialize. * * If the device is below a Root Port with Configuration RRS -* Software Visibility enabled, reading the Vendor ID returns a +* Software Visibility enabled, reading the Vendor ID may return a * special data value if the device responded with RRS. Read the -* Vendor ID until we get non-RRS status. +* Vendor ID until we get non-RRS status and something other than +* ~0. The Vendor ID of VFs reads ~0, so check their Command +* register instead. * * If there's no Root Port or Configuration RRS Software Visibility * is not enabled, the device may still respond with RRS, but
@@ -1235,8 +1237,13 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)if (root && root->config_rrs_sv) {pci_read_config_dword (dev,PCI_VENDOR_ID , &id); -if (!pci_bus_rrs_vendor_id (id)) -break ; +if (!pci_bus_rrs_vendor_id (id)) { +if (PCI_POSSIBLE_ERROR (id) && dev->is_virtfn) +pci_read_config_dword (dev,PCI_COMMAND , + &id); +if (!PCI_POSSIBLE_ERROR (id)) +break ; + } }else {pci_read_config_dword (dev,PCI_COMMAND , &id);if (!PCI_POSSIBLE_ERROR (id))
drivers/pci/quirks.c +12 -0
@@ -5623,6 +5623,18 @@ static void quirk_no_flr_snet(struct pci_dev *dev) }DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_SOLIDRUN ,0x1000 , quirk_no_flr_snet); +/* Some Samsung SSDs advertise Immediate Readiness but aren't ready after FLR */ +static void quirk_no_imm_ready (struct pci_dev *dev) +{ +if (!dev->imm_ready) +return ; + +pci_info (dev,"Ignoring incorrectly advertised Immediate Readiness support\n" ); + dev->imm_ready =0 ; +} +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_SAMSUNG ,0xa80c , quirk_no_imm_ready); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_SAMSUNG ,0xa80d , quirk_no_imm_ready); +static void quirk_no_ext_tags (struct pci_dev *pdev) {struct pci_host_bridge *bridge =pci_find_host_bridge (pdev->bus);
drivers/pinctrl/pinctrl-amd.c +9 -0
@@ -886,6 +886,15 @@ static void amd_gpio_irq_init(struct amd_gpio *gpio_dev) mask =BIT (WAKE_CNTRL_OFF_S0I3 ) |BIT (WAKE_CNTRL_OFF_S3 ); +#ifdef CONFIG_ACPI +/* +* Platforms without _AEI leave GPIO wake sources to firmware, so +* preserve their S4 wake bits. +*/ +if (acpi_has_method (ACPI_HANDLE (&gpio_dev->pdev->dev),"_AEI" )) + mask |=BIT (WAKE_CNTRL_OFF_S4 ); +#endif +for (i =0 ; i < desc->npins; i++) {int pin = desc->pins[i].number;const struct pin_desc *pd =pin_desc_get (gpio_dev->pctrl, pin);
drivers/pinctrl/qcom/pinctrl-hawi.c +1 -0
@@ -47,6 +47,7 @@ .intr_wakeup_present_bit = 6, \ .intr_wakeup_enable_bit = 7, \ .intr_target_bit = 8, \ + .intr_target_width = 4, \ .intr_target_kpss_val = 3, \ .intr_raw_status_bit = 4, \ .intr_polarity_bit = 1, \
drivers/pinctrl/qcom/pinctrl-ipq5018.c +5 -5
@@ -361,7 +361,7 @@ static const char * const blsp1_uart0_groups[] = { };static const char *const gcc_plltest_groups[] = { -"gpio10" ,"gpio12" , +"gpio10" , };static const char *const gcc_tlmm_groups[] = {
@@ -555,7 +555,7 @@ static const char * const qdss_cti_trig_in_b0_groups[] = { };static const char *const pwm2_groups[] = { -"gpio44" , +"gpio12" ,"gpio44" , };static const char *const qdss_cti_trig_out_b1_groups[] = {
@@ -563,7 +563,7 @@ static const char * const qdss_cti_trig_out_b1_groups[] = { };static const char *const pwm3_groups[] = { -"gpio45" , +"gpio45" ,"gpio13" , };static const char *const qdss_cti_trig_in_b1_groups[] = {
@@ -688,8 +688,8 @@ static const struct msm_pingroup ipq5018_groups[] = {PINGROUP (9 , sdc1_clk, qspi_clk, _, qdss_tracedata_a, _, _, _, _, _),PINGROUP (10 , blsp0_spi, blsp1_uart0, led0, gcc_plltest, qdss_tracedata_a, _, _, _, _),PINGROUP (11 , blsp0_spi, blsp1_uart0, _, gcc_tlmm, qdss_tracedata_a, _, _, _, _), -PINGROUP (12 , blsp0_spi, blsp0_i2c, blsp1_uart0, _, gcc_plltest, qdss_tracedata_a, _, _, _), -PINGROUP (13 , blsp0_spi, blsp0_i2c, blsp1_uart0, _, qdss_tracedata_a, _, _, _, _), +PINGROUP (12 , blsp0_spi, blsp0_i2c, blsp1_uart0, _, pwm2, qdss_tracedata_a, _, _, _), +PINGROUP (13 , blsp0_spi, blsp0_i2c, blsp1_uart0, pwm3, qdss_tracedata_a, _, _, _, _),PINGROUP (14 , pcie0_clk, _, _, cri_trng0, qdss_tracedata_a, _, _, _, _),PINGROUP (15 , _, _, cri_trng1, qdss_tracedata_a, _, _, _, _, _), PINGROUP(16, pcie0_wake, _, _, cri_trng, qdss_tracedata_a, _, _, _, _),
drivers/pinctrl/qcom/pinctrl-nord.c +1 -0
@@ -32,6 +32,7 @@ .intr_wakeup_present_bit = 6, \ .intr_wakeup_enable_bit = 7, \ .intr_target_bit = 8, \ + .intr_target_width = 4, \ .intr_target_kpss_val = 3, \ .intr_raw_status_bit = 4, \ .intr_polarity_bit = 1, \
drivers/pinctrl/qcom/pinctrl-qcs8300.c +1 -0
@@ -45,6 +45,7 @@ .intr_enable_bit = 0, \ .intr_status_bit = 0, \ .intr_target_bit = 5, \ + .intr_target_width = 4, \ .intr_target_kpss_val = 3, \ .intr_raw_status_bit = 4, \ .intr_polarity_bit = 1, \
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +29 -8
@@ -734,29 +734,50 @@ static int pmic_gpio_get_direction(struct gpio_chip *chip, unsigned pin) (!pad->input_enabled && !pad->output_enabled)) return -EINVAL; -/* Make sure the state is aligned on what pmic_gpio_get() returns */ -return pad->input_enabled ?GPIO_LINE_DIRECTION_IN :GPIO_LINE_DIRECTION_OUT ; +/* +* An open-drain or open-source pad keeps its input buffer enabled while +* driving, so the output buffer is what tells the direction. +*/ +return pad->output_enabled ?GPIO_LINE_DIRECTION_OUT :GPIO_LINE_DIRECTION_IN ; }static int pmic_gpio_direction_input (struct gpio_chip *chip,unsigned pin) {struct pmic_gpio_state *state =gpiochip_get_data (chip); -unsigned long config; +unsigned long configs[2 ]; - config =pinconf_to_config_packed (PIN_CONFIG_INPUT_ENABLE ,1 ); + configs[0 ] =pinconf_to_config_packed (PIN_CONFIG_OUTPUT_ENABLE ,0 ); + configs[1 ] =pinconf_to_config_packed (PIN_CONFIG_INPUT_ENABLE ,1 ); -return pmic_gpio_config_set (state->ctrl, pin, &config,1 ); +return pmic_gpio_config_set (state->ctrl, pin, configs, +ARRAY_SIZE (configs)); }static int pmic_gpio_direction_output (struct gpio_chip *chip,unsigned pin,int val) {struct pmic_gpio_state *state =gpiochip_get_data (chip); -unsigned long config; +struct pmic_gpio_pad *pad = state->ctrl->desc->pins[pin].drv_data; +unsigned long configs[2 ]; - config =pinconf_to_config_packed (PIN_CONFIG_LEVEL , val); +/* +* An open-drain or open-source pad only ever drives one rail, so the +* line can still be sampled while the pad is an output. Keep the input +* buffer enabled for those, so that pmic_gpio_get() reports what is on +* the wire rather than the value last written, and disable it for a +* CMOS pad, so that the pad ends up in DIGITAL_OUTPUT rather than +* DIGITAL_INPUT_OUTPUT. Program it either way, as the buffer may have +* been left in the opposite state by the bootloader or by an earlier +* direction change with a different buffer type. gpiolib applies +* PIN_CONFIG_DRIVE_OPEN_DRAIN before calling this, so buffer_type is +* already up to date here. +*/ + configs[0 ] =pinconf_to_config_packed (PIN_CONFIG_INPUT_ENABLE , + pad->buffer_type !=PMIC_GPIO_OUT_BUF_CMOS ); + configs[1 ] =pinconf_to_config_packed (PIN_CONFIG_LEVEL , val); -return pmic_gpio_config_set (state->ctrl, pin, &config,1 ); +return pmic_gpio_config_set (state->ctrl, pin, configs, +ARRAY_SIZE (configs)); }static int pmic_gpio_get (struct gpio_chip *chip,unsigned pin)
drivers/pinctrl/sunxi/pinctrl-sunxi-dt.c +1 -0
@@ -84,6 +84,7 @@ static struct sunxi_desc_pin *init_pins_table(struct device *dev,* Find the total number of pins. * Also work out how much memory we need to store all the pin names. */ + desc->npins =0 ;for (i =0 ; i <SUNXI_PINCTRL_MAX_BANKS ; i++) { desc->npins += pins_per_bank[i];if (pins_per_bank[i] <10 ) {
drivers/power/sequencing/pwrseq-qcom-wcn.c +1 -15
@@ -496,15 +496,8 @@ static int pwrseq_qcom_wcn_probe(struct platform_device *pdev)return dev_err_probe (dev,PTR_ERR (ctx->bt_gpio),"Failed to get the Bluetooth enable GPIO\n" ); -/* -* FIXME: This should actually be GPIOD_OUT_LOW, but doing so would -* cause the WLAN power to be toggled, resulting in PCIe link down. -* Since the PCIe controller driver is not handling link down currently, -* the device becomes unusable. So we need to keep this workaround until -* the link down handling is implemented in the controller driver. -*/ ctx->wlan_gpio =devm_gpiod_get_optional (dev,"wlan-enable" , -GPIOD_ASIS ); +GPIOD_OUT_LOW );if (IS_ERR (ctx->wlan_gpio))return dev_err_probe (dev,PTR_ERR (ctx->wlan_gpio),"Failed to get the WLAN enable GPIO\n" );
@@ -515,13 +508,6 @@ static int pwrseq_qcom_wcn_probe(struct platform_device *pdev)return dev_err_probe (dev,PTR_ERR (ctx->xo_clk_gpio),"Failed to get the XO_CLK GPIO\n" ); -/* -* Set direction to output but keep the current value in order to not -* disable the WLAN module accidentally if it's already powered on. -*/ -gpiod_direction_output (ctx->wlan_gpio, -gpiod_get_value_cansleep (ctx->wlan_gpio)); - ctx->clk =devm_clk_get_optional (dev,NULL );if (IS_ERR (ctx->clk)) return dev_err_probe(dev, PTR_ERR(ctx->clk),
drivers/power/supply/ds2780_battery.c +1 -1
@@ -304,7 +304,7 @@ static int ds2780_get_capacity(struct ds2780_device_info *dev_info,return ret; *capacity = raw; -return raw; +return 0 ; }static int ds2780_get_status (struct ds2780_device_info *dev_info,int *status)
drivers/power/supply/generic-adc-battery.c +7 -2
@@ -90,12 +90,17 @@ static int gab_read_channel(struct gab *adc_bat, enum gab_chan_type channel,int ret; ret =iio_read_channel_processed (adc_bat->channel[channel], result); -if (ret <0 ) +if (ret <0 ) {dev_err (&adc_bat->psy->dev,"read channel error: %d\n" , ret); +return ret; + } + +if (channel ==GAB_TEMP ) + *result /=100 ;/* Convert from milli- to deci-degree */ else *result *=1000 ; -return ret; +return 0 ; } static int gab_get_property(struct power_supply *psy,
drivers/power/supply/power_supply_core.c +25 -1
@@ -1377,6 +1377,19 @@ void power_supply_external_power_changed(struct power_supply *psy) !psy->desc->external_power_changed)return ; +/* +* Keep power_supply_unregister() from returning, and thus from letting +* the driver's data be freed, while the callback is running. The +* ->removing check has to happen under the lock: on its own, just like +* the use_cnt check above, it only tells us the supply was still there +* when we looked, not that it still is by the time the callback +* dereferences its driver data. +*/ +guard (rwsem_read)(&psy->epc_sem); + +if (psy->removing) +return ; + psy->desc->external_power_changed (psy); }EXPORT_SYMBOL_GPL (power_supply_external_power_changed);
@@ -1621,6 +1634,7 @@ __power_supply_register(struct device *parent, }spin_lock_init (&psy->changed_lock); +init_rwsem (&psy->epc_sem);init_rwsem (&psy->extensions_sem);INIT_LIST_HEAD (&psy->extensions);
@@ -1753,7 +1767,17 @@ EXPORT_SYMBOL_GPL(devm_power_supply_register);void power_supply_unregister (struct power_supply *psy) {WARN_ON (atomic_dec_return (&psy->use_cnt)); - psy->removing = true; + +/* +* Publish ->removing so that no new ->external_power_changed() call can +* start, and wait via semaphore for one that is already running: it may +* be a supplier's changed_work, which cancel_work_sync() below does not +* cover, and it may still dereference driver data that the caller is +* about to free. +*/ +scoped_guard (rwsem_write, &psy->epc_sem) + psy->removing = true; +cancel_work_sync (&psy->changed_work);cancel_delayed_work_sync (&psy->deferred_register_work);sysfs_remove_link (&psy->dev.kobj,"powers" );
drivers/s390/net/ctcm_mpc.c +1 -2
@@ -826,7 +826,7 @@ static void mpc_action_go_ready(fsm_instance *fsm, int event, void *arg)fsm_deltimer (&grp->timer); -if (grp->saved_xid2->xid2_flag2 ==0x40 ) { +if (priv->xid->xid2_flag2 ==0x40 ) { priv->xid->xid2_flag2 =0x00 ;if (grp->estconnfunc) { grp->estconnfunc(grp->port_num, 1,
@@ -1636,7 +1636,6 @@ static int mpc_validate_xid(struct mpcg_info *mpcginfo)"The XID used in the MPC protocol is not valid, " "rc = %d\n", rc); priv->xid->xid2_flag2 =0x40 ; - grp->saved_xid2->xid2_flag2 =0x40 ; }return rc;
drivers/scsi/libiscsi.c +8 -6
@@ -1142,13 +1142,15 @@ static int iscsi_handle_reject(struct iscsi_conn *conn, struct iscsi_hdr *hdr,spin_unlock (&conn->session->frwd_lock);spin_lock (&conn->session->back_lock); }else { -struct iscsi_task *task; +struct iscsi_task *task =NULL ;/* * Our nop as ping got dropped. We know the target * and transport are ok so just clean up */ - task =iscsi_itt_to_task (conn, rejected_pdu.itt); -if (!task) { +if (!iscsi_verify_itt (conn, rejected_pdu.itt)) + task =iscsi_itt_to_task (conn, rejected_pdu.itt); +if (!task || task->state ==ISCSI_TASK_FREE || + task->sc) {iscsi_conn_printk (KERN_ERR , conn,"Invalid pdu reject. Could " "not lookup rejected task.\n" );
@@ -1191,7 +1193,7 @@ struct iscsi_task *iscsi_itt_to_task(struct iscsi_conn *conn, itt_t itt) session->tt->parse_pdu_itt (conn, itt, &i,NULL ); else i =get_itt (itt); -if (i >= session->cmds_max) +if (i <0 || i >= session->cmds_max)return NULL ;return session->cmds[i];
@@ -1284,7 +1286,7 @@ int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,case ISCSI_OP_SCSI_TMFUNC_RSP :case ISCSI_OP_NOOP_IN : task =iscsi_itt_to_task (conn, hdr->itt); -if (!task) +if (!task || task->state ==ISCSI_TASK_FREE || task->sc)return ISCSI_ERR_BAD_ITT ;break ;default :
@@ -1384,7 +1386,7 @@ int iscsi_verify_itt(struct iscsi_conn *conn, itt_t itt)return ISCSI_ERR_BAD_ITT ; } -if (i >= session->cmds_max) { +if (i <0 || i >= session->cmds_max) {iscsi_conn_printk (KERN_ERR , conn,"received invalid itt index %u (max cmds " "%u.\n" , i, session->cmds_max);
drivers/scsi/libsas/sas_expander.c +12 -2
@@ -62,7 +62,11 @@ static int smp_execute_task_sg(struct domain_device *dev,to_sas_internal (dev->port->ha->shost->transportt);struct sas_ha_struct *ha = dev->port->ha; -pm_runtime_get_sync (ha->dev); +/* +* Non-blocking: a sync resume here would deadlock against +* sas_drain_work() during HA resume. +*/ +pm_runtime_get_noresume (ha->dev);mutex_lock (&dev->ex_dev.cmd_mutex);for (retry =0 ; retry <3 ; retry++) {if (test_bit (SAS_DEV_GONE , &dev->state)) {
@@ -135,7 +139,7 @@ static int smp_execute_task_sg(struct domain_device *dev, } }mutex_unlock (&dev->ex_dev.cmd_mutex); -pm_runtime_put_sync (ha->dev); +pm_runtime_put (ha->dev);BUG_ON (retry ==3 && task !=NULL );sas_free_task (task);
@@ -2162,6 +2166,11 @@ void sas_smp_handler(struct bsg_job *job, struct Scsi_Host *shost, goto out; } +/* The host may have autosuspended, resume it here. */ + ret =pm_runtime_resume_and_get (dev->port->ha->dev); +if (ret) + goto out; + ret =smp_execute_task_sg (dev, job->request_payload.sg_list, job->reply_payload.sg_list);if (ret >=0 ) {
@@ -2169,6 +2178,7 @@ void sas_smp_handler(struct bsg_job *job, struct Scsi_Host *shost, rcvlen = job->reply_payload.payload_len - ret; ret =0 ; } +pm_runtime_put (dev->port->ha->dev); out:bsg_job_done (job, ret, rcvlen);
drivers/scsi/mpi3mr/mpi3mr_app.c +1 -1
@@ -3053,7 +3053,7 @@ void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc) } q =bsg_setup_queue (bsg_dev,dev_name (bsg_dev), &lim, - mpi3mr_bsg_request,NULL ,0 ); + mpi3mr_bsg_request,NULL ,0 ,SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q)) {ioc_err (mrioc,"%s: bsg registration failed\n" ,dev_name (bsg_dev));
drivers/scsi/scsi_transport_fc.c +4 -2
@@ -4345,7 +4345,8 @@ fc_bsg_hostadd(struct Scsi_Host *shost, struct fc_host_attrs *fc_host)scsi_init_limits (shost, &lim); lim.max_segments =min_not_zero (lim.max_segments, i->f->max_bsg_segments); q =bsg_setup_queue (dev, bsg_name, &lim, fc_bsg_dispatch, - fc_bsg_job_timeout, i->f->dd_bsg_size); + fc_bsg_job_timeout, i->f->dd_bsg_size, +SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q)) { dev_err(dev, "fc_host%d: bsg interface failed to initialize - setup queue\n",
@@ -4378,7 +4379,8 @@ fc_bsg_rportadd(struct Scsi_Host *shost, struct fc_rport *rport)scsi_init_limits (shost, &lim); lim.max_segments =min_not_zero (lim.max_segments, i->f->max_bsg_segments); q =bsg_setup_queue (dev,dev_name (dev), &lim, fc_bsg_dispatch_prep, - fc_bsg_job_timeout, i->f->dd_bsg_size); + fc_bsg_job_timeout, i->f->dd_bsg_size, +SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q)) {dev_err (dev,"failed to setup bsg queue\n" );return PTR_ERR (q);
drivers/scsi/scsi_transport_iscsi.c +1 -1
@@ -1545,7 +1545,7 @@ iscsi_bsg_host_add(struct Scsi_Host *shost, struct iscsi_cls_host *ihost)snprintf (bsg_name,sizeof (bsg_name),"iscsi_host%d" , shost->host_no);scsi_init_limits (shost, &lim); q =bsg_setup_queue (dev, bsg_name, &lim, iscsi_bsg_host_dispatch,NULL , -0 ); +0 ,SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q)) {shost_printk (KERN_ERR , shost,"bsg interface failed to " "initialize - no request queue\n" );
drivers/scsi/scsi_transport_sas.c +4 -2
@@ -199,7 +199,8 @@ static int sas_bsg_initialize(struct Scsi_Host *shost, struct sas_rphy *rphy)if (rphy) { q =bsg_setup_queue (&rphy->dev,dev_name (&rphy->dev),NULL , - sas_smp_dispatch,NULL ,0 ); + sas_smp_dispatch,NULL ,0 , +SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q))return PTR_ERR (q); rphy->q = q;
@@ -208,7 +209,8 @@ static int sas_bsg_initialize(struct Scsi_Host *shost, struct sas_rphy *rphy)snprintf (name,sizeof (name),"sas_host%d" , shost->host_no); q =bsg_setup_queue (&shost->shost_gendev, name,NULL , - sas_smp_dispatch,NULL ,0 ); + sas_smp_dispatch,NULL ,0 , +SCSI_SENSE_BUFFERSIZE );if (IS_ERR (q))return PTR_ERR (q);to_sas_host_attrs (shost)->q = q;
drivers/scsi/st.c +12 -6
@@ -3217,14 +3217,20 @@ static int set_location(struct scsi_tape *STp, unsigned int block, int partition partition >= ST_NBR_PARTITIONS)return (-EINVAL );if (partition != STp->partition) { -if (get_location (STp, &blk, &p,1 )) +/* +* Save the location for the partition the drive reports, +* not for STp->partition: after a reset STp->partition may +* not match the partition the drive is in. +*/ +if (get_location (STp, &blk, &p,1 ) || + p <0 || p >=ST_NBR_PARTITIONS ) STps->last_block_valid =0 ;else { - STps->last_block_valid =1 ; - STps->last_block_visited = blk; + STp->ps[p].last_block_valid =1 ; + STp->ps[p].last_block_visited = blk;DEBC_printk (STp,"Visited block %d for " "partition %d saved.\n" , - blk, STp->partition); + blk, p); } }
@@ -4509,11 +4515,11 @@ static void st_remove(struct scsi_device *SDp)remove_cdevs (tpnt);mutex_lock (&st_ref_mutex); -kref_put (&tpnt->kref, scsi_tape_release); -mutex_unlock (&st_ref_mutex);spin_lock (&st_index_lock);idr_remove (&st_index_idr, index);spin_unlock (&st_index_lock); +kref_put (&tpnt->kref, scsi_tape_release); +mutex_unlock (&st_ref_mutex); }/**
drivers/scsi/xen-scsifront.c +1 -0
@@ -367,6 +367,7 @@ static void scsifront_do_response(struct vscsifrnt_info *info,struct vscsifrnt_shadow *shadow;if (ring_rsp->rqid >=VSCSIIF_MAX_REQS || + !info->shadow[ring_rsp->rqid] || !info->shadow[ring_rsp->rqid]->inflight) {scsifront_set_error (info,"illegal rqid returned by backend!" );return ;
drivers/soc/tegra/fuse/tegra-apbmisc.c +1 -1
@@ -309,7 +309,7 @@ void tegra_acpi_init_apbmisc(void) ret =acpi_dev_get_memory_resources (adev, &resource_list);if (ret <0 ) { -pr_err ("failed to get APBMISC memory resources" ); +pr_err ("failed to get APBMISC memory resources\n" ); goto out_put_acpi_dev; }
drivers/soc/tegra/pmc.c +1 -0
@@ -3148,6 +3148,7 @@ static int tegra_pmc_probe(struct platform_device *pdev)#if defined(CONFIG_ARM )mutex_lock (&early_pmc->powergates_lock); + early_pmc->rate = pmc->rate;iounmap (early_pmc->base); early_pmc->base = pmc->base;mutex_unlock (&early_pmc->powergates_lock);
drivers/spi/spi-imx.c +6 -3
@@ -1578,11 +1578,13 @@ static int spi_imx_dma_tx_data_handle(struct spi_imx_data *spi_imx, dma_data->dma_len =ALIGN (dma_data->data_len,BYTES_PER_32BITS_WORD ); } - dma_data->dma_tx_buf =kzalloc (dma_data->dma_len,GFP_KERNEL ); + dma_data->dma_tx_buf =kzalloc (DMA_CACHE_ALIGNED_LEN (dma_data->dma_len), +GFP_KERNEL );if (!dma_data->dma_tx_buf)return -ENOMEM ; - dma_data->dma_rx_buf =kzalloc (dma_data->dma_len,GFP_KERNEL ); + dma_data->dma_rx_buf =kzalloc (DMA_CACHE_ALIGNED_LEN (dma_data->dma_len), +GFP_KERNEL );if (!dma_data->dma_rx_buf) {kfree (dma_data->dma_tx_buf);return -ENOMEM ;
@@ -1920,7 +1922,8 @@ static int spi_imx_dma_package_transfer(struct spi_imx_data *spi_imx,/* Trim the DMA RX buffer and copy the actual data to rx_buf */ dma_sync_single_for_cpu (controller->dma_rx->device->dev, dma_data->dma_rx_addr, - dma_data->dma_len,DMA_FROM_DEVICE ); +DMA_CACHE_ALIGNED_LEN (dma_data->dma_len), +DMA_FROM_DEVICE );spi_imx_dma_rx_data_handle (spi_imx, dma_data, transfer->rx_buf + spi_imx->rx_offset, word_delay); spi_imx->rx_offset += dma_data->data_len;
drivers/spi/spi-tegra114.c +7 -0
@@ -859,6 +859,13 @@ static u32 tegra_spi_setup_transfer_one(struct spi_device *spi, command1 |=SPI_BIT_LENGTH (bits_per_word -1 ); } +/* +* Re-assert the CS GPIO for every transfer: transfer_end() drops it +* on cs_change, and the assert above only covers is_first_of_msg. +*/ +if (spi_get_csgpiod (spi,0 )) +gpiod_set_value (spi_get_csgpiod (spi,0 ),1 ); +return command1; }
drivers/target/iscsi/iscsi_target_configfs.c +19 -7
@@ -1306,17 +1306,24 @@ static ssize_t iscsi_disc_enforce_discovery_auth_store(struct config_item *item,return -EINVAL ; } +if (iscsit_get_tpg (discovery_tpg) <0 ) +return -EINVAL ; + param =iscsi_find_param_from_key (AUTHMETHOD , discovery_tpg->param_list); -if (!param) -return -EINVAL ; +if (!param) { + err = -EINVAL ; + goto out; + }if (op) {/* * Reset the AuthMethod key to CHAP. */ -if (iscsi_update_param_value (param,CHAP ) <0 ) -return -EINVAL ; +if (iscsi_update_param_value (param,CHAP ) <0 ) { + err = -EINVAL ; + goto out; + } discovery_tpg->tpg_attrib.authentication =1 ; iscsit_global->discovery_acl.node_auth.enforce_discovery_auth =1 ;
@@ -1327,8 +1334,10 @@ static ssize_t iscsi_disc_enforce_discovery_auth_store(struct config_item *item,/* * Reset the AuthMethod key to CHAP,None */ -if (iscsi_update_param_value (param,"CHAP,None" ) <0 ) -return -EINVAL ; +if (iscsi_update_param_value (param,"CHAP,None" ) <0 ) { + err = -EINVAL ; + goto out; + } discovery_tpg->tpg_attrib.authentication =0 ; iscsit_global->discovery_acl.node_auth.enforce_discovery_auth =0 ;
@@ -1337,7 +1346,10 @@ static ssize_t iscsi_disc_enforce_discovery_auth_store(struct config_item *item, " Discovery TPG\n"); } -return count; + err = count; +out: +iscsit_put_tpg (discovery_tpg); +return err; }CONFIGFS_ATTR (iscsi_disc_, enforce_discovery_auth);
drivers/target/target_core_transport.c +4 -4
@@ -2359,7 +2359,7 @@ void target_do_delayed_work(struct work_struct *work) struct se_device *dev = container_of(work, struct se_device, delayed_cmd_work); -spin_lock (&dev->delayed_cmd_lock); +spin_lock_irq (&dev->delayed_cmd_lock);while (!dev->ordered_sync_in_progress) {struct se_cmd *cmd;
@@ -2380,12 +2380,12 @@ void target_do_delayed_work(struct work_struct *work) dev->ordered_sync_in_progress = true;list_del (&cmd->se_delayed_node); -spin_unlock (&dev->delayed_cmd_lock); +spin_unlock_irq (&dev->delayed_cmd_lock);__target_execute_cmd (cmd, true); -spin_lock (&dev->delayed_cmd_lock); +spin_lock_irq (&dev->delayed_cmd_lock); } -spin_unlock (&dev->delayed_cmd_lock); +spin_unlock_irq (&dev->delayed_cmd_lock); }static void transport_complete_ordered_sync (struct se_cmd *cmd)
drivers/ufs/core/ufs_bsg.c +1 -1
@@ -257,7 +257,7 @@ int ufs_bsg_probe(struct ufs_hba *hba) goto out; q =bsg_setup_queue (bsg_dev,dev_name (bsg_dev),NULL , ufs_bsg_request, -NULL ,0 ); +NULL ,0 ,sizeof (struct ufs_rpmb_reply ));if (IS_ERR (q)) { ret =PTR_ERR (q);device_del (bsg_dev);
fs/9p/v9fs.h +1 -0
@@ -137,6 +137,7 @@ struct v9fs_session_info {struct list_head slist;/* list of sessions registered with v9fs */ struct rw_semaphore rename_sem;long session_lock_timeout;/* retry interval for blocking locks */ +struct rcu_head rcu;/* v9fs_vfs_get_link_dotl() reads ->cache in rcu pathwalk */ };#define NDENTRY_TIMEOUT_NEVER (-1U)
fs/9p/vfs_super.c +2 -2
@@ -173,8 +173,8 @@ static void v9fs_kill_super(struct super_block *s)v9fs_session_cancel (v9ses);v9fs_session_close (v9ses); -kfree (v9ses); - s->s_fs_info =NULL ; +/* v9fs_vfs_get_link_dotl() may still read ->cache in rcu pathwalk */ +kfree_rcu (v9ses, rcu);p9_debug (P9_DEBUG_VFS ,"exiting kill_super\n" ); }
fs/afs/internal.h +2 -0
@@ -251,6 +251,8 @@ struct afs_super_info {struct afs_volume *volume;/* volume record */ enum afs_flock_mode flock_mode:8; /* File locking emulation mode */bool dyn_root;/* True if dynamic root */ +/* afs_atcell_get_link() reads ->net_ns in rcu pathwalk */ +struct rcu_head rcu; };static inline struct afs_super_info *AFS_FS_S (struct super_block *sb)
fs/afs/super.c +1 -1
@@ -523,7 +523,7 @@ static void afs_destroy_sbi(struct afs_super_info *as)afs_put_volume (as->volume, afs_volume_trace_put_destroy_sbi);afs_unuse_cell (as->cell, afs_cell_trace_unuse_sbi);put_net (as->net_ns); -kfree (as); +kfree_rcu (as, rcu); } }
fs/autofs/waitq.c +19 -6
@@ -12,15 +12,13 @@*/ static autofs_wqt_t autofs_next_wait_queue =1 ; -void autofs_catatonic_mode (struct autofs_sb_info *sbi) +static void autofs_catatonic_mode_locked (struct autofs_sb_info *sbi) {struct autofs_wait_queue *wq, *nwq; -mutex_lock (&sbi->wq_mutex); -if (sbi->flags &AUTOFS_SBI_CATATONIC ) { -mutex_unlock (&sbi->wq_mutex); +lockdep_assert_held (&sbi->wq_mutex); +if (sbi->flags &AUTOFS_SBI_CATATONIC )return ; - }pr_debug ("entering catatonic mode\n" );
@@ -40,6 +38,21 @@ void autofs_catatonic_mode(struct autofs_sb_info *sbi)fput (sbi->pipe);/* Close the pipe */ sbi->pipe =NULL ; sbi->pipefd =-1 ; +} + +void autofs_catatonic_mode (struct autofs_sb_info *sbi) +{ +mutex_lock (&sbi->wq_mutex); +autofs_catatonic_mode_locked (sbi); +mutex_unlock (&sbi->wq_mutex); +} + +static void autofs_catatonic_mode_for_pipe (struct autofs_sb_info *sbi, +struct file *pipe) +{ +mutex_lock (&sbi->wq_mutex); +if (sbi->pipe == pipe) +autofs_catatonic_mode_locked (sbi);mutex_unlock (&sbi->wq_mutex); }
@@ -170,7 +183,7 @@ static void autofs_notify_daemon(struct autofs_sb_info *sbi,autofs_wait_release (sbi, wq->wait_queue_token, ret);break ;default : -autofs_catatonic_mode (sbi); +autofs_catatonic_mode_for_pipe (sbi, pipe);break ; }fput (pipe);
fs/ext4/ext4.h +2 -0
@@ -1768,6 +1768,8 @@ struct ext4_sb_info {struct list_head s_es_list;/* List of inodes with reclaimable extents */ long s_es_nr_inode;struct ext4_es_stats s_es_stats; +/* ext4_get_link() reads the sbi in rcu pathwalk */ +struct rcu_head s_rcu;struct mb_cache *s_ea_block_cache;struct mb_cache *s_ea_inode_cache;spinlock_t s_es_lock____cacheline_aligned_in_smp ;
fs/ext4/extents-test.c +2 -0
@@ -156,6 +156,7 @@ static void extents_kunit_exit(struct kunit *test) sbi = k_ctx.k_ei->vfs_inode.i_sb->s_fs_info;ext4_es_unregister_shrinker (sbi); +ext4_es_destroy_stats (sbi);deactivate_super (sbi->s_sb);kfree (sbi);kfree (k_ctx.k_ei);
@@ -345,6 +346,7 @@ static int extents_kunit_init(struct kunit *test) k_ctx.k_data =NULL ;ext4_es_unregister_shrinker (sbi); +ext4_es_destroy_stats (sbi); out_deactivate:deactivate_locked_super (sb);kfree (sbi);
fs/ext4/extents.c +1 -0
@@ -6297,6 +6297,7 @@ EXPORT_SYMBOL_FOR_EXT4_TEST(__ext4_ext_dirty);EXPORT_SYMBOL_FOR_EXT4_TEST (ext4_ext_zeroout);EXPORT_SYMBOL_FOR_EXT4_TEST (ext4_es_register_shrinker);EXPORT_SYMBOL_FOR_EXT4_TEST (ext4_es_unregister_shrinker); +EXPORT_SYMBOL_FOR_EXT4_TEST (ext4_es_destroy_stats);EXPORT_SYMBOL_FOR_EXT4_TEST (ext4_map_create_blocks);
Lines of this file are not shown. View the raw message.
fs/ntfs/ea.c +102 -24
126 lines not on this page · raw message
fs/ntfs/file.c +20 -21
41 lines not on this page · raw message
kernel/futex/core.c +28 -23
51 lines not on this page · raw message
kernel/sched/ext/ext.c +69 -26
95 lines not on this page · raw message
kernel/sched/ext/idle.c +39 -11
50 lines not on this page · raw message
kernel/trace/ring_buffer.c +29 -31
60 lines not on this page · raw message
net/iucv/af_iucv.c +25 -17
42 lines not on this page · raw message
net/mac802154/scan.c +38 -13
51 lines not on this page · raw message
net/vmw_vsock/af_vsock.c +40 -9
49 lines not on this page · raw message
net/vmw_vsock/virtio_transport_common.c +2 -1
Lines of this file are not shown. View the raw message.
tools/power/x86/turbostat/turbostat.c +45 -29
74 lines not on this page · 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.