6.17.13-rc1 review
Subsystems (5)
Greg Kroah-Hartman
maintainercover 6.17.13-rc1 review
This is the start of the stable review cycle for the 6.17.13 release. There are 507 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 18 Dec 2025 11:12:22 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.17.13-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.17.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.17.13-rc1
Junrui Luo <[email protected]>
ALSA: wavefront: Fix integer overflow in sample size validation
Denis Arefev <[email protected]>
ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_hda_read_acpi()
Antheas Kapenekakis <[email protected]>
ALSA: hda/tas2781: fix speaker id retrieval for multiple probes
Antheas Kapenekakis <[email protected]>
ALSA: hda/realtek: Add match for ASUS Xbox Ally projects
Junrui Luo <[email protected]>
ALSA: dice: fix buffer overflow in detect_stream_formats()
Sven Peter <[email protected]>
usb: dwc3: dwc3_power_off_all_roothub_ports: Use ioremap_np when required
Duoming Zhou <[email protected]>
usb: typec: ucsi: fix use-after-free caused by uec->work
Diogo Ivo <[email protected]>
usb: phy: Initialize struct usb_phy list_head
Duoming Zhou <[email protected]>
usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()
Haotien Hsu <[email protected]>
usb: gadget: tegra-xudc: Always reinitialize data toggle when clear halt
Evan Li <[email protected]>
perf/x86/intel: Fix NULL event dereference crash in handle_pmi_common()
Dmitry Antipov <[email protected]>
ocfs2: fix memory leak in ocfs2_merge_rec_left()
Sebastian Andrzej Siewior <[email protected]>
cpu: Make atomic hotplug callbacks run with interrupts disabled on UP
Dan Carpenter <[email protected]>
irqchip/mchp-eic: Fix error code in mchp_eic_domain_alloc()
Thaumy Cheng <[email protected]>
perf/core: Fix missing read event generation on task exit
Duoming Zhou <[email protected]>
scsi: imm: Fix use-after-free bug caused by unfinished delayed work
Mauro Carvalho Chehab <[email protected]>
efi/cper: align ARM CPER type with UEFI 2.9A/2.10 specs
Mauro Carvalho Chehab <[email protected]>
efi/cper: Adjust infopfx size to accept an extra space
Mauro Carvalho Chehab <[email protected]>
efi/cper: Add a new helper function to print bitmasks
Haotian Zhang <[email protected]>
dm log-writes: Add missing set_freezable() for freezable kthread
Alexey Simakov <[email protected]>
dm-raid: fix possible NULL dereference with undefined raid type
Hemalatha Pinnamreddy <[email protected]>
ASoC: amd: acp: update tdm channels for specific DAI
Mohamed Khalfella <[email protected]>
block: Use RCU in blk_mq_[un]quiesce_tagset() instead of set->tag_list_lock
Dibin Moolakadan Subrahmanian <[email protected]>
drm/i915/fbdev: Hold runtime PM ref during fbdev BO creation
Jani Nikula <[email protected]>
drm/{i915, xe}/fbdev: deduplicate struct drm_mode_fb_cmd2 init
Jani Nikula <[email protected]>
drm/{i915, xe}/fbdev: pass struct drm_device to intel_fbdev_fb_alloc()
Jani Nikula <[email protected]>
drm/i915/fbdev: make intel_framebuffer_create() error return handling explicit
Jani Nikula <[email protected]>
drm/xe/fbdev: use the same 64-byte stride alignment as i915
Liyuan Pang <[email protected]>
ARM: 9464/1: fix input-only operand modification in load_unaligned_zeropad()
Junrui Luo <[email protected]>
ALSA: firewire-motu: add bounds check in put_user loop for DSP events
Nuno Sá <[email protected]>
rtc: max31335: Fix ignored return value in set_alarm
Haotian Zhang <[email protected]>
rtc: gamecube: Check the return value of ioremap()
Xiaogang Chen <[email protected]>
drm/amdkfd: Use huge page size to check split svm range alignment
Andres J Rosa <[email protected]>
ALSA: uapi: Fix typo in asound.h comment
Dave Kleikamp <[email protected]>
dma/pool: eliminate alloc_pages warning in atomic_pool_expand
Troy Mitchell <[email protected]>
i2c: spacemit: fix detect issue
Kathara Sasikumar <[email protected]>
docs: hwmon: fix link to g762 devicetree binding
David Howells <[email protected]>
cifs: Fix handling of a beyond-EOF DIO/unbuffered read over SMB2
David Howells <[email protected]>
cifs: Fix handling of a beyond-EOF DIO/unbuffered read over SMB1
René Rebe <[email protected]>
drm/nouveau: fix circular dep oops from vendored i2c encoder
Madhur Kumar <[email protected]>
drm/nouveau: refactor deprecated strcpy
Junrui Luo <[email protected]>
ALSA: firewire-motu: fix buffer overflow in hwdep read for DSP events
Mark Brown <[email protected]>
regulator: fixed: Rely on the core freeing the enable GPIO
Dan Carpenter <[email protected]>
drm/plane: Fix IS_ERR() vs NULL check in drm_plane_create_hotspot_properties()
Israel Rukshin <[email protected]>
nvme-auth: use kvfree() for memory allocated with kvcalloc()
Shaurya Rane <[email protected]>
block: fix memory leak in __blkdev_issue_zero_pages
shechenglong <[email protected]>
block: fix comment for op_is_zone_mgmt() to include RESET_ALL
Cong Zhang <[email protected]>
blk-mq: Abort suspend when wakeup events are pending
Daeho Jeong <[email protected]>
f2fs: revert summary entry count from 2048 to 512 in 16kb block support
Shengjiu Wang <[email protected]>
ASoC: ak5558: Disable regulator when error happens
Shengjiu Wang <[email protected]>
ASoC: ak4458: Disable regulator when error happens
Hemalatha Pinnamreddy <[email protected]>
ASoC: amd: acp: Audio is not resuming after s0ix
Haotian Zhang <[email protected]>
ASoC: bcm: bcm63xx-pcm-whistler: Check return value of of_dma_configure()
Anton Khirnov <[email protected]>
platform/x86: asus-wmi: use brightness_set_blocking() for kbd led
Armin Wolf <[email protected]>
fs/nls: Fix inconsistency between utf8_to_utf32() and utf32_to_utf8()
Trond Myklebust <[email protected]>
NFS: Fix inheritance of the block sizes when automounting
Trond Myklebust <[email protected]>
NFS: Automounted filesystems should inherit ro,noexec,nodev,sync flags
Trond Myklebust <[email protected]>
Revert "nfs: ignore SB_RDONLY when mounting nfs"
Trond Myklebust <[email protected]>
Revert "nfs: clear SB_RDONLY before getting superblock"
Trond Myklebust <[email protected]>
Revert "nfs: ignore SB_RDONLY when remounting nfs"
Akash Goel <[email protected]>
drm/panthor: Prevent potential UAF in group creation
Chia-I Wu <[email protected]>
panthor: save task pid and comm in panthor_group
Jonathan Curley <[email protected]>
NFSv4/pNFS: Clear NFS_INO_LAYOUTCOMMIT in pnfs_mark_layout_stateid_invalid
Trond Myklebust <[email protected]>
NFS: Initialise verifiers for visible dentries in _nfs4_open_and_get_state
Trond Myklebust <[email protected]>
NFS: Initialise verifiers for visible dentries in nfs_atomic_open()
Trond Myklebust <[email protected]>
NFS: Initialise verifiers for visible dentries in readdir and lookup
Armin Wolf <[email protected]>
fs/nls: Fix utf16 to utf8 conversion
Trond Myklebust <[email protected]>
NFS: Avoid changing nlink when file removes and attribute updates race
Abel Vesa <[email protected]>
kbuild: install-extmod-build: Properly fix CC expansion when ccache is used
James Le Cuirot <[email protected]>
kbuild: install-extmod-build: Fix when given dir outside the build dir
Haotian Zhang <[email protected]>
rtc: amlogic-a4: fix double free caused by devm
Daeho Jeong <[email protected]>
f2fs: maintain one time GC mode is enabled during whole zoned GC cycle
Xi Pardee <[email protected]>
platform/x86:intel/pmc: Update Arrow Lake telemetry GUID
John Stultz <[email protected]>
sched/core: Fix psi_dequeue() for Proxy Execution
xupengbo <[email protected]>
sched/fair: Fix unfairness caused by stalled tg_load_avg_contrib when the last task migrates out
Eric Sandeen <[email protected]>
9p: fix cache/debug options printing in v9fs_show_options
Abdun Nihaal <[email protected]>
fbdev: ssd1307fb: fix potential page leak in ssd1307fb_probe()
Haotian Zhang <[email protected]>
pinctrl: single: Fix incorrect type for error return variable
Ian Rogers <[email protected]>
perf hist: In init, ensure mem_info is put on error paths
Namhyung Kim <[email protected]>
perf tools: Fix split kallsyms DSO counting
Namhyung Kim <[email protected]>
perf tools: Mark split kallsyms DSOs as loaded
Namhyung Kim <[email protected]>
perf jitdump: Add sym/str-tables to build-ID generation
Xiang Mei <[email protected]>
net/sched: sch_cake: Fix incorrect qlen reduction in cake_drop
Vladimir Oltean <[email protected]>
net: dsa: xrs700x: reject unsupported HSR configurations
Xiaoliang Yang <[email protected]>
net: hsr: create an API to get hsr port type
Jonas Gorski <[email protected]>
net: dsa: b53: fix BCM5325/65 ARL entry VIDs
Jonas Gorski <[email protected]>
net: dsa: b53: fix BCM5325/65 ARL entry multicast port masks
Jonas Gorski <[email protected]>
net: dsa: b53: add support for bcm63xx ARL entry format
Jonas Gorski <[email protected]>
net: dsa: b53: fix CPU port unicast ARL entries for BCM5325/65
Jonas Gorski <[email protected]>
net: dsa: b53: use same ARL search result offset for BCM5325/65
Jonas Gorski <[email protected]>
net: dsa: b53: add support for 5389/5397/5398 ARL entry format
Jonas Gorski <[email protected]>
net: dsa: b53: move ARL entry functions into ops struct
Jonas Gorski <[email protected]>
net: dsa: b53: split reading search entry into their own functions
Jonas Gorski <[email protected]>
net: dsa: b53: provide accessors for accessing ARL_SRCH_CTL
Jonas Gorski <[email protected]>
net: dsa: b53: move writing ARL entries into their own functions
Jonas Gorski <[email protected]>
net: dsa: b53: move reading ARL entries into their own function
Jonas Gorski <[email protected]>
net: dsa: b53: b53_arl_read{,25}(): use the entry for comparisionJonas Gorski <[email protected]>
net: dsa: b53: fix extracting VID from entry for BCM5325/65
Jonas Gorski <[email protected]>
net: dsa: b53: fix VLAN_ID_IDX write size for BCM5325/65
Johan Hovold <[email protected]>
clk: keystone: fix compile testing
Yu Kuai <[email protected]>
md/raid5: fix IO hang when array is broken with IO inflight
Alexandru Gagniuc <[email protected]>
remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs
Kumar Kartikeya Dwivedi <[email protected]>
rqspinlock: Use trylock fallback when per-CPU rqnode is busy
Kumar Kartikeya Dwivedi <[email protected]>
rqspinlock: Enclose lock/unlock within lock entry acquisitions
Ivan Stepchenko <[email protected]>
mtd: lpddr_cmds: fix signed shifts in lpddr_cmds
Breno Leitao <[email protected]>
net: netpoll: initialize work queue before error checks
Hangbin Liu <[email protected]>
selftests: bonding: add delay before each xvlan_over_bond connectivity check
Robert Marko <[email protected]>
net: phy: aquantia: check for NVMEM deferral
Alex Williamson <[email protected]>
vfio/pci: Use RCU for error/request triggers to avoid circular locking
Tianchu Chen <[email protected]>
spi: ch341: fix out-of-bounds memory access in ch341_transfer_one
Haotian Zhang <[email protected]>
mtd: rawnand: renesas: Handle devm_pm_runtime_enable() errors
Alexey Kodanev <[email protected]>
net: stmmac: fix rx limit check in stmmac_rx_zc()
Michal Schmidt <[email protected]>
iavf: Implement settime64 with -EOPNOTSUPP
Fernando Fernandez Mancera <[email protected]>
netfilter: nft_connlimit: update the count if add was skipped
Fernando Fernandez Mancera <[email protected]>
netfilter: nf_conncount: rework API to use sk_buff directly
Pablo Neira Ayuso <[email protected]>
netfilter: flowtable: check for maximum number of encapsulations in bridge vlan
Ilias Stamatis <[email protected]>
Reinstate "resource: avoid unnecessary lookups in find_next_iomem_res()"
sparkhuang <[email protected]>
regulator: core: Protect regulator_supply_alias_list with regulator_list_mutex
Marek Szyprowski <[email protected]>
ARM: dts: samsung: exynos4412-midas: turn off SDIO WLAN chip during system suspend
Marek Szyprowski <[email protected]>
ARM: dts: samsung: exynos4210-trats: turn off SDIO WLAN chip during system suspend
Marek Szyprowski <[email protected]>
ARM: dts: samsung: exynos4210-i9100: turn off SDIO WLAN chip during system suspend
Marek Szyprowski <[email protected]>
ARM: dts: samsung: universal_c210: turn off SDIO WLAN chip during system suspend
Mikhail Kshevetskiy <[email protected]>
spi: airoha-snfi: en7523: workaround flash damaging if UART_TXD was short to GND
Cezary Rojewski <[email protected]>
ASoC: Intel: catpt: Fix error path in hw_params()
Michael S. Tsirkin <[email protected]>
virtio: clean up features qword/dword terms
Alok Tiwari <[email protected]>
vdpa/pds: use %pe for ERR_PTR() in event handler registration
Mike Christie <[email protected]>
vhost: Fix kthread worker cgroup failure handling
Alok Tiwari <[email protected]>
vdpa/mlx5: Fix incorrect error code reporting in query_virtqueues
Michael S. Tsirkin <[email protected]>
virtio: fix virtqueue_set_affinity() docs
Michael S. Tsirkin <[email protected]>
virtio: fix grammar in virtio_queue_info docs
Michael S. Tsirkin <[email protected]>
virtio: fix whitespace in virtio_config_ops
Michael S. Tsirkin <[email protected]>
virtio: fix typo in virtio_device_ready() comment
Alok Tiwari <[email protected]>
virtio_vdpa: fix misleading return in void function
Guenter Roeck <[email protected]>
of: Skip devicetree kunit tests when RISCV+ACPI doesn't populate root node
Willem de Bruijn <[email protected]>
selftests/net: packetdrill: pass send_omit_free to MSG_ZEROCOPY tests
Yongjian Sun <[email protected]>
ext4: improve integrity checking in __mb_check_buddy by enhancing order-0 validation
Kevin Brodsky <[email protected]>
ublk: prevent invalid access with DEBUG
René Rebe <[email protected]>
ACPI: processor_core: fix map_x2apic_id for amd-pstate on am4
Haotian Zhang <[email protected]>
hwmon: sy7636a: Fix regulator_enable resource leak on error path
Dan Carpenter <[email protected]>
drm/amd/display: Fix logical vs bitwise bug in get_embedded_panel_info_v2_1()
Will Rosenberg <[email protected]>
kernfs: fix memory leak of kernfs_iattrs in __kernfs_new_node
Christophe JAILLET <[email protected]>
misc: rp1: Fix an error handling path in rp1_probe()
Haotian Zhang <[email protected]>
greybus: gb-beagleplay: Fix timeout handling in bootloader functions
Alexandre Courbot <[email protected]>
firmware_loader: make RUST_FW_LOADER_ABSTRACTIONS select FW_LOADER
Shengjiu Wang <[email protected]>
ASoC: fsl_xcvr: clear the channel status control memory
Andreas Gruenbacher <[email protected]>
gfs2: Prevent recursive memory reclaim
Jaroslav Kysela <[email protected]>
ASoC: nau8325: add missing build config
Jaroslav Kysela <[email protected]>
ASoC: nau8325: use simple i2c probe function
Johan Hovold <[email protected]>
clocksource/drivers/nxp-stm: Prevent driver unbind
Johan Hovold <[email protected]>
clocksource/drivers/nxp-stm: Fix section mismatches
Johan Hovold <[email protected]>
clocksource/drivers/stm: Fix double deregistration on probe failure
Haotian Zhang <[email protected]>
clocksource/drivers/ralink: Fix resource leaks in init error path
Akash Goel <[email protected]>
drm/panthor: Avoid adding of kernel BOs to extobj list
Jacob Moroni <[email protected]>
RDMA/irdma: Do not directly rely on IB_PD_UNSAFE_GLOBAL_RKEY
Krzysztof Czurylo <[email protected]>
RDMA/irdma: Fix data race in irdma_free_pble
Krzysztof Czurylo <[email protected]>
RDMA/irdma: Fix data race in irdma_sc_ccq_arm
Stephan Gerhold <[email protected]>
iommu/arm-smmu-qcom: Enable use of all SMR groups when running bare-metal
Randy Dunlap <[email protected]>
backlight: lp855x: Fix lp855x.h kernel-doc warnings
Luca Ceresoli <[email protected]>
backlight: led-bl: Add devlink to supplier LEDs
Ria Thomas <[email protected]>
wifi: ieee80211: correct FILS status codes
Christoph Hellwig <[email protected]>
iomap: always run error completions in user context
David Gow <[email protected]>
um: Don't rename vmap to kernel_vmap
Timur Tabi <[email protected]>
drm/nouveau: restrict the flush page to a 32-bit address
Shawn Lin <[email protected]>
PCI: dwc: Fix wrong PORT_LOGIC_LTSSM_STATE_MASK definition
Filipe Manana <[email protected]>
btrfs: fix leaf leak in an error path in btrfs_del_items()
Boris Burkov <[email protected]>
btrfs: fix racy bitfield write in btrfs_clear_space_info_full()
Miquel Sabaté Solà <[email protected]>
btrfs: fix double free of qgroup record after failure to add delayed ref head
Ryan Huang <[email protected]>
iommu/arm-smmu-v3: Fix error check in arm_smmu_alloc_cd_tables
Jianglei Nie <[email protected]>
staging: fbtft: core: fix potential memory leak in fbtft_probe_common()
Dinh Nguyen <[email protected]>
firmware: stratix10-svc: fix make htmldocs warning for stratix10_svc
Zilin Guan <[email protected]>
mt76: mt7615: Fix memory leak in mt7615_mcu_wtbl_sta_add()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Add missing locking in mt7996_mac_sta_rc_work()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: skip deflink accounting for offchannel links
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: grab mt76 mutex in mt7996_mac_sta_event()
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix using wrong phy to start in mt7996_mac_restart()
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix MLD group index assignment
Shayne Chen <[email protected]>
wifi: mt76: mt7996: set link_valid field when initializing wcid
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix teardown command for an MLD peer
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix several fields in mt7996_mcu_bss_basic_tlv()
Howard Hsu <[email protected]>
wifi: mt76: mt7996: fix implicit beamforming support for mt7992
StanleyYP Wang <[email protected]>
wifi: mt76: mt7996: fix max nss value when getting rx chainmask
Fedor Pchelkin <[email protected]>
Revert "wifi: mt76: mt792x: improve monitor interface handling"
Ming Yen Hsieh <[email protected]>
wifi: mt76: mt7921: add MBSSID support
Ming Yen Hsieh <[email protected]>
wifi: mt76: mt7925: add MBSSID support
Lorenzo Bianconi <[email protected]>
wifi: mt76: wed: use proper wed reference in mt76 wed driver callabacks
Felix Fietkau <[email protected]>
wifi: mt76: mt7996: fix null pointer deref in mt7996_conf_tx()
Shenghao Ding <[email protected]>
ASoC: tas2781: correct the wrong period
Herbert Xu <[email protected]>
crypto: ahash - Zero positive err value in ahash_update_finish
Herbert Xu <[email protected]>
crypto: ahash - Fix crypto_ahash_import with partial block data
Selvin Xavier <[email protected]>
RDMA/bnxt_re: Pass correct flag for dma mr creation
Selvin Xavier <[email protected]>
RDMA/bnxt_re: Fix the inline size for GenP7 devices
Gao Xiang <[email protected]>
erofs: limit the level of fs stacking for file-backed mounts
Gao Xiang <[email protected]>
erofs: correct FSDAX detection
Fangyu Yu <[email protected]>
RISC-V: KVM: Fix guest page fault within HLV* instructions
Pengjie Zhang <[email protected]>
PM / devfreq: hisi: Fix potential UAF in OPP handling
Haotian Zhang <[email protected]>
crypto: ccree - Correctly handle return of sg_nents_for_len
Haotian Zhang <[email protected]>
crypto: starfive - Correctly handle return of sg_nents_for_len
Matt Bobrowski <[email protected]>
selftests/bpf: Improve reliability of test_perf_branches_no_hw()
Matt Bobrowski <[email protected]>
selftests/bpf: skip test_perf_branches_hw() on unsupported platforms
Dan Carpenter <[email protected]>
regulator: pca9450: Fix error code in probe()
Gopi Krishna Menon <[email protected]>
usb: raw-gadget: cap raw_io transfer length to KMALLOC_MAX_SIZE
Jisheng Zhang <[email protected]>
usb: dwc2: fix hang during suspend if set as peripheral
Jisheng Zhang <[email protected]>
usb: dwc2: fix hang during shutdown if set as peripheral
Oliver Neukum <[email protected]>
usb: chaoskey: fix locking for O_NONBLOCK
Zhao Yipeng <[email protected]>
ima: Handle error code returned by ima_filter_rule_match()
Jason Tian <[email protected]>
RAS: Report all ARM processor CPER information to userspace
Seungjin Bae <[email protected]>
wifi: rtl818x: rtl8187: Fix potential buffer underflow in rtl8187_rx_cb()
Charles Mirabile <[email protected]>
clk: spacemit: Set clk_hw_onecell_data::num before using flex array
Chen Ridong <[email protected]>
cpuset: Treat cpusets in attaching as populated
Alexander Dahl <[email protected]>
net: phy: adin1100: Fix software power-down ready condition
Matt Bobrowski <[email protected]>
selftests/bpf: Use ASSERT_STRNEQ to factor in long slab cache names
Charles Keepax <[email protected]>
ASoC: SDCA: Fix missing dash in HIDE DisCo property
Cristian Ciocaltea <[email protected]>
phy: rockchip: samsung-hdptx: Prevent Inter-Pair Skew from exceeding the limits
Cristian Ciocaltea <[email protected]>
phy: rockchip: samsung-hdptx: Reduce ROPLL loop bandwidth
Cristian Ciocaltea <[email protected]>
phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode
Xiaolei Wang <[email protected]>
phy: freescale: Initialize priv->lock
Shawn Lin <[email protected]>
phy: rockchip: naneng-combphy: Fix PCIe L1ss support RK3562
Yao Zi <[email protected]>
phy: rockchip: naneng-combphy: Add SoC prefix to register definitions
Christophe JAILLET <[email protected]>
phy: renesas: rcar-gen3-usb2: Fix an error handling path in rcar_gen3_phy_usb2_probe()
Fenglin Wu <[email protected]>
leds: rgb: leds-qcom-lpg: Don't enable TRILED when configuring PWM
Yuntao Wang <[email protected]>
of/fdt: Fix incorrect use of dt_root_addr_cells in early_init_dt_check_kho()
Yuntao Wang <[email protected]>
of/fdt: Consolidate duplicate code into helper functions
Haotian Zhang <[email protected]>
mfd: mt6358-irq: Fix missing irq_domain_remove() in error path
Haotian Zhang <[email protected]>
mfd: mt6397-irq: Fix missing irq_domain_remove() in error path
Chien Wong <[email protected]>
wifi: mac80211: fix CMAC functions not handling errors
Aashish Sharma <[email protected]>
iommu/vt-d: Fix unused invalidation hint in qi_desc_iotlb
Vladimir Oltean <[email protected]>
net: phy: realtek: create rtl8211f_config_rgmii_delay()
Zilin Guan <[email protected]>
scsi: qla2xxx: Fix improper freeing of purex item
Shawn Lin <[email protected]>
scsi: ufs: rockchip: Reset controller on PRE_CHANGE of hce enable notify
Uwe Kleine-König <[email protected]>
pwm: bcm2835: Make sure the channel is enabled after pwm_request()
Leo Yan <[email protected]>
perf arm_spe: Fix memset subclass in operation
Fernando Fernandez Mancera <[email protected]>
ipv6: clear RA flags when adding a static route
Longbin Li <[email protected]>
spi: sophgo: Fix incorrect use of bus width value macros
Akhil P Oommen <[email protected]>
drm/msm/a6xx: Improve MX rail fallback in RPMH vote init
Akhil P Oommen <[email protected]>
drm/msm/a6xx: Fix the gemnoc workaround
Akhil P Oommen <[email protected]>
drm/msm/a6xx: Flush LRZ cache before PT switch
Jay Liu <[email protected]>
drm/mediatek: Fix CCORR mtk_ctm_s31_32_to_s1_n function issue
Edward Adam Davis <[email protected]>
fs/ntfs3: Prevent memory leaks in add sub record
Edward Adam Davis <[email protected]>
fs/ntfs3: out1 also needs to put mi
Ovidiu Panait <[email protected]>
net: stmmac: Fix VLAN 0 deletion in vlan_del_hw_rx_fltr()
Ritesh Harjani (IBM) <[email protected]>
powerpc/64s/ptdump: Fix kernel_hash_pagetable dump for ISA v3.00 HPTE format
Ritesh Harjani (IBM) <[email protected]>
powerpc/64s/hash: Restrict stress_hpt_struct memblock region to within RMA limit
Pu Lehui <[email protected]>
bpf: Fix invalid prog->stats access when update_effective_progs fails
Inochi Amaoto <[email protected]>
net: stmmac: dwmac-sophgo: Add phy interface filter
Inochi Amaoto <[email protected]>
net: phy: Add helper for fixing RGMII PHY mode based on internal mac delay
Abdun Nihaal <[email protected]>
wifi: rtl818x: Fix potential memory leaks in rtl8180_init_rx_ring()
Dmitry Baryshkov <[email protected]>
drm/msm/a2xx: stop over-complaining about the legacy firmware
Huiwen He <[email protected]>
drm/msm: fix missing NULL check after kcalloc in crashstate_get_bos()
Huiwen He <[email protected]>
drm/msm: Fix NULL pointer dereference in crashstate_get_vm_logs()
Guenter Roeck <[email protected]>
block/blk-throttle: Fix throttle slice time for SSDs
Alexander Stein <[email protected]>
arm64: dts: imx95-tqma9596sa: reduce maximum FlexSPI frequency to 66MHz
Markus Niebel <[email protected]>
arm64: dts: imx95-tqma9596sa: fix TPM5 pinctrl node name
Sergey Bashirov <[email protected]>
NFSD/blocklayout: Fix minlength check in proc_layoutget
Al Viro <[email protected]>
tracefs: fix a leak in eventfs_create_events_dir()
Al Viro <[email protected]>
fuse_ctl_add_conn(): fix nlink breakage in case of early failure
Haotian Zhang <[email protected]>
watchdog: starfive: Fix resource leak in probe error path
Haotian Zhang <[email protected]>
watchdog: wdat_wdt: Fix ACPI table leak in probe function
Nuno Das Neves <[email protected]>
mshv: Fix create memory region overlap check
Roman Kisel <[email protected]>
Drivers: hv: Free msginfo when the buffer fails to decrypt
Roman Kisel <[email protected]>
Drivers: hv: Allocate encrypted buffers when requested
Roman Kisel <[email protected]>
Drivers: hv: VMBus protocol version 6.0
Nuno Das Neves <[email protected]>
mshv: Fix deposit memory in MSHV_ROOT_HVCALL
Martin KaFai Lau <[email protected]>
bpf: Check skb->transport_header is set in bpf_skb_check_mtu
Alexei Starovoitov <[email protected]>
selftests/bpf: Fix failure paths in send_signal test
Menglong Dong <[email protected]>
bpf: Handle return value of ftrace_set_filter_ip in register_fentry
Sahil Chandna <[email protected]>
bpf: Prevent nesting overflow in bpf_try_get_buffers
Ilpo Järvinen <[email protected]>
PCI: Prevent resource tree corruption when BAR resize fails
Rene Rebe <[email protected]>
ps3disk: use memcpy_{from,to}_bvec index
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: drop dpu_hw_dsc_destroy() prototype
Praveen Talari <[email protected]>
arm64: dts: qcom: qrb2210-rb1: Fix UART3 wakeup IRQ storm
Aleksei Nikiforov <[email protected]>
s390/fpu: Fix false-positive kmsan report in fpu_vstl()
Zilin Guan <[email protected]>
crypto: iaa - Fix incorrect return value in save_iaa_wq()
FUKAUMI Naoki <[email protected]>
arm64: dts: rockchip: Add eeprom vcc-supply for Radxa ROCK 3C
FUKAUMI Naoki <[email protected]>
arm64: dts: rockchip: Add eeprom vcc-supply for Radxa ROCK 5A
FUKAUMI Naoki <[email protected]>
arm64: dts: rockchip: Move the EEPROM to correct I2C bus on Radxa ROCK 5A
Siddharth Vadapalli <[email protected]>
PCI: keystone: Exit ks_pcie_probe() for invalid mode
Leon Hwang <[email protected]>
bpf: Free special fields when update [lru_,]percpu_hash maps
Lizhi Hou <[email protected]>
accel/amdxdna: Fix deadlock between context destroy and job timeout
Lizhi Hou <[email protected]>
accel/amdxdna: Clear mailbox interrupt register during channel creation
Haotian Zhang <[email protected]>
leds: netxbig: Fix GPIO descriptor leak in error paths
Haotian Zhang <[email protected]>
scsi: sim710: Fix resource leak by adding missing ioport_unmap() calls
Haotian Zhang <[email protected]>
ACPI: property: Fix fwnode refcount leak in acpi_fwnode_graph_parse_endpoint()
Joseph Qi <[email protected]>
ocfs2: use correct endian in ocfs2_dinode_has_extents
Dmitry Antipov <[email protected]>
ocfs2: relax BUG() to ocfs2_error() in __ocfs2_move_extent()
Andy Shevchenko <[email protected]>
lib/vsprintf: Check pointer before dereferencing in time_and_date()
Haotian Zhang <[email protected]>
clk: renesas: r9a06g032: Fix memory leak in error path
Lad Prabhakar <[email protected]>
clk: renesas: r9a09g077: Propagate rate changes to parent clocks
Jayesh Choudhary <[email protected]>
drm/tidss: Move OLDI mode validation to OLDI bridge mode_valid hook
Jayesh Choudhary <[email protected]>
drm/tidss: Remove max_pclk_khz and min_pclk_khz from tidss display features
Namhyung Kim <[email protected]>
perf tools: Fix missing feature check for inherit + SAMPLE_READ
Leo Yan <[email protected]>
coresight: etm4x: Properly control filter in CPU idle with FEAT_TRF
Leo Yan <[email protected]>
coresight: etm4x: Add context synchronization before enabling trace
Leo Yan <[email protected]>
coresight: etm4x: Correct polling IDLE bit
Leo Yan <[email protected]>
coresight: etm3x: Always set tracer's device mode on target CPU
Leo Yan <[email protected]>
coresight: etm4x: Always set tracer's device mode on target CPU
Leo Yan <[email protected]>
coresight: Change device mode to atomic type
Zheng Qixing <[email protected]>
nbd: defer config unlock in nbd_genl_connect
Abdun Nihaal <[email protected]>
wifi: cw1200: Fix potential memory leak in cw1200_bh_rx_helper()
Long Li <[email protected]>
macintosh/mac_hid: fix race condition in mac_hid_toggle_emumouse
Christophe Leroy <[email protected]>
powerpc/32: Fix unpaired stwcx. on interrupt exit
Sourabh Jain <[email protected]>
powerpc/kdump: Fix size calculation for hot-removed memory ranges
Gautham R. Shenoy <[email protected]>
cpufreq/amd-pstate: Call cppc_set_auto_sel() only for online CPUs
Li Nan <[email protected]>
md: delete md_redundancy_group when array is becoming inactive
Bean Huo <[email protected]>
scsi: ufs: core: fix incorrect buffer duplication in ufshcd_read_string_desc()
Akash Goel <[email protected]>
drm/panthor: Fix potential memleak of vma structure
Edward Adam Davis <[email protected]>
ntfs3: init run lock for extend inode
Carl Worth <[email protected]>
coresight: tmc: add the handle of the event to the path
Jihed Chaibi <[email protected]>
ARM: dts: stm32: stm32mp157c-phycore: Fix STMPE811 touchscreen node properties
Ma Ke <[email protected]>
RDMA/rtrs: server: Fix error handling in get_or_create_srv
Manivannan Sadhasivam <[email protected]>
dt-bindings: PCI: amlogic: Fix the register name of the DBI region
Rodrigo Gobbi <[email protected]>
iio: imu: bmi270: fix dev_err_probe error msg
Johan Hovold <[email protected]>
staging: most: remove broken i2c driver
Mike McGowen <[email protected]>
scsi: smartpqi: Fix device resources accessed after device removal
Haotian Zhang <[email protected]>
scsi: stex: Fix reboot_notifier leak in probe error path
Zheng Qixing <[email protected]>
nbd: defer config put in recv_work
Xiao Ni <[email protected]>
md: avoid repeated calls to del_gendisk
Yun Zhou <[email protected]>
md: fix rcu protection in md_wakeup_thread
Xiao Ni <[email protected]>
md: delete mddev kobj before deleting gendisk kobj
Gabor Juhos <[email protected]>
regulator: core: disable supply if enabling main regulator fails
Dapeng Mi <[email protected]>
perf/x86/intel: Correct large PEBS flag check
Dapeng Mi <[email protected]>
perf/x86: Fix NULL event access and potential PEBS record loss
Pavel Begunkov <[email protected]>
io_uring: use WRITE_ONCE for user shared memory
Lizhi Hou <[email protected]>
accel/amdxdna: Fix dma_fence leak when job is canceled
Zhang Yi <[email protected]>
ext4: correct the checking of quota files before moving extents
Manish Dharanenthiran <[email protected]>
wifi: ath12k: Fix timeout error during beacon stats retrieval
Haotian Zhang <[email protected]>
mfd: da9055: Fix missing regmap_del_irq_chip() in error path
Fedor Pchelkin <[email protected]>
wifi: rtw89: usb: fix leak in rtw89_usb_write_port()
Fedor Pchelkin <[email protected]>
wifi: rtw89: usb: use common error path for skbs in rtw89_usb_rx_handler()
Wang Liang <[email protected]>
locktorture: Fix memory leak in param_set_cpumask()
Usama Arif <[email protected]>
efi/libstub: Fix page table access in 5-level to 4-level paging transition
Usama Arif <[email protected]>
x86/boot: Fix page table access in 5-level to 4-level paging transition
Xiaoqi Zhuang <[email protected]>
coresight: ETR: Fix ETR buffer use-after-free issue
Peter Zijlstra <[email protected]>
entry,unwind/deferred: Fix unwind_reset_info() placement
Jihed Chaibi <[email protected]>
ARM: dts: omap3: n900: Correct obsolete TWL4030 power compatible
Jihed Chaibi <[email protected]>
ARM: dts: omap3: beagle-xm: Correct obsolete TWL4030 power compatible
Yegor Yefremov <[email protected]>
ARM: dts: am335x-netcom-plus-2xx: add missing GPIO labels
Alan Maguire <[email protected]>
libbpf: Fix parsing of multi-split BTF
Vishwaroop A <[email protected]>
spi: tegra210-quad: Fix timeout handling
Christian Brauner <[email protected]>
cleanup: fix scoped_class()
Songtang Liu <[email protected]>
iommu/amd: Fix potential out-of-bounds read in iommu_mmio_show
Thomas Richard (TI.com) <[email protected]>
firmware: ti_sci: Set IO Isolation only if the firmware is capable
Boris Brezillon <[email protected]>
drm/panthor: Fix UAF on kernel BO VA nodes
Ketil Johnsen <[email protected]>
drm/panthor: Fix race with suspend during unplug
Ketil Johnsen <[email protected]>
drm/panthor: Fix UAF race between device unplug and FW event processing
Boris Brezillon <[email protected]>
drm/panthor: Fix group_free_queue() for partially initialized queues
Boris Brezillon <[email protected]>
drm/panthor: Handle errors returned by drm_sched_entity_init()
Tingmao Wang <[email protected]>
fs/9p: Don't open remote file with APPEND mode when writeback cache is used
Mike Christie <[email protected]>
scsi: target: Fix LUN/device R/W and total command stats
Bart Van Assche <[email protected]>
scsi: target: Do not write NUL characters into ASCII configfs output
Ahelenia Ziemiańska <[email protected]>
power: supply: apm_power: only unset own apm_get_power_status
Ivan Abramov <[email protected]>
power: supply: wm831x: Check wm831x_set_bits() return value
Murad Masimov <[email protected]>
power: supply: rt9467: Prevent using uninitialized local variable in rt9467_set_value_from_ranges()
Ivan Abramov <[email protected]>
power: supply: rt9467: Return error on failure in rt9467_set_value_from_ranges()
Ivan Abramov <[email protected]>
power: supply: max17040: Check iio_read_channel_processed() return code
Ivan Abramov <[email protected]>
power: supply: cw2015: Check devm_delayed_work_autocancel() return code
Haotian Zhang <[email protected]>
power: supply: rt5033_charger: Fix device node reference leaks
Frederic Weisbecker <[email protected]>
timers/migration: Fix imbalanced NUMA trees
Frederic Weisbecker <[email protected]>
timers/migration: Remove locking on group connection
Frederic Weisbecker <[email protected]>
timers/migration: Convert "while" loops to use "for"
Shuai Xue <[email protected]>
perf record: skip synthesize event when open evsel failed
Namhyung Kim <[email protected]>
perf lock contention: Load kernel map before lookup
Geert Uytterhoeven <[email protected]>
drm/imagination: Fix reference to devm_platform_get_and_ioremap_resource()
Marek Vasut <[email protected]>
arm64: dts: renesas: sparrow-hawk: Fix full-size DP connector node name and labels
Kuan-Wei Chiu <[email protected]>
interconnect: debugfs: Fix incorrect error handling for NULL path
Lizhi Hou <[email protected]>
accel/amdxdna: Fix incorrect command state for timed out job
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8996: add interconnect paths to USB2 controller
Dmitry Baryshkov <[email protected]>
interconnect: qcom: msm8996: add missing link to SLAVE_USB_HS
Rameshkumar Sundaram <[email protected]>
wifi: ath12k: unassign arvif on scan vdev create failure
Baochen Qiang <[email protected]>
wifi: ath12k: fix error handling in creating hardware group
Baochen Qiang <[email protected]>
wifi: ath12k: fix reusing m3 memory
Abdun Nihaal <[email protected]>
wifi: ath12k: fix potential memory leak in ath12k_wow_arp_ns_offload()
Jacob Keller <[email protected]>
docs: kdoc: fix duplicate section warning message
Arnd Bergmann <[email protected]>
random: use offstack cpumask when necessary
Stanley Chu <[email protected]>
i3c: master: svc: Prevent incomplete IBI transaction
Frank Li <[email protected]>
i3c: fix refcount inconsistency in i3c_master_register
Christian Brauner <[email protected]>
pidfs: add missing BUILD_BUG_ON() assert on struct pidfd_info
Christian Brauner <[email protected]>
pidfs: add missing PIDFD_INFO_SIZE_VER1
Tomasz Rusinowicz <[email protected]>
accel/ivpu: Fix race condition when unbinding BOs
Danilo Krummrich <[email protected]>
drm: nova: select NOVA_CORE
Haotian Zhang <[email protected]>
pinctrl: stm32: fix hwspinlock resource leak in probe function
Haotian Zhang <[email protected]>
soc: qcom: smem: fix hwspinlock resource leak in probe error paths
Taniya Das <[email protected]>
clk: qcom: gcc-qcs615: Update the SDCC clock to use shared_floor_ops
Benjamin Berg <[email protected]>
tools/nolibc/dirent: avoid errno in readdir_r
Benjamin Berg <[email protected]>
tools/nolibc/stdio: let perror work when NOLIBC_IGNORE_ERRNO is set
Sebastian Reichel <[email protected]>
media: ov02c10: Fix default vertical flip
Maciej Falkowski <[email protected]>
accel/ivpu: Remove skip of dma unmap for imported buffers
Tengda Wu <[email protected]>
x86/dumpstack: Prevent KASAN false positive warnings in __show_regs()
Peter Zijlstra <[email protected]>
task_work: Fix NMI race condition
Zhang Rui <[email protected]>
perf/x86/intel/cstate: Remove PC3 support from LunarLake
Arnaud Lecomte <[email protected]>
bpf: Fix stackmap overflow check in __bpf_get_stackid()
Arnaud Lecomte <[email protected]>
bpf: Refactor stack map trace depth calculation into helper function
Josh Poimboeuf <[email protected]>
perf: Remove get_perf_callchain() init_nr argument
Haotian Zhang <[email protected]>
mtd: rawnand: lpc32xx_slc: fix GPIO descriptor leak on probe error and remove
Aryan Srivastava <[email protected]>
mtd: nand: relax ECC parameter validation check
Aryan Srivastava <[email protected]>
Revert "mtd: rawnand: marvell: fix layouts"
Li Qiang <[email protected]>
wifi: iwlwifi: mld: add null check for kzalloc() in iwl_mld_send_proto_offload()
Alex Deucher <[email protected]>
drm/amdgpu/userq: fix SDMA and compute validation
Prike Liang <[email protected]>
drm/amdgpu: add userq object va track helpers
Wolfram Sang <[email protected]>
ARM: dts: renesas: r9a06g032-rzn1d400-db: Drop invalid #cells properties
Wolfram Sang <[email protected]>
ARM: dts: renesas: gose: Remove superfluous port property
Zhu Yanjun <[email protected]>
RDMA/rxe: Fix null deref on srq->rq.queue after resize failure
Loic Poulain <[email protected]>
arm64: dts: qcom: qcm2290: Fix camss register prop ordering
Loic Poulain <[email protected]>
arm64: dts: qcom: qcm2290: Add CCI node
Kuniyuki Iwashima <[email protected]>
sctp: Defer SCTP_DBG_OBJCNT_DEC() to sctp_destroy_sock().
Horatiu Vultur <[email protected]>
phy: mscc: Fix PTP for VSC8574 and VSC8572
Michal Suchanek <[email protected]>
perf hwmon_pmu: Fix uninitialized variable warning
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sdm845-starqltechn: Fix i2c-gpio node name
Alexander Martinz <[email protected]>
arm64: dts: qcom: qcm6490-shift-otter: Add missing reserved-memory
Neil Armstrong <[email protected]>
arm64: dts: qcom: sm8650: set ufs as dma coherent
Luca Weiss <[email protected]>
arm64: dts: qcom: qcm6490-fairphone-fp5: Add supplies to simple-fb node
Gergo Koteles <[email protected]>
arm64: dts: qcom: sdm845-oneplus: Correct gpio used for slider
Dzmitry Sankouski <[email protected]>
arm64: dts: qcom: sdm845-starqltechn: fix max77705 interrupts
Eric Gonçalves <[email protected]>
arm64: dts: qcom: starqltechn: remove extra empty line
Dzmitry Sankouski <[email protected]>
arm64: dts: qcom: sdm845-starqltechn: remove (address|size)-cells
Krishna Kurapati <[email protected]>
arm64: dts: qcom: x1e80100: Add missing quirk for HS only USB controller
Krishna Kurapati <[email protected]>
arm64: dts: qcom: x1e80100: Fix compile warnings for USB HS controller
Peng Fan <[email protected]>
firmware: imx: scu-irq: fix OF node leak in
Randolph Sapp <[email protected]>
arm64: dts: ti: k3-am62p: Fix memory ranges for GPU
Bhanu Seshu Kumar Valluri <[email protected]>
PCI: endpoint: pci-epf-test: Fix sleeping function being called from atomic context
Thomas Richard <[email protected]>
leds: upboard: Fix module alias
Baochen Qiang <[email protected]>
wifi: ath12k: restore register window after global reset
Len Brown <[email protected]>
tools/power turbostat: Regression fix Uncore MHz printed in hex
Heiko Carstens <[email protected]>
s390/ap: Don't leak debug feature files if AP instructions are not available
Bart Van Assche <[email protected]>
scsi: ufs: core: Move the ufshcd_enable_intr() declaration
Heiko Carstens <[email protected]>
s390/smp: Fix fallback CPU detection
Baochen Qiang <[email protected]>
wifi: ath11k: fix peer HE MCS assignment
Baochen Qiang <[email protected]>
wifi: ath11k: fix VHT MCS assignment
nieweiqiang <[email protected]>
crypto: hisilicon/qm - restore original qos values
Thorsten Blum <[email protected]>
crypto: asymmetric_keys - prevent overflow in asymmetric_key_generate_id
Haotian Zhang <[email protected]>
soc: qcom: gsbi: fix double disable caused by devm
Luca Weiss <[email protected]>
clk: qcom: camcc-sm7150: Fix PLL config of PLL2
Luca Weiss <[email protected]>
clk: qcom: camcc-sm6350: Fix PLL config of PLL2
Luo Jie <[email protected]>
clk: qcom: gcc-ipq5424: Correct the icc_first_node_id
Taniya Das <[email protected]>
clk: qcom: gcc-sm8750: Add a new frequency for sdcc2 clock
Konrad Dybcio <[email protected]>
clk: qcom: rpmh: Define RPMH_IPA_CLK on QCS615
Vladimir Zapolskiy <[email protected]>
clk: qcom: camcc-sm6350: Specify Titan GDSC power domain as a parent to other
Vladimir Zapolskiy <[email protected]>
clk: qcom: camcc-sm8550: Specify Titan GDSC power domain as a parent to other
Sherry Sun <[email protected]>
tty: serial: imx: Only configure the wake register when device is set as wakeup source
Jiri Slaby (SUSE) <[email protected]>
tty: introduce tty_port_tty guard()
Li Qiang <[email protected]>
uio: uio_fsl_elbc_gpcm:: Add null pointer check to uio_fsl_elbc_gpcm_probe
Geert Uytterhoeven <[email protected]>
PCI: rcar-gen2: Drop ARM dependency from PCI_RCAR_GEN2
Peter Griffin <[email protected]>
arm64: dts: exynos: gs101: fix sysreg_apm reg property
Tianyou Li <[email protected]>
perf annotate: Check return value of evsel__get_arch() properly
Joy Zou <[email protected]>
arm64: dts: imx95-15x15-evk: add fan-supply property for pwm-fan
Tim Harvey <[email protected]>
arm64: dts: imx8mp-venice-gw702x: remove off-board sdhc1
Tim Harvey <[email protected]>
arm64: dts: imx8mp-venice-gw702x: remove off-board uart
Tim Harvey <[email protected]>
arm64: dts: imx8mm-venice-gw72xx: remove unused sdhc1 pinctrl
Tim Harvey <[email protected]>
arm64: dts: freescale: imx8mp-venice-gw7905-2x: remove duplicate usdhc1 props
Bart Van Assche <[email protected]>
block/mq-deadline: Switch back to a single dispatch list
Bart Van Assche <[email protected]>
block/mq-deadline: Introduce dd_start_request()
T Pratham <[email protected]>
crypto: aead - Fix reqsize handling
Randy Dunlap <[email protected]>
firmware: qcom: tzmem: fix qcom_tzmem_policy kernel-doc
Francesco Lavra <[email protected]>
iio: imu: st_lsm6dsx: Fix measurement unit for odr struct member
Xuanqiang Luo <[email protected]>
inet: Avoid ehash lookup race in inet_twsk_hashdance_schedule()
Xuanqiang Luo <[email protected]>
inet: Avoid ehash lookup race in inet_ehash_insert()
Xuanqiang Luo <[email protected]>
rculist: Add hlist_nulls_replace_rcu() and hlist_nulls_replace_init_rcu()
Konrad Dybcio <[email protected]>
clk: qcom: gcc-x1e80100: Add missing USB4 clocks/resets
Konrad Dybcio <[email protected]>
dt-bindings: clock: qcom,x1e80100-gcc: Add missing USB4 clocks/resets
Sidharth Seela <[email protected]>
ntfs3: Fix uninit buffer allocated by __getname()
Raphael Pinsonneault-Thibeault <[email protected]>
ntfs3: fix uninit memory after failed mi_read in mi_format_new
Herbert Xu <[email protected]>
crypto: authenc - Correctly pass EINPROGRESS back up to the caller
Johan Hovold <[email protected]>
irqchip/qcom-irq-combiner: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/starfive-jh8100: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/renesas-rzg2l: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/imx-mu-msi: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/irq-brcmstb-l2: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/irq-bcm7120-l2: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/irq-bcm7038-l1: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/bcm2712-mip: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/bcm2712-mip: Fix OF node reference imbalance
Fernand Sieber <[email protected]>
sched/fair: Forfeit vruntime on yield
Pradeep Kumar Chitrapu <[email protected]>
wifi: ath12k: fix TX and RX MCS rate configurations in HE mode
Baochen Qiang <[email protected]>
wifi: ath12k: fix VHT MCS assignment
Sarika Sharma <[email protected]>
wifi: ath12k: Fix MSDU buffer types handling in RX error path
Baochen Qiang <[email protected]>
wifi: ath11k: restore register window after global reset
Kang Yang <[email protected]>
wifi: ath10k: move recovery check logic into a new work
Ian Rogers <[email protected]>
perf parse-events: Fix legacy cache events if event is duplicated in a PMU
Wludzik, Jozef <[email protected]>
accel/ivpu: Fix race condition when mapping dmabuf
Josh Poimboeuf <[email protected]>
objtool: Fix weak symbol detection
Dylan Hatch <[email protected]>
objtool: Fix standalone --hacks=jump_label
Peng Fan <[email protected]>
remoteproc: imx_rproc: Fix runtime PM cleanup and improve remove path
Mavroudis Chatzilazaridis <[email protected]>
HID: logitech-hidpp: Do not assume FAP in hidpp_send_message_sync()
Cyrille Pitchen <[email protected]>
drm: atmel-hlcdc: fix atmel_xlcdc_plane_setup_scaler()
Marek Vasut <[email protected]>
clk: renesas: cpg-mssr: Read back reset registers to assure values latched
Marek Vasut <[email protected]>
clk: renesas: cpg-mssr: Add missing 1ms delay into reset toggle callback
Biju Das <[email protected]>
pinctrl: renesas: rzg2l: Fix PMC restore
Roberto Sassu <[email protected]>
ima: Attach CREDS_CHECK IMA hook to bprm_creds_from_file LSM hook
Ian Rogers <[email protected]>
perf bpf_counter: Fix opening of "any"(-1) CPU events
Seungjin Bae <[email protected]>
USB: Fix descriptor count when handling invalid MBIM extended descriptor
Thomas Weißschuh <[email protected]>
tools/nolibc: handle NULL wstatus argument to waitpid()
Siddharth Chintamaneni <[email protected]>
bpf: Cleanup unused func args in rqspinlock implementation
Janusz Krzysztofik <[email protected]>
drm/vgem-fence: Fix potential deadlock on release
Karol Wachowski <[email protected]>
accel/ivpu: Fix DCT active percent format
Jacek Lawrynowicz <[email protected]>
accel/ivpu: Make function parameter names consistent
Jacek Lawrynowicz <[email protected]>
accel/ivpu: Fix page fault in ivpu_bo_unbind_all_bos_from_context()
Jacek Lawrynowicz <[email protected]>
accel/ivpu: Rework bind/unbind of imported buffers
Guido Günther <[email protected]>
drm/panel: visionox-rm69299: Don't clear all mode flags
Guido Günther <[email protected]>
drm/panel: visionox-rm69299: Fix clock frequency for SHIFT6mq
Karol Wachowski <[email protected]>
accel/ivpu: Ensure rpm_runtime_put in case of engine reset/resume fail
Mainak Sen <[email protected]>
gpu: host1x: Fix race in syncpt alloc/free
Konstantin Andreev <[email protected]>
smack: fix bug: setting task label silently ignores input garbage
Konstantin Andreev <[email protected]>
smack: fix bug: unprivileged task can create labels
Konstantin Andreev <[email protected]>
smack: fix bug: invalid label of unix socket file
Konstantin Andreev <[email protected]>
smack: always "instantiate" inode in smack_inode_init_security()
Konstantin Andreev <[email protected]>
smack: deduplicate xattr setting in smack_inode_init_security()
Konstantin Andreev <[email protected]>
smack: fix bug: SMACK64TRANSMUTE set on non-directory
Konstantin Andreev <[email protected]>
smack: deduplicate "does access rule request transmutation"
-------------
Diffstat:
Documentation/admin-guide/LSM/Smack.rst | 16 +- .../bindings/clock/qcom,x1e80100-gcc.yaml | 62 +- .../devicetree/bindings/pci/amlogic,axg-pcie.yaml | 6 +- Documentation/hwmon/g762.rst | 2 +- Makefile | 4 +- arch/arm/boot/dts/renesas/r8a7793-gose.dts | 1 - .../arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts | 2 - arch/arm/boot/dts/samsung/exynos4210-i9100.dts | 1 + arch/arm/boot/dts/samsung/exynos4210-trats.dts | 1 + .../boot/dts/samsung/exynos4210-universal_c210.dts | 1 + arch/arm/boot/dts/samsung/exynos4412-midas.dtsi | 1 + .../dts/st/stm32mp157c-phycore-stm32mp15-som.dtsi | 8 +- .../boot/dts/ti/omap/am335x-netcom-plus-2xx.dts | 8 +- arch/arm/boot/dts/ti/omap/omap3-beagle-xm.dts | 2 +- arch/arm/boot/dts/ti/omap/omap3-n900.dts | 2 +- arch/arm/include/asm/word-at-a-time.h | 10 +- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 4 +- .../boot/dts/freescale/imx8mm-venice-gw72xx.dtsi | 11 - .../boot/dts/freescale/imx8mp-venice-gw702x.dtsi | 51 -- .../boot/dts/freescale/imx8mp-venice-gw72xx.dtsi | 11 - arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts | 1 + .../arm64/boot/dts/freescale/imx95-tqma9596sa.dtsi | 4 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 3 + arch/arm64/boot/dts/qcom/qcm2290.dtsi | 60 +- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 2 + arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts | 5 + arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 2 +- .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 +- .../boot/dts/qcom/sdm845-samsung-starqltechn.dts | 17 +- arch/arm64/boot/dts/qcom/sm8650.dtsi | 2 + arch/arm64/boot/dts/qcom/x1e80100.dtsi | 12 +- .../boot/dts/renesas/r8a779g3-sparrow-hawk.dts | 6 +- arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts | 1 + arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 15 +- arch/arm64/boot/dts/ti/k3-am62p.dtsi | 2 +- arch/powerpc/kernel/entry_32.S | 10 +- arch/powerpc/kexec/ranges.c | 2 +- arch/powerpc/mm/book3s64/hash_utils.c | 10 +- arch/powerpc/mm/ptdump/hashpagetable.c | 6 + arch/riscv/kvm/vcpu_insn.c | 22 + arch/s390/include/asm/fpu-insn.h | 3 + arch/s390/kernel/smp.c | 1 + arch/um/Makefile | 12 +- arch/x86/boot/compressed/pgtable_64.c | 11 +- arch/x86/events/core.c | 5 +- arch/x86/events/intel/core.c | 7 +- arch/x86/events/intel/cstate.c | 3 +- arch/x86/kernel/dumpstack.c | 23 +- block/blk-lib.c | 6 +- block/blk-mq.c | 35 +- block/blk-throttle.c | 9 +- block/mq-deadline.c | 129 ++-- crypto/aead.c | 1 + crypto/ahash.c | 18 +- crypto/asymmetric_keys/asymmetric_type.c | 12 +- crypto/authenc.c | 75 ++- drivers/accel/amdxdna/aie2_ctx.c | 22 +- drivers/accel/amdxdna/amdxdna_ctx.c | 1 + drivers/accel/amdxdna/amdxdna_ctx.h | 1 + drivers/accel/amdxdna/amdxdna_mailbox.c | 1 + drivers/accel/ivpu/ivpu_fw.h | 2 +- drivers/accel/ivpu/ivpu_gem.c | 97 ++- drivers/accel/ivpu/ivpu_gem.h | 2 +- drivers/accel/ivpu/ivpu_hw_btrs.c | 2 +- drivers/accel/ivpu/ivpu_hw_btrs.h | 2 +- drivers/accel/ivpu/ivpu_job.c | 6 +- drivers/accel/ivpu/ivpu_pm.c | 9 +- drivers/acpi/apei/ghes.c | 27 +- drivers/acpi/processor_core.c | 2 +- drivers/acpi/property.c | 1 + drivers/base/firmware_loader/Kconfig | 2 +- drivers/block/nbd.c | 5 +- drivers/block/ps3disk.c | 4 + drivers/block/ublk_drv.c | 4 +- drivers/char/random.c | 19 +- drivers/clk/Makefile | 3 +- drivers/clk/qcom/camcc-sm6350.c | 13 +- drivers/clk/qcom/camcc-sm7150.c | 6 +- drivers/clk/qcom/camcc-sm8550.c | 10 + drivers/clk/qcom/clk-rpmh.c | 1 + drivers/clk/qcom/gcc-ipq5424.c | 3 +- drivers/clk/qcom/gcc-qcs615.c | 6 +- drivers/clk/qcom/gcc-sm8750.c | 1 + drivers/clk/qcom/gcc-x1e80100.c | 698 ++++++++++++++++++++- drivers/clk/renesas/r9a06g032-clocks.c | 6 +- drivers/clk/renesas/r9a09g077-cpg.c | 4 +- drivers/clk/renesas/renesas-cpg-mssr.c | 57 +- drivers/clk/spacemit/ccu-k1.c | 4 +- drivers/clocksource/timer-nxp-stm.c | 23 +- drivers/clocksource/timer-ralink.c | 11 +- drivers/cpufreq/amd-pstate.c | 2 +- drivers/crypto/ccree/cc_buffer_mgr.c | 6 +- drivers/crypto/hisilicon/qm.c | 14 +- drivers/crypto/intel/iaa/iaa_crypto_main.c | 2 +- drivers/crypto/starfive/jh7110-hash.c | 6 +- drivers/devfreq/hisi_uncore_freq.c | 3 +- drivers/firmware/efi/cper-arm.c | 52 +- drivers/firmware/efi/cper.c | 60 ++ drivers/firmware/efi/libstub/x86-5lvl.c | 4 +- drivers/firmware/imx/imx-scu-irq.c | 4 +- drivers/firmware/stratix10-svc.c | 1 + drivers/firmware/ti_sci.c | 21 +- drivers/firmware/ti_sci.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 44 +- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 12 +- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 31 +- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 46 +- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 8 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 27 +- drivers/gpu/drm/drm_plane.c | 8 +- drivers/gpu/drm/i915/display/intel_fbdev.c | 43 +- drivers/gpu/drm/i915/display/intel_fbdev_fb.c | 42 +- drivers/gpu/drm/i915/display/intel_fbdev_fb.h | 8 +- drivers/gpu/drm/imagination/pvr_device.c | 2 +- drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 23 +- drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 34 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 10 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h | 6 - drivers/gpu/drm/msm/msm_gpu.c | 21 +- .../gpu/drm/nouveau/dispnv04/nouveau_i2c_encoder.c | 20 - .../drm/nouveau/include/dispnv04/i2c/encoder_i2c.h | 19 +- drivers/gpu/drm/nouveau/nouveau_fence.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 2 +- drivers/gpu/drm/nova/Kconfig | 1 + drivers/gpu/drm/panel/panel-visionox-rm69299.c | 4 +- drivers/gpu/drm/panthor/panthor_device.c | 4 +- drivers/gpu/drm/panthor/panthor_gem.c | 20 +- drivers/gpu/drm/panthor/panthor_mmu.c | 18 +- drivers/gpu/drm/panthor/panthor_sched.c | 44 +- drivers/gpu/drm/tidss/tidss_dispc.c | 93 ++- drivers/gpu/drm/tidss/tidss_dispc.h | 3 - drivers/gpu/drm/tidss/tidss_drv.h | 2 + drivers/gpu/drm/tidss/tidss_oldi.c | 22 + drivers/gpu/drm/vgem/vgem_fence.c | 2 +- drivers/gpu/drm/xe/display/intel_fbdev_fb.c | 32 +- drivers/gpu/host1x/syncpt.c | 4 +- drivers/greybus/gb-beagleplay.c | 12 +- drivers/hid/hid-logitech-hidpp.c | 9 +- drivers/hv/channel.c | 73 ++- drivers/hv/hyperv_vmbus.h | 5 +- drivers/hv/mshv_root_main.c | 89 ++- drivers/hv/ring_buffer.c | 5 +- drivers/hv/vmbus_drv.c | 12 + drivers/hwmon/sy7636a-hwmon.c | 7 +- drivers/hwtracing/coresight/coresight-etm-perf.c | 1 + drivers/hwtracing/coresight/coresight-etm3x-core.c | 59 +- drivers/hwtracing/coresight/coresight-etm4x-core.c | 103 ++- drivers/hwtracing/coresight/coresight-etm4x.h | 3 - drivers/hwtracing/coresight/coresight-tmc-etr.c | 10 +- drivers/i2c/busses/i2c-k1.c | 19 +- drivers/i3c/master.c | 8 +- drivers/i3c/master/svc-i3c-master.c | 22 +- drivers/iio/imu/bmi270/bmi270_spi.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 +- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 8 +- drivers/infiniband/hw/bnxt_re/qplib_sp.c | 8 +- drivers/infiniband/hw/bnxt_re/qplib_sp.h | 2 +- drivers/infiniband/hw/irdma/cm.c | 2 +- drivers/infiniband/hw/irdma/ctrl.c | 3 + drivers/infiniband/hw/irdma/main.h | 2 +- drivers/infiniband/hw/irdma/pble.c | 6 +- drivers/infiniband/hw/irdma/verbs.c | 15 +- drivers/infiniband/hw/irdma/verbs.h | 3 +- drivers/infiniband/sw/rxe/rxe_srq.c | 7 +- drivers/infiniband/ulp/rtrs/rtrs-srv.c | 2 +- drivers/interconnect/debugfs-client.c | 7 +- drivers/interconnect/qcom/msm8996.c | 1 + drivers/iommu/amd/debugfs.c | 2 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 27 +- drivers/iommu/intel/iommu.h | 2 +- drivers/irqchip/irq-bcm2712-mip.c | 3 +- drivers/irqchip/irq-bcm7038-l1.c | 8 +- drivers/irqchip/irq-bcm7120-l2.c | 17 +- drivers/irqchip/irq-brcmstb-l2.c | 12 +- drivers/irqchip/irq-imx-mu-msi.c | 14 +- drivers/irqchip/irq-mchp-eic.c | 2 +- drivers/irqchip/irq-renesas-rzg2l.c | 6 +- drivers/irqchip/irq-starfive-jh8100-intc.c | 3 +- drivers/irqchip/qcom-irq-combiner.c | 2 +- drivers/leds/leds-netxbig.c | 36 +- drivers/leds/leds-upboard.c | 2 +- drivers/leds/rgb/leds-qcom-lpg.c | 4 +- drivers/macintosh/mac_hid.c | 3 +- drivers/md/dm-log-writes.c | 1 + drivers/md/dm-raid.c | 2 + drivers/md/md.c | 23 +- drivers/md/md.h | 9 +- drivers/md/raid5.c | 6 +- drivers/media/i2c/ov02c10.c | 2 +- drivers/mfd/da9055-core.c | 1 + drivers/mfd/mt6358-irq.c | 1 + drivers/mfd/mt6397-irq.c | 1 + drivers/misc/rp1/rp1_pci.c | 3 + drivers/mtd/lpddr/lpddr_cmds.c | 8 +- drivers/mtd/nand/raw/lpc32xx_slc.c | 2 + drivers/mtd/nand/raw/marvell_nand.c | 13 +- drivers/mtd/nand/raw/nand_base.c | 13 +- drivers/mtd/nand/raw/renesas-nand-controller.c | 5 +- drivers/net/dsa/b53/b53_common.c | 331 ++++++---- drivers/net/dsa/b53/b53_priv.h | 111 +++- drivers/net/dsa/b53/b53_regs.h | 41 +- drivers/net/dsa/xrs700x/xrs700x.c | 11 + drivers/net/ethernet/intel/iavf/iavf_ptp.c | 7 + drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c | 20 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c | 3 +- drivers/net/phy/adin1100.c | 2 +- drivers/net/phy/aquantia/aquantia_firmware.c | 2 +- drivers/net/phy/mscc/mscc_main.c | 6 +- drivers/net/phy/phy-core.c | 43 ++ drivers/net/phy/realtek/realtek_main.c | 65 +- drivers/net/wireless/ath/ath10k/core.c | 20 +- drivers/net/wireless/ath/ath10k/core.h | 2 +- drivers/net/wireless/ath/ath10k/mac.c | 2 +- drivers/net/wireless/ath/ath11k/mac.c | 8 +- drivers/net/wireless/ath/ath11k/pci.c | 20 +- drivers/net/wireless/ath/ath11k/wmi.c | 20 +- drivers/net/wireless/ath/ath11k/wmi.h | 2 + drivers/net/wireless/ath/ath12k/core.c | 24 +- drivers/net/wireless/ath/ath12k/core.h | 1 - drivers/net/wireless/ath/ath12k/dp_rx.c | 70 ++- drivers/net/wireless/ath/ath12k/hal_rx.c | 10 +- drivers/net/wireless/ath/ath12k/mac.c | 16 +- drivers/net/wireless/ath/ath12k/pci.c | 20 +- drivers/net/wireless/ath/ath12k/qmi.c | 11 +- drivers/net/wireless/ath/ath12k/qmi.h | 5 +- drivers/net/wireless/ath/ath12k/wmi.c | 23 +- drivers/net/wireless/ath/ath12k/wmi.h | 2 + drivers/net/wireless/ath/ath12k/wow.c | 1 + drivers/net/wireless/intel/iwlwifi/mld/d3.c | 4 + drivers/net/wireless/mediatek/mt76/mt76.h | 9 + drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 +- .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 25 + drivers/net/wireless/mediatek/mt76/mt7925/main.c | 1 + drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 23 +- drivers/net/wireless/mediatek/mt76/mt792x_core.c | 7 +- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 95 ++- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 34 +- drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 1 + drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 9 +- drivers/net/wireless/mediatek/mt76/wed.c | 10 +- drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 9 +- drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 27 +- drivers/net/wireless/realtek/rtw89/usb.c | 13 +- drivers/net/wireless/st/cw1200/bh.c | 6 +- drivers/nvme/host/auth.c | 2 +- drivers/of/fdt.c | 57 +- drivers/of/of_kunit_helpers.c | 5 +- drivers/pci/controller/Kconfig | 7 +- drivers/pci/controller/dwc/pci-keystone.c | 2 + drivers/pci/controller/dwc/pcie-designware.h | 2 +- drivers/pci/endpoint/functions/pci-epf-test.c | 5 +- drivers/pci/setup-bus.c | 5 + drivers/phy/freescale/phy-fsl-imx8qm-hsio.c | 5 +- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 20 +- drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 530 ++++++++-------- drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 27 +- drivers/pinctrl/pinctrl-single.c | 7 +- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 6 +- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- drivers/platform/x86/asus-wmi.c | 8 +- drivers/platform/x86/intel/pmc/core.h | 2 +- drivers/power/supply/apm_power.c | 3 +- drivers/power/supply/cw2015_battery.c | 8 +- drivers/power/supply/max17040_battery.c | 6 +- drivers/power/supply/rt5033_charger.c | 2 + drivers/power/supply/rt9467-charger.c | 6 +- drivers/power/supply/wm831x_power.c | 10 +- drivers/pwm/pwm-bcm2835.c | 28 +- drivers/ras/ras.c | 40 +- drivers/regulator/core.c | 37 +- drivers/regulator/fixed.c | 11 +- drivers/regulator/pca9450-regulator.c | 7 +- drivers/remoteproc/imx_rproc.c | 9 +- drivers/remoteproc/qcom_q6v5_wcss.c | 8 +- drivers/rtc/rtc-amlogic-a4.c | 4 - drivers/rtc/rtc-gamecube.c | 4 + drivers/rtc/rtc-max31335.c | 6 +- drivers/s390/crypto/ap_bus.c | 8 +- drivers/scsi/imm.c | 1 + drivers/scsi/qla2xxx/qla_nvme.c | 2 +- drivers/scsi/sim710.c | 2 + drivers/scsi/smartpqi/smartpqi_init.c | 19 + drivers/scsi/stex.c | 1 + drivers/soc/qcom/qcom_gsbi.c | 8 - drivers/soc/qcom/smem.c | 3 +- drivers/spi/spi-airoha-snfi.c | 25 +- drivers/spi/spi-ch341.c | 2 +- drivers/spi/spi-sg2044-nor.c | 4 +- drivers/spi/spi-tegra210-quad.c | 22 +- drivers/staging/fbtft/fbtft-core.c | 4 +- drivers/staging/most/Kconfig | 2 - drivers/staging/most/Makefile | 1 - drivers/staging/most/i2c/Kconfig | 13 - drivers/staging/most/i2c/Makefile | 4 - drivers/staging/most/i2c/i2c.c | 374 ----------- drivers/target/target_core_configfs.c | 1 - drivers/target/target_core_stat.c | 24 +- drivers/tty/serial/imx.c | 14 + drivers/ufs/core/ufshcd-priv.h | 2 + drivers/ufs/core/ufshcd.c | 2 +- drivers/ufs/host/ufs-rockchip.c | 19 +- drivers/uio/uio_fsl_elbc_gpcm.c | 7 + drivers/usb/core/message.c | 2 +- drivers/usb/dwc2/platform.c | 17 +- drivers/usb/dwc3/host.c | 5 +- drivers/usb/gadget/legacy/raw_gadget.c | 3 + drivers/usb/gadget/udc/tegra-xudc.c | 6 - drivers/usb/misc/chaoskey.c | 16 +- drivers/usb/phy/phy.c | 4 + drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c | 2 + drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- drivers/vdpa/pds/vdpa_dev.c | 2 +- drivers/vfio/pci/vfio_pci_core.c | 68 +- drivers/vfio/pci/vfio_pci_intrs.c | 52 +- drivers/vfio/pci/vfio_pci_priv.h | 4 + drivers/vhost/net.c | 12 +- drivers/vhost/vhost.c | 4 +- drivers/video/backlight/led_bl.c | 13 + drivers/video/fbdev/ssd1307fb.c | 4 +- drivers/virtio/virtio.c | 12 +- drivers/virtio/virtio_debug.c | 10 +- drivers/virtio/virtio_pci_modern_dev.c | 6 +- drivers/virtio/virtio_vdpa.c | 2 +- drivers/watchdog/starfive-wdt.c | 4 +- drivers/watchdog/wdat_wdt.c | 64 +- fs/9p/v9fs.c | 4 +- fs/9p/vfs_file.c | 11 +- fs/9p/vfs_inode.c | 3 +- fs/9p/vfs_inode_dotl.c | 2 +- fs/btrfs/block-group.c | 6 +- fs/btrfs/ctree.c | 2 +- fs/btrfs/delayed-ref.c | 43 +- fs/btrfs/space-info.c | 22 +- fs/btrfs/space-info.h | 6 +- fs/erofs/super.c | 38 +- fs/ext4/mballoc.c | 49 +- fs/ext4/move_extent.c | 2 +- fs/f2fs/f2fs.h | 2 + fs/f2fs/gc.c | 132 ++-- fs/f2fs/recovery.c | 2 +- fs/f2fs/segment.c | 38 +- fs/f2fs/segment.h | 8 +- fs/f2fs/super.c | 14 + fs/f2fs/sysfs.c | 7 + fs/fuse/control.c | 19 +- fs/gfs2/glock.c | 5 +- fs/gfs2/inode.c | 15 + fs/gfs2/inode.h | 1 + fs/gfs2/ops_fstype.c | 2 +- fs/iomap/direct-io.c | 13 +- fs/kernfs/dir.c | 5 +- fs/nfs/client.c | 21 +- fs/nfs/dir.c | 27 +- fs/nfs/internal.h | 3 +- fs/nfs/namespace.c | 11 +- fs/nfs/nfs4client.c | 18 +- fs/nfs/nfs4proc.c | 27 +- fs/nfs/pnfs.c | 1 + fs/nfs/super.c | 33 +- fs/nfsd/blocklayout.c | 4 +- fs/nls/nls_base.c | 27 +- fs/ntfs3/frecord.c | 8 +- fs/ntfs3/fsntfs.c | 9 +- fs/ntfs3/inode.c | 2 + fs/ocfs2/alloc.c | 1 - fs/ocfs2/inode.c | 10 +- fs/ocfs2/move_extents.c | 8 +- fs/pidfs.c | 2 + fs/smb/client/cifssmb.c | 2 +- fs/smb/client/smb2pdu.c | 2 +- fs/tracefs/event_inode.c | 3 +- include/asm-generic/mshyperv.h | 17 +- include/asm-generic/rqspinlock.h | 60 +- include/dt-bindings/clock/qcom,x1e80100-gcc.h | 61 ++ include/hyperv/hvgdk_mini.h | 1 + include/linux/blk_types.h | 5 +- include/linux/cleanup.h | 15 +- include/linux/coresight.h | 35 +- include/linux/cper.h | 12 +- include/linux/f2fs_fs.h | 5 +- include/linux/filter.h | 12 +- include/linux/firmware/qcom/qcom_tzmem.h | 15 +- include/linux/hyperv.h | 69 +- include/linux/ieee80211.h | 4 +- include/linux/if_hsr.h | 9 + include/linux/irq-entry-common.h | 2 +- include/linux/nfs_fs_sb.h | 5 + include/linux/of_fdt.h | 9 + include/linux/perf_event.h | 2 +- include/linux/phy.h | 3 + include/linux/platform_data/lp855x.h | 4 +- include/linux/ras.h | 16 +- include/linux/rculist_nulls.h | 59 ++ include/linux/soc/mediatek/mtk_wed.h | 1 + include/linux/tty_port.h | 14 + include/linux/vfio_pci_core.h | 10 +- include/linux/virtio.h | 2 +- include/linux/virtio_config.h | 10 +- include/linux/virtio_features.h | 29 +- include/linux/virtio_pci_modern.h | 8 +- include/net/netfilter/nf_conntrack_count.h | 15 +- include/net/sock.h | 13 + include/ras/ras_event.h | 49 +- include/sound/tas2781.h | 2 +- include/target/target_core_base.h | 12 +- include/uapi/linux/pidfd.h | 1 + include/uapi/sound/asound.h | 2 +- include/ufs/ufshcd.h | 1 - io_uring/io_uring.c | 10 +- kernel/bpf/hashtab.c | 10 +- kernel/bpf/helpers.c | 3 + kernel/bpf/rqspinlock.c | 36 +- kernel/bpf/stackmap.c | 66 +- kernel/bpf/syscall.c | 3 + kernel/bpf/trampoline.c | 4 +- kernel/cgroup/cpuset.c | 35 +- kernel/cpu.c | 25 +- kernel/dma/pool.c | 2 +- kernel/events/callchain.c | 12 +- kernel/events/core.c | 24 +- kernel/locking/locktorture.c | 8 +- kernel/resource.c | 10 +- kernel/sched/fair.c | 17 +- kernel/sched/stats.h | 7 +- kernel/task_work.c | 8 +- kernel/time/timer_migration.c | 264 ++++---- lib/vsprintf.c | 6 +- net/core/filter.c | 9 +- net/core/netpoll.c | 2 +- net/hsr/hsr_device.c | 20 + net/hsr/hsr_slave.c | 7 +- net/ipv4/inet_hashtables.c | 8 +- net/ipv4/inet_timewait_sock.c | 35 +- net/ipv6/ip6_fib.c | 4 + net/mac80211/aes_cmac.c | 63 +- net/mac80211/aes_cmac.h | 8 +- net/mac80211/wpa.c | 20 +- net/netfilter/nf_conncount.c | 195 ++++-- net/netfilter/nft_connlimit.c | 34 +- net/netfilter/nft_flow_offload.c | 9 +- net/netfilter/xt_connlimit.c | 14 +- net/openvswitch/conntrack.c | 16 +- net/sched/sch_cake.c | 60 +- net/sctp/socket.c | 5 +- scripts/lib/kdoc/kdoc_parser.py | 16 +- scripts/package/install-extmod-build | 2 +- security/integrity/ima/ima_main.c | 40 +- security/integrity/ima/ima_policy.c | 2 +- security/smack/smack.h | 3 + security/smack/smack_access.c | 93 ++- security/smack/smack_lsm.c | 277 +++++--- sound/firewire/dice/dice-extension.c | 4 +- sound/firewire/motu/motu-hwdep.c | 7 +- sound/hda/codecs/realtek/alc269.c | 2 + sound/hda/codecs/side-codecs/cs35l41_hda.c | 2 + sound/hda/codecs/side-codecs/tas2781_hda_i2c.c | 44 +- sound/isa/wavefront/wavefront_synth.c | 4 +- sound/soc/amd/acp/acp-i2s.c | 2 + sound/soc/amd/acp/acp-legacy-common.c | 30 +- sound/soc/bcm/bcm63xx-pcm-whistler.c | 4 +- sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/ak4458.c | 10 +- sound/soc/codecs/ak5558.c | 10 +- sound/soc/codecs/nau8325.c | 3 +- sound/soc/codecs/tas2781-i2c.c | 2 +- sound/soc/fsl/fsl_xcvr.c | 2 +- sound/soc/intel/catpt/pcm.c | 4 +- sound/soc/sdca/sdca_functions.c | 2 +- tools/include/nolibc/dirent.h | 6 +- tools/include/nolibc/stdio.h | 4 + tools/include/nolibc/sys/wait.h | 18 +- tools/lib/bpf/btf.c | 4 +- tools/objtool/check.c | 3 +- tools/objtool/elf.c | 8 +- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-stat.c | 13 + tools/perf/util/annotate.c | 2 +- .../util/arm-spe-decoder/arm-spe-pkt-decoder.c | 25 +- .../util/arm-spe-decoder/arm-spe-pkt-decoder.h | 15 +- tools/perf/util/bpf_counter.c | 7 +- tools/perf/util/bpf_lock_contention.c | 6 +- tools/perf/util/evsel.c | 2 +- tools/perf/util/genelf.c | 32 +- tools/perf/util/hist.c | 6 +- tools/perf/util/hwmon_pmu.c | 3 +- tools/perf/util/parse-events.c | 28 +- tools/perf/util/parse-events.h | 3 +- tools/perf/util/parse-events.y | 2 +- tools/perf/util/symbol.c | 5 +- tools/power/x86/turbostat/turbostat.c | 12 +- .../selftests/bpf/prog_tests/kmem_cache_iter.c | 3 +- .../selftests/bpf/prog_tests/perf_branches.c | 22 +- .../testing/selftests/bpf/prog_tests/send_signal.c | 5 + .../selftests/bpf/progs/test_perf_branches.c | 3 + .../drivers/net/bonding/bond_macvlan_ipvlan.sh | 1 + .../tcp_syscall_bad_arg_sendmsg-empty-iov.pkt | 4 + .../net/packetdrill/tcp_zerocopy_basic.pkt | 2 + .../net/packetdrill/tcp_zerocopy_batch.pkt | 2 + .../net/packetdrill/tcp_zerocopy_client.pkt | 2 + .../net/packetdrill/tcp_zerocopy_closed.pkt | 2 + .../net/packetdrill/tcp_zerocopy_epoll_edge.pkt | 3 + .../packetdrill/tcp_zerocopy_epoll_exclusive.pkt | 3 + .../net/packetdrill/tcp_zerocopy_epoll_oneshot.pkt | 3 + .../packetdrill/tcp_zerocopy_fastopen-client.pkt | 2 + .../packetdrill/tcp_zerocopy_fastopen-server.pkt | 2 + .../net/packetdrill/tcp_zerocopy_maxfrags.pkt | 2 + .../net/packetdrill/tcp_zerocopy_small.pkt | 2 + 513 files changed, 6158 insertions(+), 3322 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/507 smack: deduplicate "does access rule request transmutation"
6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 635a01da8385fc00a144ec24684100bd1aa9db11 ]
Stable-dep-of: 78fc6a94be25 ("smack: fix bug: invalid label of unix socket file")
--- security/smack/smack_lsm.c | 57 +++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 25 deletions(-)
security/smack/smack_lsm.c +32 -25
@@ -962,6 +962,24 @@ static int smack_inode_alloc_security(struct inode *inode)return 0 ; } +/** +* smk_rule_transmutes - does access rule for (subject,object) contain 't'? +* @subject: a pointer to the subject's Smack label entry +* @object: a pointer to the object's Smack label entry +*/ +static bool +smk_rule_transmutes (struct smack_known *subject, +const struct smack_known *object) +{ +int may; + +rcu_read_lock (); + may =smk_access_entry (subject->smk_known, object->smk_known, + &subject->smk_rules); +rcu_read_unlock (); +return (may >0 ) && (may &MAY_TRANSMUTE ); +} +/** * smack_inode_init_security - copy out the smack from an inode * @inode: the newly created inode
@@ -977,23 +995,19 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir, struct xattr *xattrs, int *xattr_count) { struct task_smack *tsp = smack_cred(current_cred()); -struct inode_smack *issp =smack_inode (inode); -struct smack_known *skp =smk_of_task (tsp); -struct smack_known *isp =smk_of_inode (inode); +struct inode_smack *const issp =smack_inode (inode);struct smack_known *dsp =smk_of_inode (dir);struct xattr *xattr =lsm_get_xattr_slot (xattrs, xattr_count); -int may; +bool trans_cred; +bool trans_rule;/* * If equal, transmuting already occurred in * smack_dentry_create_files_as(). No need to check again. */ -if (tsp->smk_task != tsp->smk_transmuted) { -rcu_read_lock (); - may =smk_access_entry (skp->smk_known, dsp->smk_known, - &skp->smk_rules); -rcu_read_unlock (); - } + trans_cred = (tsp->smk_task == tsp->smk_transmuted); +if (!trans_cred) + trans_rule =smk_rule_transmutes (smk_of_task (tsp), dsp);/* * In addition to having smk_task equal to smk_transmuted,
@@ -1001,9 +1015,7 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,* requests transmutation then by all means transmute. * Mark the inode as changed. */ -if ((tsp->smk_task == tsp->smk_transmuted) || - (may >0 && ((may &MAY_TRANSMUTE ) !=0 ) && -smk_inode_transmutable (dir))) { +if (trans_cred || (trans_rule &&smk_inode_transmutable (dir))) {struct xattr *xattr_transmute;/*
@@ -1012,8 +1024,8 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,* inode label was already set correctly in * smack_inode_alloc_security(). */ -if (tsp->smk_task != tsp->smk_transmuted) - isp = issp->smk_inode = dsp; +if (!trans_cred) + issp->smk_inode = dsp; issp->smk_flags |=SMK_INODE_TRANSMUTE ; xattr_transmute = lsm_get_xattr_slot(xattrs,
@@ -1033,11 +1045,13 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir, issp->smk_flags |=SMK_INODE_INSTANT ;if (xattr) { - xattr->value =kstrdup (isp->smk_known,GFP_NOFS ); +const char *inode_label = issp->smk_inode->smk_known; + + xattr->value =kstrdup (inode_label,GFP_NOFS );if (!xattr->value)return -ENOMEM ; - xattr->value_len =strlen (isp->smk_known); + xattr->value_len =strlen (inode_label); xattr->name =XATTR_SMACK_SUFFIX ; }
@@ -4915,7 +4929,6 @@ static int smack_dentry_create_files_as(struct dentry *dentry, int mode,struct task_smack *otsp =smack_cred (old);struct task_smack *ntsp =smack_cred (new);struct inode_smack *isp; -int may;/* * Use the process credential unless all of
@@ -4929,18 +4942,12 @@ static int smack_dentry_create_files_as(struct dentry *dentry, int mode, isp =smack_inode (d_inode (dentry->d_parent));if (isp->smk_flags &SMK_INODE_TRANSMUTE ) { -rcu_read_lock (); - may =smk_access_entry (otsp->smk_task->smk_known, - isp->smk_inode->smk_known, - &otsp->smk_task->smk_rules); -rcu_read_unlock (); -/* * If the directory is transmuting and the rule * providing access is transmuting use the containing * directory label instead of the process label. */ -if (may >0 && (may &MAY_TRANSMUTE )) { +if (smk_rule_transmutes (otsp->smk_task, isp->smk_inode)) { ntsp->smk_task = isp->smk_inode; ntsp->smk_transmuted = ntsp->smk_task; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 2/507 smack: fix bug: SMACK64TRANSMUTE set on non-directory
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 195da3ff244deff119c3f5244b464b2236ea1725 ]
When a new file system object is created and the conditions for label transmutation are met, the SMACK64TRANSMUTE extended attribute is set on the object regardless of its type:
file, pipe, socket, symlink, or directory.
However,
SMACK64TRANSMUTE may only be set on directories.
This bug is a combined effect of the commits [1] and [2] which both transfer functionality
from smack_d_instantiate() to smack_inode_init_security(), but only in part.
Commit [1] set blank SMACK64TRANSMUTE on improper object types. Commit [2] set "TRUE" SMACK64TRANSMUTE on improper object types.
[1] 2023-06-10,
[2] 2023-11-16,
Stable-dep-of: 78fc6a94be25 ("smack: fix bug: invalid label of unix socket file")
--- security/smack/smack_lsm.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-)
security/smack/smack_lsm.c +14 -12
@@ -1027,18 +1027,20 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,if (!trans_cred) issp->smk_inode = dsp; - issp->smk_flags |=SMK_INODE_TRANSMUTE ; - xattr_transmute =lsm_get_xattr_slot (xattrs, - xattr_count); -if (xattr_transmute) { - xattr_transmute->value =kmemdup (TRANS_TRUE , -TRANS_TRUE_SIZE , -GFP_NOFS ); -if (!xattr_transmute->value) -return -ENOMEM ; - - xattr_transmute->value_len =TRANS_TRUE_SIZE ; - xattr_transmute->name =XATTR_SMACK_TRANSMUTE ; +if (S_ISDIR (inode->i_mode)) { + issp->smk_flags |=SMK_INODE_TRANSMUTE ; + xattr_transmute =lsm_get_xattr_slot (xattrs, + xattr_count); +if (xattr_transmute) { + xattr_transmute->value =kmemdup (TRANS_TRUE , +TRANS_TRUE_SIZE , +GFP_NOFS ); +if (!xattr_transmute->value) +return -ENOMEM ; + + xattr_transmute->value_len =TRANS_TRUE_SIZE ; + xattr_transmute->name =XATTR_SMACK_TRANSMUTE ; + } } }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 3/507 smack: deduplicate xattr setting in smack_inode_init_security()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 8e5d9f916a9678e2dcbed2289b87efd453e4e052 ]
Stable-dep-of: 78fc6a94be25 ("smack: fix bug: invalid label of unix socket file")
--- security/smack/smack_lsm.c | 56 ++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 27 deletions(-)
security/smack/smack_lsm.c +29 -27
@@ -980,6 +980,24 @@ smk_rule_transmutes(struct smack_known *subject,return (may >0 ) && (may &MAY_TRANSMUTE ); } +static int +xattr_dupval (struct xattr *xattrs,int *xattr_count, +const char *name,const void *value,unsigned int vallen) +{ +struct xattr *const xattr =lsm_get_xattr_slot (xattrs, xattr_count); + +if (!xattr) +return 0 ; + + xattr->value =kmemdup (value, vallen,GFP_NOFS ); +if (!xattr->value) +return -ENOMEM ; + + xattr->value_len = vallen; + xattr->name = name; +return 0 ; +} +/** * smack_inode_init_security - copy out the smack from an inode * @inode: the newly created inode
@@ -997,7 +1015,6 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,struct task_smack *tsp =smack_cred (current_cred ());struct inode_smack *const issp =smack_inode (inode);struct smack_known *dsp =smk_of_inode (dir); -struct xattr *xattr =lsm_get_xattr_slot (xattrs, xattr_count);bool trans_cred;bool trans_rule;
@@ -1016,8 +1033,6 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,* Mark the inode as changed. */ if (trans_cred || (trans_rule &&smk_inode_transmutable (dir))) { -struct xattr *xattr_transmute; -/* * The caller of smack_dentry_create_files_as() * should have overridden the current cred, so the
@@ -1029,35 +1044,22 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,if (S_ISDIR (inode->i_mode)) { issp->smk_flags |=SMK_INODE_TRANSMUTE ; - xattr_transmute =lsm_get_xattr_slot (xattrs, - xattr_count); -if (xattr_transmute) { - xattr_transmute->value =kmemdup (TRANS_TRUE , -TRANS_TRUE_SIZE , -GFP_NOFS ); -if (!xattr_transmute->value) -return -ENOMEM ; - - xattr_transmute->value_len =TRANS_TRUE_SIZE ; - xattr_transmute->name =XATTR_SMACK_TRANSMUTE ; - } + +if (xattr_dupval (xattrs, xattr_count, +XATTR_SMACK_TRANSMUTE , +TRANS_TRUE , +TRANS_TRUE_SIZE + )) +return -ENOMEM ; } } issp->smk_flags |=SMK_INODE_INSTANT ; -if (xattr) { -const char *inode_label = issp->smk_inode->smk_known; - - xattr->value =kstrdup (inode_label,GFP_NOFS ); -if (!xattr->value) -return -ENOMEM ; - - xattr->value_len =strlen (inode_label); - xattr->name =XATTR_SMACK_SUFFIX ; - } - -return 0 ; +return xattr_dupval (xattrs, xattr_count, +XATTR_SMACK_SUFFIX , + issp->smk_inode->smk_known, +strlen (issp->smk_inode->smk_known)); }/**
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 4/507 smack: always "instantiate" inode in smack_inode_init_security()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 69204f6cdb90f56b7ca27966d1080841108fc5de ]
If memory allocation for the SMACK64TRANSMUTE
xattr value fails in smack_inode_init_security(),
the SMK_INODE_INSTANT flag is not set in
(struct inode_smack *issp)->smk_flags,
leaving the inode as not "instantiated".
It does not matter if fs frees the inode
after failed smack_inode_init_security() call,
but there is no guarantee for this.
To be safe, mark the inode as "instantiated",
even if allocation of xattr values fails.
Stable-dep-of: 78fc6a94be25 ("smack: fix bug: invalid label of unix socket file")
--- security/smack/smack_lsm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
security/smack/smack_lsm.c +7 -3
@@ -1015,6 +1015,8 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,struct task_smack *tsp =smack_cred (current_cred ());struct inode_smack *const issp =smack_inode (inode);struct smack_known *dsp =smk_of_inode (dir); +int rc =0 ; +int transflag =0 ;bool trans_cred;bool trans_rule;
@@ -1043,18 +1045,20 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir, issp->smk_inode = dsp;if (S_ISDIR (inode->i_mode)) { - issp->smk_flags |=SMK_INODE_TRANSMUTE ; + transflag =SMK_INODE_TRANSMUTE ;if (xattr_dupval (xattrs, xattr_count,XATTR_SMACK_TRANSMUTE ,TRANS_TRUE ,TRANS_TRUE_SIZE )) -return -ENOMEM ; + rc = -ENOMEM ; } } - issp->smk_flags |=SMK_INODE_INSTANT ; + issp->smk_flags |= (SMK_INODE_INSTANT | transflag); +if (rc) +return rc; return xattr_dupval(xattrs, xattr_count, XATTR_SMACK_SUFFIX,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 5/507 smack: fix bug: invalid label of unix socket file
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 78fc6a94be252b27bb73e4926eed70b5e302a8e0 ]
According to [1], the label of a UNIX domain socket (UDS) file (i.e., the filesystem object representing the socket) is not supposed to participate in Smack security.
To achieve this, [1] labels UDS files with "*" in smack_d_instantiate().
Before [2], smack_d_instantiate() was responsible for initializing Smack security for all inodes, except ones under /proc
[2] imposed the sole responsibility for initializing inode security for newly created filesystem objects on smack_inode_init_security().
However, smack_inode_init_security() lacks some logic present in smack_d_instantiate().
In particular, it does not label UDS files with "*".
This patch adds the missing labeling of UDS files with "*" to smack_inode_init_security().
Labeling UDS files with "*" in smack_d_instantiate() still works for stale UDS files that already exist on disk. Stale UDS files are useless, but I keep labeling them for consistency and maybe to make easier for user to delete them.
Compared to [1], this version introduces the following improvements:
* UDS file label is held inside inode only
and not saved to xattrs.
* relabeling UDS files (setxattr, removexattr, etc.) is blocked.
[1] 2010-11-24 Casey Schaufler
commit b4e0d5f0791b ("Smack: UDS revision")
[2] 2023-11-16 roberto.sassu
--- Documentation/admin-guide/LSM/Smack.rst | 5 +++ security/smack/smack_lsm.c | 58 +++++++++++++++++++------ 2 files changed, 49 insertions(+), 14 deletions(-)
Documentation/admin-guide/LSM/Smack.rst +5 -0
@@ -696,6 +696,11 @@ sockets. A privileged program may set this to match the label of another task with which it hopes to communicate. +UNIX domain socket (UDS) with a BSD address functions both as a file in a +filesystem and as a socket. As a file, it carries the SMACK64 attribute. This +attribute is not involved in Smack security enforcement and is immutably +assigned the label "*". + Smack Netlabel Exceptions ~~~~~~~~~~~~~~~~~~~~~~~~~
security/smack/smack_lsm.c +44 -14
109 lines not on this page · raw message
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 6/507 smack: fix bug: unprivileged task can create labels
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit c147e13ea7fe9f118f8c9ba5e96cbd644b00d6b3 ]
If an unprivileged task is allowed to relabel itself (/smack/relabel-self is not empty),
it can freely create new labels by writing their names into own /proc/PID/attr/smack/current
This occurs because do_setattr() imports
the provided label in advance,
before checking "relabel-self" list.
This change ensures that the "relabel-self" list
is checked before importing the label.
--- security/smack/smack_lsm.c | 41 +++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 14 deletions(-)
security/smack/smack_lsm.c +27 -14
@@ -3778,8 +3778,8 @@ static int do_setattr(u64 attr, void *value, size_t size)struct task_smack *tsp =smack_cred (current_cred ());struct cred *new;struct smack_known *skp; -struct smack_known_list_elem *sklep; -int rc; +char *labelstr; +int rc =0 ;if (!smack_privileged (CAP_MAC_ADMIN ) &&list_empty (&tsp->smk_relabel))return -EPERM ;
@@ -3790,28 +3790,41 @@ static int do_setattr(u64 attr, void *value, size_t size)if (attr !=LSM_ATTR_CURRENT )return -EOPNOTSUPP ; - skp =smk_import_entry (value, size); -if (IS_ERR (skp)) -return PTR_ERR (skp); + labelstr =smk_parse_smack (value, size); +if (IS_ERR (labelstr)) +return PTR_ERR (labelstr);/* * No process is ever allowed the web ("@") label * and the star ("*") label. */ -if (skp == &smack_known_web || skp == &smack_known_star) -return -EINVAL ; +if (labelstr[1 ] =='\0' /* '@', '*' */ ) { +const char c = labelstr[0 ]; + +if (c == *smack_known_web.smk_known || + c == *smack_known_star.smk_known) { + rc = -EPERM ; + goto free_labelstr; + } + }if (!smack_privileged (CAP_MAC_ADMIN )) { - rc = -EPERM ; +const struct smack_known_list_elem *sklep;list_for_each_entry (sklep, &tsp->smk_relabel, list) -if (sklep->smk_label == skp) { - rc =0 ; -break ; - } -if (rc) -return rc; +if (strcmp (sklep->smk_label->smk_known, labelstr) ==0 ) + goto free_labelstr; + rc = -EPERM ; } +free_labelstr: +kfree (labelstr); +if (rc) +return -EPERM ; + + skp =smk_import_entry (value, size); +if (IS_ERR (skp)) +return PTR_ERR (skp); + new =prepare_creds ();if (new ==NULL )return -ENOMEM ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 7/507 smack: fix bug: setting task label silently ignores input garbage
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 674e2b24791cbe8fd5dc8a0aed4cb4404fcd2028 ]
This command:
# echo foo/bar >/proc/$$/attr/smack/current
gives the task a label 'foo' w/o indication that label does not match input.
Setting the label with lsm_set_self_attr() syscall behaves identically.
This occures because:
1) smk_parse_smack() is used to convert input to a label
2) smk_parse_smack() takes only that part from the beginning of the input that looks like a label.
3) `/' is prohibited in labels, so only "foo" is taken.
(2) is by design, because smk_parse_smack() is used for parsing strings which are more than just a label.
Silent failure is not a good thing, and there are two indicators that this was not done intentionally:
(size >= SMK_LONGLABEL) ~> invalid
clause at the beginning of the do_setattr() and the "Returns the length of the smack label" claim in the do_setattr() description.
So I fixed this by adding one tiny check:
the taken label length == input length.
Since input length is now strictly controlled, I changed the two ways of setting label
smack_setselfattr(): lsm_set_self_attr() syscall smack_setprocattr(): > /proc/.../current
to accommodate the divergence in
what they understand by "input length":
smack_setselfattr counts mandatory \0 into input length, smack_setprocattr does not.
smack_setprocattr allows various trailers after label
Related changes:
* fixed description for smk_parse_smack
* allow unprivileged tasks validate label syntax.
* extract smk_parse_label_len() from smk_parse_smack() so parsing may be done w/o string allocation.
* extract smk_import_valid_label() from smk_import_entry() to avoid repeated parsing.
* smk_parse_smack(): scan null-terminated strings for no more than SMK_LONGLABEL(256) characters
* smack_setselfattr(): require struct lsm_ctx . flags == 0 to reserve them for future.
--- Documentation/admin-guide/LSM/Smack.rst | 11 ++- security/smack/smack.h | 3 + security/smack/smack_access.c | 93 ++++++++++++++----- security/smack/smack_lsm.c | 115 +++++++++++++++--------- 4 files changed, 156 insertions(+), 66 deletions(-)
Documentation/admin-guide/LSM/Smack.rst +8 -3
@@ -601,10 +601,15 @@ specification. Task Attribute ~~~~~~~~~~~~~~ -The Smack label of a process can be read from /proc/<pid>/attr/current. A -process can read its own Smack label from /proc/self/attr/current. A +The Smack label of a process can be read from ``/proc/<pid>/attr/current``. A +process can read its own Smack label from ``/proc/self/attr/current``. A privileged process can change its own Smack label by writing to -/proc/self/attr/current but not the label of another process. +``/proc/self/attr/current`` but not the label of another process. + +Format of writing is : only the label or the label followed by one of the +3 trailers: ``\n`` (by common agreement for ``/proc/...`` interfaces), +``\0`` (because some applications incorrectly include it), +``\n\0`` (because we think some applications may incorrectly include it). File Attribute ~~~~~~~~~~~~~~
security/smack/smack.h +3 -0
@@ -286,9 +286,12 @@ int smk_tskacc(struct task_smack *, struct smack_known *,int smk_curacc (struct smack_known *,u32 ,struct smk_audit_info *);int smack_str_from_perm (char *string,int access);struct smack_known *smack_from_secid (const u32 ); +int smk_parse_label_len (const char *string,int len);char *smk_parse_smack (const char *string,int len);int smk_netlbl_mls (int ,char *,struct netlbl_lsm_secattr *,int );struct smack_known *smk_import_entry (const char *,int ); +struct smack_known *smk_import_valid_label (const char *label,int label_len, +gfp_t gfp);void smk_insert_entry (struct smack_known *skp);struct smack_known *smk_find_entry (const char *);bool smack_privileged (int cap);
security/smack/smack_access.c +71 -22
140 lines not on this page · raw message
security/smack/smack_lsm.c +74 -41
179 lines not on this page · raw message
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 8/507 gpu: host1x: Fix race in syncpt alloc/free
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mainak Sen <[email protected]>
[ Upstream commit c7d393267c497502fa737607f435f05dfe6e3d9b ]
Fix race condition between host1x_syncpt_alloc() and host1x_syncpt_put() by using kref_put_mutex() instead of kref_put() + manual mutex locking.
This ensures no thread can acquire the syncpt_mutex after the refcount drops to zero but before syncpt_release acquires it.
This prevents races where syncpoints could
be allocated while still being cleaned up from a previous release.
Remove explicit mutex locking in syncpt_release as kref_put_mutex() handles this atomically.
--- drivers/gpu/host1x/syncpt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/host1x/syncpt.c +1 -3
@@ -345,8 +345,6 @@ static void syncpt_release(struct kref *ref) sp->locked = false; -mutex_lock (&sp->host->syncpt_mutex); -host1x_syncpt_base_free (sp->base);kfree (sp->name); sp->base =NULL ;
@@ -369,7 +367,7 @@ void host1x_syncpt_put(struct host1x_syncpt *sp)if (!sp)return ; -kref_put (&sp->ref, syncpt_release); +kref_put_mutex (&sp->ref, syncpt_release, &sp->host->syncpt_mutex); }EXPORT_SYMBOL (host1x_syncpt_put);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 9/507 accel/ivpu: Ensure rpm_runtime_put in case of engine reset/resume fail
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karol Wachowski <[email protected]>
[ Upstream commit 9f6c63285737b141ca25a619add80a96111b8b96 ]
Previously, aborting work could return early after engine reset or resume failure, skipping the necessary runtime_put cleanup leaving the device with incorrect reference count breaking runtime power management state.
Replace early returns with goto statements to ensure runtime_put is always executed.
--- drivers/accel/ivpu/ivpu_job.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/accel/ivpu/ivpu_job.c +2 -2
@@ -1012,7 +1012,7 @@ void ivpu_context_abort_work_fn(struct work_struct *work)if (vdev->fw->sched_mode ==VPU_SCHEDULING_MODE_HW )if (ivpu_jsm_reset_engine (vdev,0 )) -return ; + goto runtime_put;mutex_lock (&vdev->context_list_lock);xa_for_each (&vdev->context_xa, ctx_id, file_priv) {
@@ -1036,7 +1036,7 @@ void ivpu_context_abort_work_fn(struct work_struct *work) goto runtime_put;if (ivpu_jsm_hws_resume_engine (vdev,0 )) -return ; + goto runtime_put;/* * In hardware scheduling mode NPU already has stopped processing jobs * and won't send us any further notifications, thus we have to free job related resources
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 10/507 drm/panel: visionox-rm69299: Fix clock frequency for SHIFT6mq
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guido Günther <[email protected]>
[ Upstream commit d298062312724606855294503acebc7ee55ffbca ]
Make the clock frequency match what the sdm845 downstream kernel uses. Otherwise the panel stays black.
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-visionox-rm69299.c +1 -1
@@ -247,7 +247,7 @@ static const struct drm_display_mode visionox_rm69299_1080x2248_60hz = { };static const struct drm_display_mode visionox_rm69299_1080x2160_60hz = { - .clock =158695 , + .clock = (2160 +8 +4 +4 ) * (1080 +26 +2 +36 ) *60 /1000 , .hdisplay =1080 , .hsync_start =1080 +26 , .hsync_end =1080 +26 +2 ,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 11/507 drm/panel: visionox-rm69299: Dont clear all mode flags
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guido Günther <[email protected]>
[ Upstream commit 39144b611e9cd4f5814f4098c891b545dd70c536 ]
Don't clear all mode flags. We only want to maek sure we use HS mode during unprepare.
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-visionox-rm69299.c +1 -1
@@ -192,7 +192,7 @@ static int visionox_rm69299_unprepare(struct drm_panel *panel)struct visionox_rm69299 *ctx =panel_to_ctx (panel);struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; - ctx->dsi->mode_flags =0 ; + ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM ;mipi_dsi_dcs_set_display_off_multi (&dsi_ctx);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 12/507 accel/ivpu: Rework bind/unbind of imported buffers
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jacek Lawrynowicz <[email protected]>
[ Upstream commit e0c0891cd63bf8338c25c423e28a5a93aed3d74c ]
Ensure that imported buffers are properly mapped and unmapped in the same way as regular buffers to properly handle buffers during device's bind and unbind operations to prevent resource leaks and inconsistent buffer states.
Imported buffers are now dma_mapped before submission and dma_unmapped in ivpu_bo_unbind(), guaranteeing they are unmapped when the device is unbound.
Add also imported buffers to vdev->bo_list for consistent unmapping on device unbind. The bo->ctx_id is set in open() so imported buffers have a valid context ID.
Debug logs have been updated to match the new code structure. The function ivpu_bo_pin() has been renamed to ivpu_bo_bind() to better reflect its purpose, and unbind tests have been refactored for improved coverage and clarity.
Stable-dep-of: 8b694b405a84 ("accel/ivpu: Fix page fault in ivpu_bo_unbind_all_bos_from_context()")
--- drivers/accel/ivpu/ivpu_gem.c | 90 ++++++++++++++++++++++------------- drivers/accel/ivpu/ivpu_gem.h | 2 +- drivers/accel/ivpu/ivpu_job.c | 2 +- 3 files changed, 60 insertions(+), 34 deletions(-)
drivers/accel/ivpu/ivpu_gem.c +58 -32
@@ -27,8 +27,8 @@ static const struct drm_gem_object_funcs ivpu_gem_funcs;static inline void ivpu_dbg_bo (struct ivpu_device *vdev,struct ivpu_bo *bo,const char *action) {ivpu_dbg (vdev,BO , -"%6s: bo %8p vpu_addr %9llx size %8zu ctx %d has_pages %d dma_mapped %d mmu_mapped %d wc %d imported %d\n" , - action, bo, bo->vpu_addr,ivpu_bo_size (bo), bo->ctx_id, +"%6s: bo %8p size %9zu ctx %d vpu_addr %9llx pages %d sgt %d mmu_mapped %d wc %d imported %d\n" , + action, bo,ivpu_bo_size (bo), bo->ctx_id, bo->vpu_addr, (bool )bo->base.pages, (bool )bo->base.sgt, bo->mmu_mapped, bo->base.map_wc, (bool )drm_gem_is_imported (&bo->base.base)); }
@@ -43,22 +43,46 @@ static inline void ivpu_bo_unlock(struct ivpu_bo *bo)dma_resv_unlock (bo->base.base.resv); } +static struct sg_table *ivpu_bo_map_attachment (struct ivpu_device *vdev,struct ivpu_bo *bo) +{ +struct sg_table *sgt = bo->base.sgt; + +drm_WARN_ON (&vdev->drm, !bo->base.base.import_attach); + +ivpu_bo_lock (bo); + +if (!sgt) { + sgt =dma_buf_map_attachment (bo->base.base.import_attach,DMA_BIDIRECTIONAL ); +if (IS_ERR (sgt)) +ivpu_err (vdev,"Failed to map BO in IOMMU: %ld\n" ,PTR_ERR (sgt)); +else + bo->base.sgt = sgt; + } + +ivpu_bo_unlock (bo); + +return sgt; +} +/* -* ivpu_bo_pin() - pin the backing physical pages and map them to VPU. +* ivpu_bo_bind() - pin the backing physical pages and map them to VPU. * * This function pins physical memory pages, then maps the physical pages * to IOMMU address space and finally updates the VPU MMU page tables * to allow the VPU to translate VPU address to IOMMU address. */ -int __must_check ivpu_bo_pin (struct ivpu_bo *bo) +int __must_check ivpu_bo_bind (struct ivpu_bo *bo) {struct ivpu_device *vdev =ivpu_bo_to_vdev (bo);struct sg_table *sgt;int ret =0 ; -ivpu_dbg_bo (vdev, bo,"pin" ); +ivpu_dbg_bo (vdev, bo,"bind" ); - sgt =drm_gem_shmem_get_pages_sgt (&bo->base); +if (bo->base.base.import_attach) + sgt =ivpu_bo_map_attachment (vdev, bo); +else + sgt =drm_gem_shmem_get_pages_sgt (&bo->base);if (IS_ERR (sgt)) { ret =PTR_ERR (sgt);ivpu_err (vdev,"Failed to map BO in IOMMU: %d\n" , ret);
@@ -99,7 +123,9 @@ ivpu_bo_alloc_vpu_addr(struct ivpu_bo *bo, struct ivpu_mmu_context *ctx, ret =ivpu_mmu_context_insert_node (ctx, range,ivpu_bo_size (bo), &bo->mm_node);if (!ret) { bo->ctx = ctx; + bo->ctx_id = ctx->id; bo->vpu_addr = bo->mm_node.start; +ivpu_dbg_bo (vdev, bo,"vaddr" ); }else {ivpu_err (vdev,"Failed to add BO to context %u: %d\n" , ctx->id, ret); }
@@ -115,7 +141,7 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo) {struct ivpu_device *vdev =ivpu_bo_to_vdev (bo); -lockdep_assert (dma_resv_held (bo->base.base.resv) || !kref_read (&bo->base.base.refcount)); +dma_resv_assert_held (bo->base.base.resv);if (bo->mmu_mapped) {drm_WARN_ON (&vdev->drm, !bo->ctx);
@@ -134,9 +160,14 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo)return ;if (bo->base.sgt) { -dma_unmap_sgtable (vdev->drm.dev, bo->base.sgt,DMA_BIDIRECTIONAL ,0 ); -sg_free_table (bo->base.sgt); -kfree (bo->base.sgt); +if (bo->base.base.import_attach) { +dma_buf_unmap_attachment (bo->base.base.import_attach, + bo->base.sgt,DMA_BIDIRECTIONAL ); + }else { +dma_unmap_sgtable (vdev->drm.dev, bo->base.sgt,DMA_BIDIRECTIONAL ,0 ); +sg_free_table (bo->base.sgt); +kfree (bo->base.sgt); + } bo->base.sgt =NULL ; } }
@@ -162,6 +193,7 @@ void ivpu_bo_unbind_all_bos_from_context(struct ivpu_device *vdev, struct ivpu_mstruct drm_gem_object *ivpu_gem_create_object (struct drm_device *dev,size_t size) { +struct ivpu_device *vdev =to_ivpu_device (dev);struct ivpu_bo *bo;if (size ==0 || !PAGE_ALIGNED (size))
@@ -176,6 +208,11 @@ struct drm_gem_object *ivpu_gem_create_object(struct drm_device *dev, size_t sizINIT_LIST_HEAD (&bo->bo_list_node); +mutex_lock (&vdev->bo_list_lock); +list_add_tail (&bo->bo_list_node, &vdev->bo_list); +mutex_unlock (&vdev->bo_list_lock); + +ivpu_dbg (vdev,BO ," alloc: bo %8p size %9zu\n" , bo, size);return &bo->base.base; }
@@ -184,7 +221,6 @@ struct drm_gem_object *ivpu_gem_prime_import(struct drm_device *dev, {struct device *attach_dev = dev->dev;struct dma_buf_attachment *attach; -struct sg_table *sgt;struct drm_gem_object *obj;int ret;
@@ -194,16 +230,10 @@ struct drm_gem_object *ivpu_gem_prime_import(struct drm_device *dev,get_dma_buf (dma_buf); - sgt =dma_buf_map_attachment_unlocked (attach,DMA_BIDIRECTIONAL ); -if (IS_ERR (sgt)) { - ret =PTR_ERR (sgt); - goto fail_detach; - } - - obj =drm_gem_shmem_prime_import_sg_table (dev, attach, sgt); + obj =drm_gem_shmem_prime_import_sg_table (dev, attach,NULL );if (IS_ERR (obj)) { ret =PTR_ERR (obj); - goto fail_unmap; + goto fail_detach; } obj->import_attach = attach;
@@ -211,8 +241,6 @@ struct drm_gem_object *ivpu_gem_prime_import(struct drm_device *dev,return obj; -fail_unmap: -dma_buf_unmap_attachment_unlocked (attach, sgt,DMA_BIDIRECTIONAL ); fail_detach:dma_buf_detach (dma_buf, attach);dma_buf_put (dma_buf);
@@ -220,7 +248,7 @@ struct drm_gem_object *ivpu_gem_prime_import(struct drm_device *dev,return ERR_PTR (ret); } -static struct ivpu_bo *ivpu_bo_alloc (struct ivpu_device *vdev,u64 size,u32 flags,u32 ctx_id) +static struct ivpu_bo *ivpu_bo_alloc (struct ivpu_device *vdev,u64 size,u32 flags) {struct drm_gem_shmem_object *shmem;struct ivpu_bo *bo;
@@ -238,16 +266,9 @@ static struct ivpu_bo *ivpu_bo_alloc(struct ivpu_device *vdev, u64 size, u32 flareturn ERR_CAST (shmem); bo =to_ivpu_bo (&shmem->base); - bo->ctx_id = ctx_id; bo->base.map_wc = flags &DRM_IVPU_BO_WC ; bo->flags = flags; -mutex_lock (&vdev->bo_list_lock); -list_add_tail (&bo->bo_list_node, &vdev->bo_list); -mutex_unlock (&vdev->bo_list_lock); - -ivpu_dbg_bo (vdev, bo,"alloc" ); -return bo; }
@@ -281,6 +302,8 @@ static void ivpu_gem_bo_free(struct drm_gem_object *obj)ivpu_dbg_bo (vdev, bo,"free" ); +drm_WARN_ON (&vdev->drm,list_empty (&bo->bo_list_node)); +mutex_lock (&vdev->bo_list_lock);list_del (&bo->bo_list_node);mutex_unlock (&vdev->bo_list_lock);
@@ -290,7 +313,10 @@ static void ivpu_gem_bo_free(struct drm_gem_object *obj)drm_WARN_ON (&vdev->drm,ivpu_bo_size (bo) ==0 );drm_WARN_ON (&vdev->drm, bo->base.vaddr); +ivpu_bo_lock (bo);ivpu_bo_unbind_locked (bo); +ivpu_bo_unlock (bo); +drm_WARN_ON (&vdev->drm, bo->mmu_mapped);drm_WARN_ON (&vdev->drm, bo->ctx);
@@ -326,7 +352,7 @@ int ivpu_bo_create_ioctl(struct drm_device *dev, void *data, struct drm_file *fiif (size ==0 )return -EINVAL ; - bo =ivpu_bo_alloc (vdev, size, args->flags, file_priv->ctx.id); + bo =ivpu_bo_alloc (vdev, size, args->flags);if (IS_ERR (bo)) {ivpu_err (vdev,"Failed to allocate BO: %pe (ctx %u size %llu flags 0x%x)" , bo, file_priv->ctx.id, args->size, args->flags);
@@ -360,7 +386,7 @@ ivpu_bo_create(struct ivpu_device *vdev, struct ivpu_mmu_context *ctx,drm_WARN_ON (&vdev->drm, !PAGE_ALIGNED (range->end));drm_WARN_ON (&vdev->drm, !PAGE_ALIGNED (size)); - bo =ivpu_bo_alloc (vdev, size, flags,IVPU_GLOBAL_CONTEXT_MMU_SSID ); + bo =ivpu_bo_alloc (vdev, size, flags);if (IS_ERR (bo)) {ivpu_err (vdev,"Failed to allocate BO: %pe (vpu_addr 0x%llx size %llu flags 0x%x)" , bo, range->start, size, flags);
@@ -371,7 +397,7 @@ ivpu_bo_create(struct ivpu_device *vdev, struct ivpu_mmu_context *ctx,if (ret) goto err_put; - ret =ivpu_bo_pin (bo); + ret =ivpu_bo_bind (bo);if (ret) goto err_put;
drivers/accel/ivpu/ivpu_gem.h +1 -1
@@ -24,7 +24,7 @@ struct ivpu_bo {bool mmu_mapped; }; -int ivpu_bo_pin (struct ivpu_bo *bo); +int ivpu_bo_bind (struct ivpu_bo *bo);void ivpu_bo_unbind_all_bos_from_context (struct ivpu_device *vdev,struct ivpu_mmu_context *ctx);struct drm_gem_object *ivpu_gem_create_object (struct drm_device *dev,size_t size);
drivers/accel/ivpu/ivpu_job.c +1 -1
@@ -732,7 +732,7 @@ ivpu_job_prepare_bos_for_submit(struct drm_file *file, struct ivpu_job *job, u32 job->bos[i] =to_ivpu_bo (obj); - ret =ivpu_bo_pin (job->bos[i]); + ret =ivpu_bo_bind (job->bos[i]);if (ret)return ret; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 13/507 accel/ivpu: Fix page fault in ivpu_bo_unbind_all_bos_from_context()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jacek Lawrynowicz <[email protected]>
[ Upstream commit 8b694b405a84696f1d964f6da7cf9721e68c4714 ]
Don't add BO to the vdev->bo_list in ivpu_gem_create_object(). When failure happens inside drm_gem_shmem_create(), the BO is not fully created and ivpu_gem_bo_free() callback will not be called causing a deleted BO to be left on the list.
--- drivers/accel/ivpu/ivpu_gem.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)
drivers/accel/ivpu/ivpu_gem.c +16 -6
@@ -193,7 +193,6 @@ void ivpu_bo_unbind_all_bos_from_context(struct ivpu_device *vdev, struct ivpu_mstruct drm_gem_object *ivpu_gem_create_object (struct drm_device *dev,size_t size) { -struct ivpu_device *vdev =to_ivpu_device (dev);struct ivpu_bo *bo;if (size ==0 || !PAGE_ALIGNED (size))
@@ -208,20 +207,17 @@ struct drm_gem_object *ivpu_gem_create_object(struct drm_device *dev, size_t sizINIT_LIST_HEAD (&bo->bo_list_node); -mutex_lock (&vdev->bo_list_lock); -list_add_tail (&bo->bo_list_node, &vdev->bo_list); -mutex_unlock (&vdev->bo_list_lock); - -ivpu_dbg (vdev,BO ," alloc: bo %8p size %9zu\n" , bo, size);return &bo->base.base; }struct drm_gem_object *ivpu_gem_prime_import (struct drm_device *dev,struct dma_buf *dma_buf) { +struct ivpu_device *vdev =to_ivpu_device (dev);struct device *attach_dev = dev->dev;struct dma_buf_attachment *attach;struct drm_gem_object *obj; +struct ivpu_bo *bo;int ret; attach =dma_buf_attach (dma_buf, attach_dev);
@@ -239,6 +235,14 @@ struct drm_gem_object *ivpu_gem_prime_import(struct drm_device *dev, obj->import_attach = attach; obj->resv = dma_buf->resv; + bo =to_ivpu_bo (obj); + +mutex_lock (&vdev->bo_list_lock); +list_add_tail (&bo->bo_list_node, &vdev->bo_list); +mutex_unlock (&vdev->bo_list_lock); + +ivpu_dbg (vdev,BO ,"import: bo %8p size %9zu\n" , bo,ivpu_bo_size (bo)); +return obj; fail_detach:
@@ -269,6 +273,12 @@ static struct ivpu_bo *ivpu_bo_alloc(struct ivpu_device *vdev, u64 size, u32 fla bo->base.map_wc = flags &DRM_IVPU_BO_WC ; bo->flags = flags; +mutex_lock (&vdev->bo_list_lock); +list_add_tail (&bo->bo_list_node, &vdev->bo_list); +mutex_unlock (&vdev->bo_list_lock); + +ivpu_dbg (vdev,BO ," alloc: bo %8p size %9llu\n" , bo, size); +return bo; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 14/507 accel/ivpu: Make function parameter names consistent
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jacek Lawrynowicz <[email protected]>
[ Upstream commit cf87f93847dea607e8a35983cb006ef8493f8065 ]
Make ivpu_hw_btrs_dct_set_status() and ivpu_fw_boot_params_setup() declaration and definition parameter names consistent.
Stable-dep-of: aa1c2b073ad2 ("accel/ivpu: Fix DCT active percent format")
--- drivers/accel/ivpu/ivpu_fw.h | 2 +- drivers/accel/ivpu/ivpu_hw_btrs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/accel/ivpu/ivpu_fw.h +1 -1
@@ -45,7 +45,7 @@ struct ivpu_fw_info {int ivpu_fw_init (struct ivpu_device *vdev);void ivpu_fw_fini (struct ivpu_device *vdev);void ivpu_fw_load (struct ivpu_device *vdev); -void ivpu_fw_boot_params_setup (struct ivpu_device *vdev,struct vpu_boot_params *bp); +void ivpu_fw_boot_params_setup (struct ivpu_device *vdev,struct vpu_boot_params *boot_params);static inline bool ivpu_fw_is_cold_boot (struct ivpu_device *vdev) {
drivers/accel/ivpu/ivpu_hw_btrs.h +1 -1
@@ -36,7 +36,7 @@ u32 ivpu_hw_btrs_dpu_freq_get(struct ivpu_device *vdev);bool ivpu_hw_btrs_irq_handler_mtl (struct ivpu_device *vdev,int irq);bool ivpu_hw_btrs_irq_handler_lnl (struct ivpu_device *vdev,int irq);int ivpu_hw_btrs_dct_get_request (struct ivpu_device *vdev,bool *enable); -void ivpu_hw_btrs_dct_set_status (struct ivpu_device *vdev,bool enable,u32 dct_percent); +void ivpu_hw_btrs_dct_set_status (struct ivpu_device *vdev,bool enable,u32 active_percent);u32 ivpu_hw_btrs_telemetry_offset_get (struct ivpu_device *vdev);u32 ivpu_hw_btrs_telemetry_size_get (struct ivpu_device *vdev);u32 ivpu_hw_btrs_telemetry_enable_get (struct ivpu_device *vdev);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 15/507 accel/ivpu: Fix DCT active percent format
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karol Wachowski <[email protected]>
[ Upstream commit aa1c2b073ad23847dd2e7bdc7d30009f34ed7f59 ]
The pcode MAILBOX STATUS register PARAM2 field expects DCT active percent in U1.7 value format. Convert percentage value to this format before writing to the register.
--- drivers/accel/ivpu/ivpu_hw_btrs.c | 2 +- drivers/accel/ivpu/ivpu_hw_btrs.h | 2 +- drivers/accel/ivpu/ivpu_pm.c | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-)
drivers/accel/ivpu/ivpu_hw_btrs.c +1 -1
@@ -753,7 +753,7 @@ int ivpu_hw_btrs_dct_get_request(struct ivpu_device *vdev, bool *enable) } } -void ivpu_hw_btrs_dct_set_status (struct ivpu_device *vdev,bool enable,u32 active_percent) +void ivpu_hw_btrs_dct_set_status (struct ivpu_device *vdev,bool enable,u8 active_percent) {u32 val =0 ;u32 cmd = enable ?DCT_ENABLE :DCT_DISABLE ;
drivers/accel/ivpu/ivpu_hw_btrs.h +1 -1
@@ -36,7 +36,7 @@ u32 ivpu_hw_btrs_dpu_freq_get(struct ivpu_device *vdev);bool ivpu_hw_btrs_irq_handler_mtl (struct ivpu_device *vdev,int irq);bool ivpu_hw_btrs_irq_handler_lnl (struct ivpu_device *vdev,int irq);int ivpu_hw_btrs_dct_get_request (struct ivpu_device *vdev,bool *enable); -void ivpu_hw_btrs_dct_set_status (struct ivpu_device *vdev,bool enable,u32 active_percent); +void ivpu_hw_btrs_dct_set_status (struct ivpu_device *vdev,bool enable,u8 active_percent);u32 ivpu_hw_btrs_telemetry_offset_get (struct ivpu_device *vdev);u32 ivpu_hw_btrs_telemetry_size_get (struct ivpu_device *vdev);u32 ivpu_hw_btrs_telemetry_enable_get (struct ivpu_device *vdev);
drivers/accel/ivpu/ivpu_pm.c +7 -2
@@ -502,6 +502,11 @@ void ivpu_pm_irq_dct_work_fn(struct work_struct *work)else ret =ivpu_pm_dct_disable (vdev); -if (!ret) -ivpu_hw_btrs_dct_set_status (vdev, enable, vdev->pm->dct_active_percent); +if (!ret) { +/* Convert percent to U1.7 format */ +u8 val =DIV_ROUND_CLOSEST (vdev->pm->dct_active_percent *128 ,100 ); + +ivpu_hw_btrs_dct_set_status (vdev, enable, val); + } + }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 16/507 drm/vgem-fence: Fix potential deadlock on release
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Janusz Krzysztofik <[email protected]>
[ Upstream commit 78b4d6463e9e69e5103f98b367f8984ad12cdc6f ]
A timer that expires a vgem fence automatically in 10 seconds is now released with timer_delete_sync() from fence->ops.release() called on last dma_fence_put(). In some scenarios, it can run in IRQ context, which is not safe unless TIMER_IRQSAFE is used. One potentially risky scenario was demonstrated in Intel DRM CI trybot, BAT run on machine bat-adlp-6, while working on new IGT subtests syncobj_timeline@stress-* as user space replacements of some problematic test cases of a dma-fence-chain selftest [1].
[117.004338] ================================
[117.004340] WARNING: inconsistent lock state
[117.004342] 6.17.0-rc7-CI_DRM_17270-g7644974e648c+ #1 Tainted: G S U
[117.004346] --------------------------------
[117.004347] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
[117.004349] swapper/0/0 [HC1[1]:SC1[1]:HE0:SE0] takes:
[117.004352] ffff888138f86aa8 ((&fence->timer)){?.-.}-{0:0}, at: __timer_delete_sync+0x4b/0x190
[117.004361] {HARDIRQ-ON-W} state was registered at:
[117.004363] lock_acquire+0xc4/0x2e0
[117.004366] call_timer_fn+0x80/0x2a0
[117.004368] __run_timers+0x231/0x310
[117.004370] run_timer_softirq+0x76/0xe0
[117.004372] handle_softirqs+0xd4/0x4d0
[117.004375] __irq_exit_rcu+0x13f/0x160
[117.004377] irq_exit_rcu+0xe/0x20
[117.004379] sysvec_apic_timer_interrupt+0xa0/0xc0
[117.004382] asm_sysvec_apic_timer_interrupt+0x1b/0x20
[117.004385] cpuidle_enter_state+0x12b/0x8a0
[117.004388] cpuidle_enter+0x2e/0x50
[117.004393] call_cpuidle+0x22/0x60
[117.004395] do_idle+0x1fd/0x260
[117.004398] cpu_startup_entry+0x29/0x30
[117.004401] start_secondary+0x12d/0x160
[117.004404] common_startup_64+0x13e/0x141
[117.004407] irq event stamp: 2282669
[117.004409] hardirqs last enabled at (2282668): [<ffffffff8289db71>] _raw_spin_unlock_irqrestore+0x51/0x80
[117.004414] hardirqs last disabled at (2282669): [<ffffffff82882021>] sysvec_irq_work+0x11/0xc0
[117.004419] softirqs last enabled at (2254702): [<ffffffff8289fd00>] __do_softirq+0x10/0x18
[117.004423] softirqs last disabled at (2254725): [<ffffffff813d4ddf>] __irq_exit_rcu+0x13f/0x160
[117.004426]
other info that might help us debug this:
[117.004429] Possible unsafe locking scenario:
[117.004432] CPU0
[117.004433] ----
[117.004434] lock((&fence->timer));
[117.004436] <Interrupt>
[117.004438] lock((&fence->timer));
[117.004440]
*** DEADLOCK ***
[117.004443] 1 lock held by swapper/0/0:
[117.004445] #0: ffffc90000003d50 ((&fence->timer)){?.-.}-{0:0}, at: call_timer_fn+0x7a/0x2a0
[117.004450]
stack backtrace:
[117.004453] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G S U 6.17.0-rc7-CI_DRM_17270-g7644974e648c+ #1 PREEMPT(voluntary)
[117.004455] Tainted: [S]=CPU_OUT_OF_SPEC, [U]=USER
[117.004455] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-P DDR4 RVP, BIOS RPLPFWI1.R00.4035.A00.2301200723 01/20/2023
[117.004456] Call Trace:
[117.004456] <IRQ>
[117.004457] dump_stack_lvl+0x91/0xf0
[117.004460] dump_stack+0x10/0x20
[117.004461] print_usage_bug.part.0+0x260/0x360
[117.004463] mark_lock+0x76e/0x9c0
[117.004465] ? register_lock_class+0x48/0x4a0
[117.004467] __lock_acquire+0xbc3/0x2860
[117.004469] lock_acquire+0xc4/0x2e0
[117.004470] ? __timer_delete_sync+0x4b/0x190
[117.004472] ? __timer_delete_sync+0x4b/0x190
[117.004473] __timer_delete_sync+0x68/0x190
[117.004474] ? __timer_delete_sync+0x4b/0x190
[117.004475] timer_delete_sync+0x10/0x20
[117.004476] vgem_fence_release+0x19/0x30 [vgem]
[117.004478] dma_fence_release+0xc1/0x3b0
[117.004480] ? dma_fence_release+0xa1/0x3b0
[117.004481] dma_fence_chain_release+0xe7/0x130
[117.004483] dma_fence_release+0xc1/0x3b0
[117.004484] ? _raw_spin_unlock_irqrestore+0x27/0x80
[117.004485] dma_fence_chain_irq_work+0x59/0x80
[117.004487] irq_work_single+0x75/0xa0
[117.004490] irq_work_run_list+0x33/0x60
[117.004491] irq_work_run+0x18/0x40
[117.004493] __sysvec_irq_work+0x35/0x170
[117.004494] sysvec_irq_work+0x47/0xc0
[117.004496] asm_sysvec_irq_work+0x1b/0x20
[117.004497] RIP: 0010:_raw_spin_unlock_irqrestore+0x57/0x80
[117.004499] Code: 00 75 1c 65 ff 0d d9 34 68 01 74 20 5b 41 5c 5d 31 c0 31 d2 31 c9 31 f6 31 ff c3 cc cc cc cc e8 7f 9d d3 fe fb 0f 1f 44 00 00 <eb> d7 0f 1f 44 00 00 5b 41 5c 5d 31 c0 31 d2 31 c9 31 f6 31 ff c3
[117.004499] RSP: 0018:ffffc90000003cf0 EFLAGS: 00000246
[117.004500] RAX: 0000000000000000 RBX: ffff888155e94c40 RCX: 0000000000000000
[117.004501] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[117.004502] RBP: ffffc90000003d00 R08: 0000000000000000 R09: 0000000000000000
[117.004502] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000246
[117.004502] R13: 0000000000000001 R14: 0000000000000246 R15: ffff888155e94c80
[117.004506] dma_fence_signal+0x49/0xb0
[117.004507] ? __pfx_vgem_fence_timeout+0x10/0x10 [vgem]
[117.004508] vgem_fence_timeout+0x12/0x20 [vgem]
[117.004509] call_timer_fn+0xa1/0x2a0
[117.004512] ? __pfx_vgem_fence_timeout+0x10/0x10 [vgem]
[117.004513] __run_timers+0x231/0x310
[117.004514] ? tmigr_handle_remote+0x2ac/0x560
[117.004517] timer_expire_remote+0x46/0x70
[117.004518] tmigr_handle_remote+0x433/0x560
[117.004520] ? __run_timers+0x239/0x310
[117.004521] ? run_timer_softirq+0x21/0xe0
[117.004522] ? lock_release+0xce/0x2a0
[117.004524] run_timer_softirq+0xcf/0xe0
[117.004525] handle_softirqs+0xd4/0x4d0
[117.004526] __irq_exit_rcu+0x13f/0x160
[117.004527] irq_exit_rcu+0xe/0x20
[117.004528] sysvec_apic_timer_interrupt+0xa0/0xc0
[117.004529] </IRQ>
[117.004529] <TASK>
[117.004529] asm_sysvec_apic_timer_interrupt+0x1b/0x20
[117.004530] RIP: 0010:cpuidle_enter_state+0x12b/0x8a0
[117.004532] Code: 48 0f a3 05 97 ce 0e 01 0f 82 2e 03 00 00 31 ff e8 8a 41 bd fe 80 7d d0 00 0f 85 11 03 00 00 e8 8b 06 d5 fe fb 0f 1f 44 00 00 <45> 85 f6 0f 88 67 02 00 00 4d 63 ee 49 83 fd 0a 0f 83 34 06 00 00
[117.004532] RSP: 0018:ffffffff83403d88 EFLAGS: 00000246
[117.004533] RAX: 0000000000000000 RBX: ffff88888f046440 RCX: 0000000000000000
[117.004533] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[117.004534] RBP: ffffffff83403dd8 R08: 0000000000000000 R09: 0000000000000000
[117.004534] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff837cbe80
[117.004534] R13: 0000000000000004 R14: 0000000000000004 R15: 0000001ad1df466b
[117.004537] ? cpuidle_enter_state+0x125/0x8a0
[117.004538] ? sched_clock_noinstr+0x9/0x10
[117.004540] cpuidle_enter+0x2e/0x50
[117.004542] call_cpuidle+0x22/0x60
[117.004542] do_idle+0x1fd/0x260
[117.004544] cpu_startup_entry+0x29/0x30
[117.004546] rest_init+0x104/0x200
[117.004548] start_kernel+0x93d/0xbd0
[117.004550] ? load_ucode_intel_bsp+0x2a/0x90
[117.004551] ? sme_unmap_bootdata+0x14/0x80
[117.004554] x86_64_start_reservations+0x18/0x30
[117.004555] x86_64_start_kernel+0xfd/0x150
[117.004556] ? soft_restart_cpu+0x14/0x14
[117.004558] common_startup_64+0x13e/0x141
[117.004560] </TASK>
[117.004565] ------------[ cut here ]------------
[117.004692] WARNING: CPU: 0 PID: 0 at kernel/time/timer.c:1610 __timer_delete_sync+0x126/0x190
[117.004697] Modules linked in: vgem snd_hda_codec_intelhdmi snd_hda_codec_hdmi i915 prime_numbers ttm drm_buddy drm_display_helper cec rc_core i2c_algo_bit hid_sensor_custom hid_sensor_hub hid_generic intel_ishtp_hid hid intel_uncore_frequency intel_uncore_frequency_common x86_pkg_temp_thermal intel_powerclamp cmdlinepart ee1004 r8153_ecm spi_nor coretemp cdc_ether mei_pxp mei_hdcp usbnet mtd intel_rapl_msr wmi_bmof kvm_intel snd_hda_intel snd_intel_dspcfg processor_thermal_device_pci kvm snd_hda_codec processor_thermal_device irqbypass processor_thermal_wt_hint polyval_clmulni platform_temperature_control snd_hda_core ghash_clmulni_intel processor_thermal_rfim spi_pxa2xx_platform snd_hwdep aesni_intel processor_thermal_rapl dw_dmac snd_pcm dw_dmac_core intel_rapl_common r8152 rapl mii intel_cstate spi_pxa2xx_core i2c_i801 processor_thermal_wt_req snd_timer i2c_mux mei_me intel_ish_ipc processor_thermal_power_floor e1000e snd i2c_smbus spi_intel_pci processor_thermal_mbox mei soundcore intel_ishtp thunderbolt idma64
[117.004733] spi_intel int340x_thermal_zone igen6_edac binfmt_misc intel_skl_int3472_tps68470 intel_pmc_core tps68470_regulator video clk_tps68470 pmt_telemetry pmt_discovery nls_iso8859_1 pmt_class intel_pmc_ssram_telemetry intel_skl_int3472_discrete int3400_thermal intel_hid intel_skl_int3472_common acpi_thermal_rel intel_vsec wmi pinctrl_tigerlake acpi_tad sparse_keymap acpi_pad dm_multipath msr nvme_fabrics fuse efi_pstore nfnetlink autofs4
[117.004782] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G S U 6.17.0-rc7-CI_DRM_17270-g7644974e648c+ #1 PREEMPT(voluntary)
[117.004787] Tainted: [S]=CPU_OUT_OF_SPEC, [U]=USER
[117.004789] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-P DDR4 RVP, BIOS RPLPFWI1.R00.4035.A00.2301200723 01/20/2023
[117.004793] RIP: 0010:__timer_delete_sync+0x126/0x190
[117.004795] Code: 31 c0 45 31 c9 c3 cc cc cc cc 48 8b 75 d0 45 84 f6 74 63 49 c7 45 18 00 00 00 00 48 89 c7 e8 51 46 39 01 f3 90 e9 66 ff ff ff <0f> 0b e9 5f ff ff ff e8 ee e4 0c 00 49 8d 5d 28 45 31 c9 31 c9 4c
[117.004801] RSP: 0018:ffffc90000003a40 EFLAGS: 00010046
[117.004804] RAX: ffffffff815093fb RBX: ffff888138f86aa8 RCX: 0000000000000000
[117.004807] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[117.004809] RBP: ffffc90000003a70 R08: 0000000000000000 R09: 0000000000000000
[117.004812] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff815093fb
[117.004814] R13: ffff888138f86a80 R14: 0000000000000000 R15: 0000000000000000
[117.004817] FS: 0000000000000000(0000) GS:ffff88890b0f7000(0000) knlGS:0000000000000000
[117.004820] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[117.004823] CR2: 00005db8131eb7f0 CR3: 0000000003448000 CR4: 0000000000f52ef0
[117.004826] PKRU: 55555554
[117.004827] Call Trace:
[117.004829] <IRQ>
[117.004831] timer_delete_sync+0x10/0x20
[117.004833] vgem_fence_release+0x19/0x30 [vgem]
[117.004836] dma_fence_release+0xc1/0x3b0
[117.004838] ? dma_fence_release+0xa1/0x3b0
[117.004841] dma_fence_chain_release+0xe7/0x130
[117.004844] dma_fence_release+0xc1/0x3b0
[117.004847] ? _raw_spin_unlock_irqrestore+0x27/0x80
[117.004850] dma_fence_chain_irq_work+0x59/0x80
[117.004853] irq_work_single+0x75/0xa0
[117.004857] irq_work_run_list+0x33/0x60
[117.004860] irq_work_run+0x18/0x40
[117.004863] __sysvec_irq_work+0x35/0x170
[117.004865] sysvec_irq_work+0x47/0xc0
[117.004868] asm_sysvec_irq_work+0x1b/0x20
[117.004871] RIP: 0010:_raw_spin_unlock_irqrestore+0x57/0x80
[117.004874] Code: 00 75 1c 65 ff 0d d9 34 68 01 74 20 5b 41 5c 5d 31 c0 31 d2 31 c9 31 f6 31 ff c3 cc cc cc cc e8 7f 9d d3 fe fb 0f 1f 44 00 00 <eb> d7 0f 1f 44 00 00 5b 41 5c 5d 31 c0 31 d2 31 c9 31 f6 31 ff c3
[117.004879] RSP: 0018:ffffc90000003cf0 EFLAGS: 00000246
[117.004882] RAX: 0000000000000000 RBX: ffff888155e94c40 RCX: 0000000000000000
[117.004884] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[117.004887] RBP: ffffc90000003d00 R08: 0000000000000000 R09: 0000000000000000
[117.004890] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000246
[117.004892] R13: 0000000000000001 R14: 0000000000000246 R15: ffff888155e94c80
[117.004897] dma_fence_signal+0x49/0xb0
[117.004899] ? __pfx_vgem_fence_timeout+0x10/0x10 [vgem]
[117.004902] vgem_fence_timeout+0x12/0x20 [vgem]
[117.004904] call_timer_fn+0xa1/0x2a0
[117.004908] ? __pfx_vgem_fence_timeout+0x10/0x10 [vgem]
[117.004910] __run_timers+0x231/0x310
[117.004913] ? tmigr_handle_remote+0x2ac/0x560
[117.004917] timer_expire_remote+0x46/0x70
[117.004919] tmigr_handle_remote+0x433/0x560
[117.004923] ? __run_timers+0x239/0x310
[117.004925] ? run_timer_softirq+0x21/0xe0
[117.004928] ? lock_release+0xce/0x2a0
[117.004931] run_timer_softirq+0xcf/0xe0
[117.004933] handle_softirqs+0xd4/0x4d0
[117.004936] __irq_exit_rcu+0x13f/0x160
[117.004938] irq_exit_rcu+0xe/0x20
[117.004940] sysvec_apic_timer_interrupt+0xa0/0xc0
[117.004943] </IRQ>
[117.004944] <TASK>
[117.004946] asm_sysvec_apic_timer_interrupt+0x1b/0x20
[117.004949] RIP: 0010:cpuidle_enter_state+0x12b/0x8a0
[117.004953] Code: 48 0f a3 05 97 ce 0e 01 0f 82 2e 03 00 00 31 ff e8 8a 41 bd fe 80 7d d0 00 0f 85 11 03 00 00 e8 8b 06 d5 fe fb 0f 1f 44 00 00 <45> 85 f6 0f 88 67 02 00 00 4d 63 ee 49 83 fd 0a 0f 83 34 06 00 00
[117.004961] RSP: 0018:ffffffff83403d88 EFLAGS: 00000246
[117.004963] RAX: 0000000000000000 RBX: ffff88888f046440 RCX: 0000000000000000
[117.004966] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[117.004968] RBP: ffffffff83403dd8 R08: 0000000000000000 R09: 0000000000000000
[117.004971] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff837cbe80
[117.004974] R13: 0000000000000004 R14: 0000000000000004 R15: 0000001ad1df466b
[117.004978] ? cpuidle_enter_state+0x125/0x8a0
[117.004981] ? sched_clock_noinstr+0x9/0x10
[117.004985] cpuidle_enter+0x2e/0x50
[117.004989] call_cpuidle+0x22/0x60
[117.004991] do_idle+0x1fd/0x260
[117.005001] cpu_startup_entry+0x29/0x30
[117.005004] rest_init+0x104/0x200
[117.005008] start_kernel+0x93d/0xbd0
[117.005011] ? load_ucode_intel_bsp+0x2a/0x90
[117.005014] ? sme_unmap_bootdata+0x14/0x80
[117.005017] x86_64_start_reservations+0x18/0x30
[117.005020] x86_64_start_kernel+0xfd/0x150
[117.005023] ? soft_restart_cpu+0x14/0x14
[117.005026] common_startup_64+0x13e/0x141
[117.005030] </TASK>
[117.005032] irq event stamp: 2282669
[117.005034] hardirqs last enabled at (2282668): [<ffffffff8289db71>] _raw_spin_unlock_irqrestore+0x51/0x80
[117.005038] hardirqs last disabled at (2282669): [<ffffffff82882021>] sysvec_irq_work+0x11/0xc0
[117.005043] softirqs last enabled at (2254702): [<ffffffff8289fd00>] __do_softirq+0x10/0x18
[117.005047] softirqs last disabled at (2254725): [<ffffffff813d4ddf>] __irq_exit_rcu+0x13f/0x160
[117.005051] ---[ end trace 0000000000000000 ]---Make the timer IRQ safe.
[1] https://patchwork.freedesktop.org/series/154987/#rev2
--- drivers/gpu/drm/vgem/vgem_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vgem/vgem_fence.c +1 -1
@@ -79,7 +79,7 @@ static struct dma_fence *vgem_fence_create(struct vgem_file *vfile,dma_fence_init (&fence->base, &vgem_fence_ops, &fence->lock,dma_fence_context_alloc (1 ),1 ); -timer_setup (&fence->timer, vgem_fence_timeout,0 ); +timer_setup (&fence->timer, vgem_fence_timeout,TIMER_IRQSAFE );/* We force the fence to expire within 10s to prevent driver hangs */ mod_timer (&fence->timer, jiffies +VGEM_FENCE_TIMEOUT );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 17/507 bpf: Cleanup unused func args in rqspinlock implementation
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Siddharth Chintamaneni <[email protected]>
[ Upstream commit 56b4d162392dda2365fbc1f482184a24b489d07d ]
cleanup unused function args in check_deadlock* functions.
--- kernel/bpf/rqspinlock.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
kernel/bpf/rqspinlock.c +8 -11
@@ -89,15 +89,14 @@ struct rqspinlock_timeout { DEFINE_PER_CPU_ALIGNED(struct rqspinlock_held, rqspinlock_held_locks);EXPORT_SYMBOL_GPL (rqspinlock_held_locks); -static bool is_lock_released (rqspinlock_t *lock,u32 mask,struct rqspinlock_timeout *ts) +static bool is_lock_released (rqspinlock_t *lock,u32 mask) {if (!(atomic_read_acquire (&lock->val) & (mask)))return true;return false; } -static noinline int check_deadlock_AA(rqspinlock_t *lock, u32 mask, -struct rqspinlock_timeout *ts) +static noinline int check_deadlock_AA(rqspinlock_t *lock) {struct rqspinlock_held *rqh =this_cpu_ptr (&rqspinlock_held_locks);int cnt =min (RES_NR_HELD , rqh->cnt);
@@ -118,8 +117,7 @@ static noinline int check_deadlock_AA(rqspinlock_t *lock, u32 mask,* more locks, which reduce to ABBA). This is not exhaustive, and we rely on * timeouts as the final line of defense. */ -static noinline int check_deadlock_ABBA(rqspinlock_t *lock, u32 mask, -struct rqspinlock_timeout *ts) +static noinline int check_deadlock_ABBA(rqspinlock_t *lock, u32 mask) {struct rqspinlock_held *rqh =this_cpu_ptr (&rqspinlock_held_locks);int rqh_cnt =min (RES_NR_HELD , rqh->cnt);
@@ -142,7 +140,7 @@ static noinline int check_deadlock_ABBA(rqspinlock_t *lock, u32 mask,* Let's ensure to break out of this loop if the lock is available for * us to potentially acquire. */ -if (is_lock_released (lock, mask, ts)) +if (is_lock_released (lock, mask))return 0 ;/*
@@ -198,15 +196,14 @@ static noinline int check_deadlock_ABBA(rqspinlock_t *lock, u32 mask,return 0 ; } -static noinline int check_deadlock(rqspinlock_t *lock, u32 mask, -struct rqspinlock_timeout *ts) +static noinline int check_deadlock(rqspinlock_t *lock, u32 mask) {int ret; - ret =check_deadlock_AA (lock, mask, ts); + ret =check_deadlock_AA (lock);if (ret)return ret; - ret =check_deadlock_ABBA (lock, mask, ts); + ret =check_deadlock_ABBA (lock, mask);if (ret)return ret;
@@ -234,7 +231,7 @@ static noinline int check_timeout(rqspinlock_t *lock, u32 mask,*/ if (prev +NSEC_PER_MSEC < time) { ts->cur = time; -return check_deadlock (lock, mask, ts); +return check_deadlock (lock, mask); }return 0 ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 18/507 tools/nolibc: handle NULL wstatus argument to waitpid()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <[email protected]>
[ Upstream commit 812f223fe9be03dc22abb85240b6f075135d2386 ]
wstatus is allowed to be NULL. Avoid a segmentation fault in this case.
--- tools/include/nolibc/sys/wait.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
tools/include/nolibc/sys/wait.h +12 -6
@@ -82,23 +82,29 @@ pid_t waitpid(pid_t pid, int *status, int options)switch (info.si_code) {case 0 : - *status =0 ; +if (status) + *status =0 ;break ;case CLD_EXITED : - *status = (info.si_status &0xff ) <<8 ; +if (status) + *status = (info.si_status &0xff ) <<8 ;break ;case CLD_KILLED : - *status = info.si_status &0x7f ; +if (status) + *status = info.si_status &0x7f ;break ;case CLD_DUMPED : - *status = (info.si_status &0x7f ) |0x80 ; +if (status) + *status = (info.si_status &0x7f ) |0x80 ;break ;case CLD_STOPPED :case CLD_TRAPPED : - *status = (info.si_status <<8 ) +0x7f ; +if (status) + *status = (info.si_status <<8 ) +0x7f ;break ;case CLD_CONTINUED : - *status =0xffff ; +if (status) + *status =0xffff ;break ;default :return -1 ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 19/507 USB: Fix descriptor count when handling invalid MBIM extended descriptor
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Seungjin Bae <[email protected]>
[ Upstream commit 5570ad1423ee60f6e972dadb63fb2e5f90a54cbe ]
In cdc_parse_cdc_header(), the check for the USB_CDC_MBIM_EXTENDED_TYPE descriptor was using 'break' upon detecting an invalid length.
This was incorrect because 'break' only exits the switch statement, causing the code to fall through to cnt++, thus incorrectly incrementing the count of parsed descriptors for a descriptor that was actually invalid and being discarded.
This patch changes 'break' to 'goto next_desc;' to ensure that the logic skips the counter increment and correctly proceeds to the next descriptor in the buffer. This maintains an accurate count of only the successfully parsed descriptors.
--- drivers/usb/core/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/core/message.c +1 -1
@@ -2431,7 +2431,7 @@ int cdc_parse_cdc_header(struct usb_cdc_parsed_header *hdr,break ;case USB_CDC_MBIM_EXTENDED_TYPE :if (elength <sizeof (struct usb_cdc_mbim_extended_desc )) -break ; + goto next_desc; hdr->usb_cdc_mbim_extended_desc = (struct usb_cdc_mbim_extended_desc *)buffer;break ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 20/507 perf bpf_counter: Fix opening of "any"(-1) CPU events
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
[ Upstream commit 2a67955de13624ec17d1c2504d2c9eeb37933b77 ]
The bperf BPF counter code doesn't handle "any"(-1) CPU events, always wanting to aggregate a count against a CPU, which avoids the need for atomics so let's not change that. Force evsels used for BPF counters to require a CPU when not in system-wide mode so that the "any"(-1) value isn't used during map propagation and evsel's CPU map matches that of the PMU.
--- tools/perf/builtin-stat.c | 13 +++++++++++++ tools/perf/util/bpf_counter.c | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-)
tools/perf/builtin-stat.c +13 -0
@@ -2511,6 +2511,7 @@ int cmd_stat(int argc, const char **argv)unsigned int interval, timeout;const char *const stat_subcommands[] = {"record" ,"report" };char errbuf[BUFSIZ ]; +struct evsel *counter;setlocale (LC_ALL ,"" );
@@ -2768,6 +2769,18 @@ int cmd_stat(int argc, const char **argv)evlist__warn_user_requested_cpus (evsel_list, target.cpu_list); +evlist__for_each_entry (evsel_list, counter) { +/* +* Setup BPF counters to require CPUs as any(-1) isn't +* supported. evlist__create_maps below will propagate this +* information to the evsels. Note, evsel__is_bperf isn't yet +* set up, and this change must happen early, so directly use +* the bpf_counter variable and target information. +*/ +if ((counter->bpf_counter || target.use_bpf) && !target__has_cpu (&target)) + counter->core.requires_cpu = true; + } +if (evlist__create_maps (evsel_list, &target) <0 ) {if (target__has_task (&target)) {pr_err ("Problems finding threads of monitor\n" );
tools/perf/util/bpf_counter.c +6 -1
@@ -402,6 +402,7 @@ static int bperf_reload_leader_program(struct evsel *evsel, int attr_map_fd,struct bperf_leader_bpf *skel =bperf_leader_bpf__open ();int link_fd, diff_map_fd, err;struct bpf_link *link =NULL ; +struct perf_thread_map *threads;if (!skel) {pr_err ("Failed to open leader skeleton\n" );
@@ -437,7 +438,11 @@ static int bperf_reload_leader_program(struct evsel *evsel, int attr_map_fd,* following evsel__open_per_cpu call */ evsel->leader_skel = skel; -evsel__open (evsel, evsel->core.cpus, evsel->core.threads); +assert (!perf_cpu_map__has_any_cpu_or_is_empty (evsel->core.cpus)); +/* Always open system wide. */ + threads =thread_map__new_by_tid (-1 ); +evsel__open (evsel, evsel->core.cpus, threads); +perf_thread_map__put (threads); out:bperf_leader_bpf__destroy (skel);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 21/507 ima: Attach CREDS_CHECK IMA hook to bprm_creds_from_file LSM hook
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roberto Sassu <[email protected]>
[ Upstream commit 8f3fc4f3f8aa6e99266c69cc78bdaa58379e65fc ]
Since commit 56305aa9b6fa ("exec: Compute file based creds only once"), the credentials to be applied to the process after execution are not calculated anymore for each step of finding intermediate interpreters (including the final binary), but only after the final binary to be executed without interpreter has been found.
In particular, that means that the bprm_check_security LSM hook will not see the updated cred->e[ug]id for the intermediate and for the final binary to be executed, since the function doing this task has been moved from prepare_binprm(), which calls the bprm_check_security hook, to bprm_creds_from_file().
This breaks the IMA expectation for the CREDS_CHECK hook, introduced with commit d906c10d8a31 ("IMA: Support using new creds in appraisal policy"), which expects to evaluate "the credentials that will be committed when the new process is started". This is clearly not the case for the CREDS_CHECK IMA hook, which is attached to bprm_check_security.
This issue does not affect systems which load a policy with the BPRM_CHECK hook with no other criteria, as is the case with the built-in "tcb" and/or "appraise_tcb" IMA policies. The "tcb" built-in policy measures all executions regardless of the new credentials, and the "appraise_tcb" policy is written in terms of the file owner, rather than IMA hooks.
However, it does affect systems without a BPRM_CHECK policy rule or with a BPRM_CHECK policy rule that does not include what CREDS_CHECK evaluates. As an extreme example, taking a standalone rule like:
measure func=CREDS_CHECK euid=0
This will not measure for example sudo (because CREDS_CHECK still sees the bprm->cred->euid set to the regular user UID), but only the subsequent commands after the euid was applied to the children.
Make set[ug]id programs measured/appraised again by splitting ima_bprm_check() in two separate hook implementations (CREDS_CHECK now being implemented by ima_creds_check()), and by attaching CREDS_CHECK to the bprm_creds_from_file LSM hook.
The limitation of this approach is that CREDS_CHECK will not be invoked anymore for the intermediate interpreters, like it was before, but only for the final binary. This limitation can be removed only by reverting commit 56305aa9b6fa ("exec: Compute file based creds only once").
--- security/integrity/ima/ima_main.c | 42 ++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 9 deletions(-)
security/integrity/ima/ima_main.c +33 -9
@@ -573,18 +573,41 @@ static int ima_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot,*/ static int ima_bprm_check (struct linux_binprm *bprm) { -int ret;struct lsm_prop prop;security_current_getlsmprop_subj (&prop); - ret =process_measurement (bprm->file,current_cred (), - &prop,NULL ,0 ,MAY_EXEC ,BPRM_CHECK ); -if (ret) -return ret; - -security_cred_getlsmprop (bprm->cred, &prop); -return process_measurement (bprm->file, bprm->cred, &prop,NULL ,0 , -MAY_EXEC ,CREDS_CHECK ); +return process_measurement (bprm->file,current_cred (), + &prop,NULL ,0 ,MAY_EXEC ,BPRM_CHECK ); +} + +/** +* ima_creds_check - based on policy, collect/store measurement. +* @bprm: contains the linux_binprm structure +* @file: contains the file descriptor of the binary being executed +* +* The OS protects against an executable file, already open for write, +* from being executed in deny_write_access() and an executable file, +* already open for execute, from being modified in get_write_access(). +* So we can be certain that what we verify and measure here is actually +* what is being executed. +* +* The difference from ima_bprm_check() is that ima_creds_check() is invoked +* only after determining the final binary to be executed without interpreter, +* and not when searching for intermediate binaries. The reason is that since +* commit 56305aa9b6fab ("exec: Compute file based creds only once"), the +* credentials to be applied to the process are calculated only at that stage +* (bprm_creds_from_file security hook instead of bprm_check_security). +* +* On success return 0. On integrity appraisal error, assuming the file +* is in policy and IMA-appraisal is in enforcing mode, return -EACCES. +*/ +static int ima_creds_check (struct linux_binprm *bprm,const struct file *file) +{ +struct lsm_prop prop; + +security_current_getlsmprop_subj (&prop); +return process_measurement ((struct file *)file, bprm->cred, &prop,NULL , +0 ,MAY_EXEC ,CREDS_CHECK ); }/**
@@ -1242,6 +1265,7 @@ static int __init init_ima(void)static struct security_hook_list ima_hooks[]__ro_after_init = {LSM_HOOK_INIT (bprm_check_security, ima_bprm_check),LSM_HOOK_INIT (bprm_creds_for_exec, ima_bprm_creds_for_exec), +LSM_HOOK_INIT (bprm_creds_from_file, ima_creds_check),LSM_HOOK_INIT (file_post_open, ima_file_check),LSM_HOOK_INIT (inode_post_create_tmpfile, ima_post_create_tmpfile),LSM_HOOK_INIT (file_release, ima_file_free),
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 22/507 pinctrl: renesas: rzg2l: Fix PMC restore
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Biju Das <[email protected]>
[ Upstream commit cea950101108b7bfffe26ec4007b8e263a4b56a8 ]
PMC restore needs unlocking the register using the PWPR register.
--- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/pinctrl/renesas/pinctrl-rzg2l.c +5 -1
@@ -3008,7 +3008,11 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen* Now cache the registers or set them in the order suggested by * HW manual (section "Operation for GPIO Function"). */ -RZG2L_PCTRL_REG_ACCESS8 (suspend, pctrl->base +PMC (off), cache->pmc[port]); +if (suspend) +RZG2L_PCTRL_REG_ACCESS8 (suspend, pctrl->base +PMC (off), cache->pmc[port]); +else + pctrl->data->pmc_writeb (pctrl, cache->pmc[port],PMC (off)); +if (has_iolh) {RZG2L_PCTRL_REG_ACCESS32 (suspend, pctrl->base +IOLH (off), cache->iolh[0 ][port]);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 23/507 clk: renesas: cpg-mssr: Add missing 1ms delay into reset toggle callback
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <[email protected]>
[ Upstream commit 62abfd7bedc2b3d86d4209a4146f9d2b5ae21fab ]
R-Car V4H Reference Manual R19UH0186EJ0130 Rev.1.30 Apr. 21, 2025 page 583 Figure 9.3.1(a) Software Reset flow (A) as well as flow (B) / (C) indicate after reset has been asserted by writing a matching reset bit into register SRCR, it is mandatory to wait 1ms.
This 1ms delay is documented on R-Car V4H and V4M, it is currently unclear whether S4 is affected as well. This patch does apply the extra delay on R-Car S4 as well.
Fix the reset driver to respect the additional delay when toggling resets. Drivers which use separate reset_control_(de)assert() must assure matching delay in their driver code.
--- drivers/clk/renesas/renesas-cpg-mssr.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/clk/renesas/renesas-cpg-mssr.c +9 -2
@@ -689,8 +689,15 @@ static int cpg_mssr_reset(struct reset_controller_dev *rcdev,/* Reset module */ writel (bitmask, priv->pub.base0 + priv->reset_regs[reg]); -/* Wait for at least one cycle of the RCLK clock (@ ca. 32 kHz) */ -udelay (35 ); +/* +* On R-Car Gen4, delay after SRCR has been written is 1ms. +* On older SoCs, delay after SRCR has been written is 35us +* (one cycle of the RCLK clock @ ca. 32 kHz). +*/ +if (priv->reg_layout ==CLK_REG_LAYOUT_RCAR_GEN4 ) +usleep_range (1000 ,2000 ); +else +usleep_range (35 ,1000 );/* Release module from reset state */ writel (bitmask, priv->pub.base0 + priv->reset_clear_regs[reg]);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 24/507 clk: renesas: cpg-mssr: Read back reset registers to assure values latched
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <[email protected]>
[ Upstream commit b91401af6c00ffab003698bfabd4c166df30748b ]
On R-Car V4H, the PCIEC controller DBI read would generate an SError in case the controller reset is released by writing SRSTCLR register first, and immediately afterward reading some PCIEC controller DBI register. The issue triggers in rcar_gen4_pcie_additional_common_init() on dw_pcie_readl_dbi(dw, PCIE_PORT_LANE_SKEW), which on V4H is the first read after reset_control_deassert(dw->core_rsts[DW_PCIE_PWR_RST].rstc).
The reset controller which contains the SRSTCLR register and the PCIEC controller which contains the DBI register share the same root access bus, but the bus then splits into separate segments before reaching each IP. Even if the SRSTCLR write access was posted on the bus before the DBI read access, it seems the DBI read access may reach the PCIEC controller before the SRSTCLR write completed, and trigger the SError.
Mitigate the issue by adding a dummy SRSTCLR read, which assures the SRSTCLR write completes fully and is latched into the reset controller, before the PCIEC DBI read access can occur.
--- drivers/clk/renesas/renesas-cpg-mssr.c | 46 ++++++++++++-------------- 1 file changed, 21 insertions(+), 25 deletions(-)
drivers/clk/renesas/renesas-cpg-mssr.c +21 -25
@@ -676,18 +676,32 @@ static int __init cpg_mssr_add_clk_domain(struct device *dev,#define rcdev_to_priv (x) container_of(x, struct cpg_mssr_priv, rcdev) -static int cpg_mssr_reset (struct reset_controller_dev *rcdev, -unsigned long id) +static int cpg_mssr_reset_operate (struct reset_controller_dev *rcdev, +const char *func,bool set,unsigned long id) {struct cpg_mssr_priv *priv =rcdev_to_priv (rcdev);unsigned int reg = id /32 ;unsigned int bit = id %32 ; +const u16 off = set ? priv->reset_regs[reg] : priv->reset_clear_regs[reg];u32 bitmask =BIT (bit); -dev_dbg (priv->dev,"reset %u%02u\n" , reg, bit); +if (func) +dev_dbg (priv->dev,"%s %u%02u\n" , func, reg, bit); + +writel (bitmask, priv->pub.base0 + off); +readl (priv->pub.base0 + off); +barrier_data (priv->pub.base0 + off); + +return 0 ; +} + +static int cpg_mssr_reset (struct reset_controller_dev *rcdev, +unsigned long id) +{ +struct cpg_mssr_priv *priv =rcdev_to_priv (rcdev);/* Reset module */ -writel (bitmask, priv->pub.base0 + priv->reset_regs[reg]); +cpg_mssr_reset_operate (rcdev,"reset" , true, id);/* * On R-Car Gen4, delay after SRCR has been written is 1ms.
@@ -700,36 +714,18 @@ static int cpg_mssr_reset(struct reset_controller_dev *rcdev,usleep_range (35 ,1000 );/* Release module from reset state */ -writel (bitmask, priv->pub.base0 + priv->reset_clear_regs[reg]); - -return 0 ; +return cpg_mssr_reset_operate (rcdev,NULL , false, id); }static int cpg_mssr_assert (struct reset_controller_dev *rcdev,unsigned long id) { -struct cpg_mssr_priv *priv =rcdev_to_priv (rcdev); -unsigned int reg = id /32 ; -unsigned int bit = id %32 ; -u32 bitmask =BIT (bit); - -dev_dbg (priv->dev,"assert %u%02u\n" , reg, bit); - -writel (bitmask, priv->pub.base0 + priv->reset_regs[reg]); -return 0 ; +return cpg_mssr_reset_operate (rcdev,"assert" , true, id); }static int cpg_mssr_deassert (struct reset_controller_dev *rcdev,unsigned long id) { -struct cpg_mssr_priv *priv =rcdev_to_priv (rcdev); -unsigned int reg = id /32 ; -unsigned int bit = id %32 ; -u32 bitmask =BIT (bit); - -dev_dbg (priv->dev,"deassert %u%02u\n" , reg, bit); - -writel (bitmask, priv->pub.base0 + priv->reset_clear_regs[reg]); -return 0 ; +return cpg_mssr_reset_operate (rcdev,"deassert" , false, id); } static int cpg_mssr_status(struct reset_controller_dev *rcdev,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 25/507 drm: atmel-hlcdc: fix atmel_xlcdc_plane_setup_scaler()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cyrille Pitchen <[email protected]>
[ Upstream commit a312acdcec57b3955fbf1f3057c13a6d38e4aa2a ]
On SoCs, like the SAM9X75, which embed the XLCDC ip, the registers that configure the unified scaling engine were not filled with proper values.
Indeed, for YCbCr formats, the VXSCFACT bitfield of the HEOCFG25 register and the HXSCFACT bitfield of the HEOCFG27 register were incorrect.
For 4:2:0 formats, both vertical and horizontal factors for chroma chanels should be divided by 2 from the factors for the luma channel. Hence:
HEOCFG24.VXSYFACT = VFACTOR
HEOCFG25.VSXCFACT = VFACTOR / 2
HEOCFG26.HXSYFACT = HFACTOR
HEOCFG27.HXSCFACT = HFACTOR / 2
However, for 4:2:2 formats, only the horizontal factor for chroma chanels should be divided by 2 from the factor for the luma channel; the vertical factor is the same for all the luma and chroma channels. Hence:
HEOCFG24.VXSYFACT = VFACTOR
HEOCFG25.VXSCFACT = VFACTOR
HEOCFG26.HXSYFACT = HFACTOR
HEOCFG27.HXSCFACT = HFACTOR / 2
--- .../gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-)
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +24 -3
@@ -365,13 +365,34 @@ void atmel_xlcdc_plane_setup_scaler(struct atmel_hlcdc_plane *plane, xfactor);/* -* With YCbCr 4:2:2 and YCbYcr 4:2:0 window resampling, configuration -* register LCDC_HEOCFG25.VXSCFACT and LCDC_HEOCFG27.HXSCFACT is half +* With YCbCr 4:2:0 window resampling, configuration register +* LCDC_HEOCFG25.VXSCFACT and LCDC_HEOCFG27.HXSCFACT values are half * the value of yfactor and xfactor. +* +* On the other hand, with YCbCr 4:2:2 window resampling, only the +* configuration register LCDC_HEOCFG27.HXSCFACT value is half the value +* of the xfactor; the value of LCDC_HEOCFG25.VXSCFACT is yfactor (no +* division by 2). */ -if (state->base.fb->format->format ==DRM_FORMAT_YUV420 ) { +switch (state->base.fb->format->format) { +/* YCbCr 4:2:2 */ +case DRM_FORMAT_YUYV : +case DRM_FORMAT_UYVY : +case DRM_FORMAT_YVYU : +case DRM_FORMAT_VYUY : +case DRM_FORMAT_YUV422 : +case DRM_FORMAT_NV61 : + xfactor /=2 ; +break ; + +/* YCbCr 4:2:0 */ +case DRM_FORMAT_YUV420 : +case DRM_FORMAT_NV21 : yfactor /=2 ; xfactor /=2 ; +break ; +default : +break ; } atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config + 2,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 26/507 HID: logitech-hidpp: Do not assume FAP in hidpp_send_message_sync()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mavroudis Chatzilazaridis <[email protected]>
[ Upstream commit aba7963544d47d82cdf36602a6678a093af0299d ]
Currently, hidpp_send_message_sync() retries sending the message when the device returns a busy error code, specifically HIDPP20_ERROR_BUSY, which has a different meaning under RAP. This ends up being a problem because this function is used for both FAP and RAP messages.
This issue is not noticeable on older receivers with unreachable devices since they return HIDPP_ERROR_RESOURCE_ERROR (0x09), which is not equal to HIDPP20_ERROR_BUSY (0x08).
However, newer receivers return HIDPP_ERROR_UNKNOWN_DEVICE (0x08) which happens to equal to HIDPP20_ERROR_BUSY, causing unnecessary retries when the device is not actually busy.
This is resolved by checking if the error response is FAP or RAP and picking the respective ERROR_BUSY code.
--- drivers/hid/hid-logitech-hidpp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/hid/hid-logitech-hidpp.c +7 -2
@@ -352,10 +352,15 @@ static int hidpp_send_message_sync(struct hidpp_device *hidpp,do { ret =__do_hidpp_send_message_sync (hidpp, message, response); -if (ret !=HIDPP20_ERROR_BUSY ) +if (response->report_id ==REPORT_ID_HIDPP_SHORT && + ret !=HIDPP_ERROR_BUSY ) +break ; +if ((response->report_id ==REPORT_ID_HIDPP_LONG || + response->report_id ==REPORT_ID_HIDPP_VERY_LONG ) && + ret !=HIDPP20_ERROR_BUSY )break ; -dbg_hid ("%s:got busy hidpp 2.0 error %02X, retrying\n" , __func__, ret); +dbg_hid ("%s:got busy hidpp error %02X, retrying\n" , __func__, ret); }while (--max_retries);mutex_unlock (&hidpp->send_mutex);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 27/507 remoteproc: imx_rproc: Fix runtime PM cleanup and improve remove path
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <[email protected]>
[ Upstream commit 80405a34e1f8975cdb2d7d8679bca7f768861035 ]
Proper cleanup should be done when rproc_add() fails by invoking both pm_runtime_disable() and pm_runtime_put_noidle() to avoid leaving the device in an inconsistent power state.
Fix it by adding pm_runtime_put_noidle() and pm_runtime_disable() in the error path.
Also Update the remove() callback to use pm_runtime_put_noidle() instead of pm_runtime_put(), to clearly indicate that only need to restore the usage count.
--- drivers/remoteproc/imx_rproc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/remoteproc/imx_rproc.c +7 -2
@@ -1174,11 +1174,16 @@ static int imx_rproc_probe(struct platform_device *pdev) ret =rproc_add (rproc);if (ret) {dev_err (dev,"rproc_add failed\n" ); - goto err_put_clk; + goto err_put_pm; }return 0 ; +err_put_pm: +if (dcfg->method ==IMX_RPROC_SCU_API ) { +pm_runtime_disable (dev); +pm_runtime_put_noidle (dev); + } err_put_clk:clk_disable_unprepare (priv->clk); err_put_scu:
@@ -1198,7 +1203,7 @@ static void imx_rproc_remove(struct platform_device *pdev)if (priv->dcfg->method ==IMX_RPROC_SCU_API ) {pm_runtime_disable (priv->dev); -pm_runtime_put (priv->dev); +pm_runtime_put_noidle (priv->dev); }clk_disable_unprepare (priv->clk);rproc_del (rproc);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 28/507 objtool: Fix standalone --hacks=jump_label
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dylan Hatch <[email protected]>
[ Upstream commit be8374a5ba7cbab6b97df94b4ffe0b92f5c8a6d2 ]
The objtool command line 'objtool --hacks=jump_label foo.o' on its own should be expected to rewrite jump labels to NOPs. This means the add_special_section_alts() code path needs to run when only this option is provided.
This is mainly relevant in certain debugging situations, but could potentially also fix kernel builds in which objtool is run with --hacks=jump_label but without --orc, --stackval, --uaccess, or --hacks=noinstr.
--- tools/objtool/check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/objtool/check.c +2 -1
@@ -2563,7 +2563,8 @@ static int decode_sections(struct objtool_file *file)* Must be before add_jump_destinations(), which depends on 'func' * being set for alternatives, to enable proper sibling call detection. */ -if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr) { +if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr || + opts.hack_jump_label) { ret =add_special_section_alts (file);if (ret)return ret;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 29/507 objtool: Fix weak symbol detection
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 72567c630d32bc31f671977f78228c80937ed80e ]
find_symbol_hole_containing() fails to find a symbol hole (aka stripped weak symbol) if its section has no symbols before the hole. This breaks weak symbol detection if -ffunction-sections is enabled.
Fix that by allowing the interval tree to contain section symbols, which are always at offset zero for a given section.
Fixes a bunch of (-ffunction-sections) warnings like:
vmlinux.o: warning: objtool: .text.__x64_sys_io_setup+0x10: unreachable instruction
--- tools/objtool/elf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tools/objtool/elf.c +4 -4
@@ -108,7 +108,7 @@ struct symbol_hole { };/* -* Find !section symbol where @offset is after it. +* Find the last symbol before @offset. */ static int symbol_hole_by_offset (const void *key,const struct rb_node *node) {
@@ -119,8 +119,7 @@ static int symbol_hole_by_offset(const void *key, const struct rb_node *node)return -1 ;if (sh->key >= s->offset + s->len) { -if (s->type !=STT_SECTION ) - sh->sym = s; + sh->sym = s;return 1 ; }
@@ -412,7 +411,8 @@ static void elf_add_symbol(struct elf *elf, struct symbol *sym) sym->len = sym->sym.st_size;__sym_for_each (iter, &sym->sec->symbol_tree, sym->offset, sym->offset) { -if (iter->offset == sym->offset && iter->type == sym->type) +if (iter->offset == sym->offset && iter->type == sym->type && + iter->len == sym->len) iter->alias = sym; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 30/507 accel/ivpu: Fix race condition when mapping dmabuf
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wludzik, Jozef <[email protected]>
[ Upstream commit 63c7870fab67b2ab2bfe75e8b46f3c37b88c47a8 ]
Fix a race that can occur when multiple jobs submit the same dmabuf. This could cause the sg_table to be mapped twice, leading to undefined behavior.
--- drivers/accel/ivpu/ivpu_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/accel/ivpu/ivpu_gem.c +2 -1
@@ -45,12 +45,13 @@ static inline void ivpu_bo_unlock(struct ivpu_bo *bo)static struct sg_table *ivpu_bo_map_attachment (struct ivpu_device *vdev,struct ivpu_bo *bo) { -struct sg_table *sgt = bo->base.sgt; +struct sg_table *sgt;drm_WARN_ON (&vdev->drm, !bo->base.base.import_attach);ivpu_bo_lock (bo); + sgt = bo->base.sgt;if (!sgt) { sgt =dma_buf_map_attachment (bo->base.base.import_attach,DMA_BIDIRECTIONAL );if (IS_ERR (sgt))
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 31/507 perf parse-events: Fix legacy cache events if event is duplicated in a PMU
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
[ Upstream commit b7b76f607a15f16031001687e733046b5f6f5d86 ]
The term list when adding an event to a PMU is expected to have the event name for the alias lookup. Also, set found_supported so that -EINVAL isn't returned.
PMUs and lower priority")
--- tools/perf/util/parse-events.c | 28 +++++++++++++++++++++++++++- tools/perf/util/parse-events.h | 3 ++- tools/perf/util/parse-events.y | 2 +- 3 files changed, 30 insertions(+), 3 deletions(-)
tools/perf/util/parse-events.c +27 -1
@@ -475,8 +475,10 @@ static int parse_events_add_pmu(struct parse_events_state *parse_state,int parse_events_add_cache (struct list_head *list,int *idx,const char *name,struct parse_events_state *parse_state, -struct parse_events_terms *parsed_terms) +struct parse_events_terms *parsed_terms, +void *loc_) { +YYLTYPE *loc = loc_;struct perf_pmu *pmu =NULL ;bool found_supported = false;const char *config_name =get_config_name (parsed_terms);
@@ -497,12 +499,36 @@ int parse_events_add_cache(struct list_head *list, int *idx, const char *name,* The PMU has the event so add as not a legacy cache * event. */ +struct parse_events_terms temp_terms; +struct parse_events_term *term; +char *config =strdup (name); + +if (!config) + goto out_err; + +parse_events_terms__init (&temp_terms); +if (!parsed_terms) + parsed_terms = &temp_terms; + +if (parse_events_term__num (&term, +PARSE_EVENTS__TERM_TYPE_USER , + config,/*num=*/ 1 ,/*novalue=*/ true, + loc,/*loc_val=*/ NULL ) <0 ) { +zfree (&config); + goto out_err; + } +list_add (&term->list, &parsed_terms->terms); + ret =parse_events_add_pmu (parse_state, list, pmu, parsed_terms, first_wildcard_match,/*alternate_hw_config=*/ PERF_COUNT_HW_MAX ); +list_del_init (&term->list); +parse_events_term__delete (term); +parse_events_terms__exit (&temp_terms);if (ret) goto out_err; + found_supported = true;if (first_wildcard_match ==NULL ) first_wildcard_match = container_of(list->prev, struct evsel, core.node);
tools/perf/util/parse-events.h +2 -1
@@ -235,7 +235,8 @@ int parse_events_add_numeric(struct parse_events_state *parse_state, bool wildcard);int parse_events_add_cache (struct list_head *list,int *idx,const char *name,struct parse_events_state *parse_state, -struct parse_events_terms *parsed_terms); +struct parse_events_terms *parsed_terms, +void *loc);int parse_events__decode_legacy_cache (const char *name,int pmu_type,__u64 *config); int parse_events_add_breakpoint(struct parse_events_state *parse_state, struct list_head *list,
tools/perf/util/parse-events.y +1 -1
@@ -353,7 +353,7 @@ PE_LEGACY_CACHE opt_event_config if (!list) YYNOMEM; - err = parse_events_add_cache(list, &parse_state->idx, $1, parse_state, $2); + err = parse_events_add_cache(list, &parse_state->idx, $1, parse_state, $2, &@1); parse_events_terms__delete($2); free($1);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 32/507 wifi: ath10k: move recovery check logic into a new work
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kang Yang <[email protected]>
[ Upstream commit f35a07a4842a88801d9182b1a76d178bfa616978 ]
Currently, ath10k has a recovery check logic. It will wait for the last recovery to finish by wait_for_completion_timeout();
But in SDIO scenarios, the recovery function may be invoked from interrupt context, where long blocking waits are undesirable and can lead to system instability.
Additionally, Linux’s ordered workqueue processes one task at a time. If a previous recovery is still queued or executing, new triggers are ignored. This prevents accurate tracking of consecutive failures and delays transition to the WEDGED state.
To address this, move the recovery check logic into a different workqueue.
Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00288-QCARMSWPZ-1
Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00189
--- drivers/net/wireless/ath/ath10k/core.c | 20 +++++++++----------- drivers/net/wireless/ath/ath10k/core.h | 2 +- drivers/net/wireless/ath/ath10k/mac.c | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +9 -11
@@ -3,7 +3,6 @@* Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */
@@ -2493,8 +2492,9 @@ static int ath10k_init_hw_params(struct ath10k *ar)return 0 ; } -static bool ath10k_core_needs_recovery (struct ath10k *ar) +static void ath10k_core_recovery_check_work (struct work_struct *work) { + struct ath10k *ar = container_of(work, struct ath10k, recovery_check_work);long time_left;/* Sometimes the recovery will fail and then the next all recovery fail,
@@ -2504,7 +2504,7 @@ static bool ath10k_core_needs_recovery(struct ath10k *ar)ath10k_err (ar,"consecutive fail %d times, will shutdown driver!" ,atomic_read (&ar->fail_cont_count)); ar->state =ATH10K_STATE_WEDGED ; -return false; +return ; }ath10k_dbg (ar,ATH10K_DBG_BOOT ,"total recovery count: %d" , ++ar->recovery_count);
@@ -2518,27 +2518,24 @@ static bool ath10k_core_needs_recovery(struct ath10k *ar) ATH10K_RECOVERY_TIMEOUT_HZ);if (time_left) {ath10k_warn (ar,"previous recovery succeeded, skip this!\n" ); -return false; +return ; }/* Record the continuous recovery fail count when recovery failed. */ atomic_inc (&ar->fail_cont_count);/* Avoid having multiple recoveries at the same time. */ -return false; +return ; }atomic_inc (&ar->pending_recovery); - -return true; +queue_work (ar->workqueue, &ar->restart_work); }void ath10k_core_start_recovery (struct ath10k *ar) { -if (!ath10k_core_needs_recovery (ar)) -return ; - -queue_work (ar->workqueue, &ar->restart_work); +/* Use workqueue_aux to avoid blocking recovery tracking */ +queue_work (ar->workqueue_aux, &ar->recovery_check_work); }EXPORT_SYMBOL (ath10k_core_start_recovery);
@@ -3734,6 +3731,7 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,INIT_WORK (&ar->register_work, ath10k_core_register_work);INIT_WORK (&ar->restart_work, ath10k_core_restart); +INIT_WORK (&ar->recovery_check_work, ath10k_core_recovery_check_work);INIT_WORK (&ar->set_coverage_class_work, ath10k_core_set_coverage_class_work);
drivers/net/wireless/ath/ath10k/core.h +1 -1
@@ -3,7 +3,6 @@* Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */
@@ -1208,6 +1207,7 @@ struct ath10k {struct work_struct register_work;struct work_struct restart_work; +struct work_struct recovery_check_work;struct work_struct bundle_tx_work;struct work_struct tx_complete_work;
drivers/net/wireless/ath/ath10k/mac.c +1 -1
@@ -3,7 +3,6 @@* Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */
@@ -5428,6 +5427,7 @@ static void ath10k_stop(struct ieee80211_hw *hw, bool suspend)cancel_work_sync (&ar->set_coverage_class_work);cancel_delayed_work_sync (&ar->scan.timeout);cancel_work_sync (&ar->restart_work); +cancel_work_sync (&ar->recovery_check_work); }static int ath10k_config_ps (struct ath10k *ar)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 33/507 wifi: ath11k: restore register window after global reset
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit 596b911644cc19ecba0dbc9c92849fb59390e29a ]
Hardware target implements an address space larger than that PCI BAR can map. In order to be able to access the whole target address space, the BAR space is split into 4 segments, of which the last 3, called windows, can be dynamically mapped to the desired area. This is achieved by updating window register with appropriate window value. Currently each time when accessing a register that beyond ATH11K_PCI_WINDOW_START, host calculates the window value and caches it after window update, this way next time when accessing a register falling in the same window, host knows that the window is already good hence no additional update needed.
However this mechanism breaks after global reset is triggered in ath11k_pci_soc_global_reset(), because with global reset hardware resets window register hence the window is not properly mapped any more. Current host does nothing about this, as a result a subsequent register access may not work as expected if it falls in a window same as before.
Although there is no obvious issue seen now, better to fix it to avoid future problem. The fix is done by restoring the window register after global reset.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
--- drivers/net/wireless/ath/ath11k/pci.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/pci.c +19 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/module.h>
@@ -177,6 +177,19 @@ static inline void ath11k_pci_select_static_window(struct ath11k_pci *ab_pci) ab_pci->ab->mem + ATH11K_PCI_WINDOW_REG_ADDRESS); } +static void ath11k_pci_restore_window (struct ath11k_base *ab) +{ +struct ath11k_pci *ab_pci =ath11k_pci_priv (ab); + +spin_lock_bh (&ab_pci->window_lock); + +iowrite32 (ATH11K_PCI_WINDOW_ENABLE_BIT | ab_pci->register_window, + ab->mem +ATH11K_PCI_WINDOW_REG_ADDRESS ); +ioread32 (ab->mem +ATH11K_PCI_WINDOW_REG_ADDRESS ); + +spin_unlock_bh (&ab_pci->window_lock); +} +static void ath11k_pci_soc_global_reset (struct ath11k_base *ab) {u32 val, delay;
@@ -201,6 +214,11 @@ static void ath11k_pci_soc_global_reset(struct ath11k_base *ab) val =ath11k_pcic_read32 (ab,PCIE_SOC_GLOBAL_RESET );if (val ==0xffffffff )ath11k_warn (ab,"link down error during global reset\n" ); + +/* Restore window register as its content is cleared during +* hardware global reset, such that it aligns with host cache. +*/ +ath11k_pci_restore_window (ab); }static void ath11k_pci_clear_dbg_registers (struct ath11k_base *ab)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 34/507 wifi: ath12k: Fix MSDU buffer types handling in RX error path
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sarika Sharma <[email protected]>
[ Upstream commit 36f9edbb9d0fc36c865c74f3c1ad8e1261ad3981 ]
Currently, packets received on the REO exception ring from unassociated peers are of MSDU buffer type, while the driver expects link descriptor type packets. These packets are not parsed further due to a return check on packet type in ath12k_hal_desc_reo_parse_err(), but the associated skb is not freed. This may lead to kernel crashes and buffer leaks.
Hence to fix, update the RX error handler to explicitly drop MSDU buffer type packets received on the REO exception ring. This prevents further processing of invalid packets and ensures stability in the RX error handling path.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath12k/dp_rx.c | 70 ++++++++++++++++++++++-- drivers/net/wireless/ath/ath12k/hal_rx.c | 10 +--- 2 files changed, 66 insertions(+), 14 deletions(-)
drivers/net/wireless/ath/ath12k/dp_rx.c +64 -6
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/ieee80211.h>
@@ -3690,6 +3690,48 @@ ath12k_dp_process_rx_err_buf(struct ath12k *ar, struct hal_reo_dest_ring *desc,return 0 ; } +static int ath12k_dp_h_msdu_buffer_type (struct ath12k_base *ab, +struct list_head *list, +struct hal_reo_dest_ring *desc) +{ +struct ath12k_rx_desc_info *desc_info; +struct ath12k_skb_rxcb *rxcb; +struct sk_buff *msdu; +u64 desc_va; + + desc_va = (u64 )le32_to_cpu (desc->buf_va_hi) <<32 | +le32_to_cpu (desc->buf_va_lo); + desc_info = (struct ath12k_rx_desc_info *)(uintptr_t )desc_va; +if (!desc_info) { +u32 cookie; + + cookie =le32_get_bits (desc->buf_addr_info.info1, +BUFFER_ADDR_INFO1_SW_COOKIE ); + desc_info =ath12k_dp_get_rx_desc (ab, cookie); +if (!desc_info) { +ath12k_warn (ab,"Invalid cookie in manual descriptor retrieval: 0x%x\n" , + cookie); +return -EINVAL ; + } + } + +if (desc_info->magic !=ATH12K_DP_RX_DESC_MAGIC ) { +ath12k_warn (ab,"rx exception, magic check failed with value: %u\n" , + desc_info->magic); +return -EINVAL ; + } + + msdu = desc_info->skb; + desc_info->skb =NULL ; +list_add_tail (&desc_info->list, list); + rxcb =ATH12K_SKB_RXCB (msdu); +dma_unmap_single (ab->dev, rxcb->paddr, msdu->len +skb_tailroom (msdu), +DMA_FROM_DEVICE ); +dev_kfree_skb_any (msdu); + +return 0 ; +} +int ath12k_dp_rx_process_err (struct ath12k_base *ab,struct napi_struct *napi,int budget) {
@@ -3734,6 +3776,26 @@ int ath12k_dp_rx_process_err(struct ath12k_base *ab, struct napi_struct *napi, drop = false; ab->device_stats.err_ring_pkts++; + hw_link_id =le32_get_bits (reo_desc->info0, +HAL_REO_DEST_RING_INFO0_SRC_LINK_ID ); + device_id = hw_links[hw_link_id].device_id; + partner_ab =ath12k_ag_to_ab (ag, device_id); + +/* Below case is added to handle data packet from un-associated clients. +* As it is expected that AST lookup will fail for +* un-associated station's data packets. +*/ +if (le32_get_bits (reo_desc->info0,HAL_REO_DEST_RING_INFO0_BUFFER_TYPE ) == +HAL_REO_DEST_RING_BUFFER_TYPE_MSDU ) { +if (!ath12k_dp_h_msdu_buffer_type (partner_ab, + &rx_desc_used_list[device_id], + reo_desc)) { + num_buffs_reaped[device_id]++; + tot_n_bufs_reaped++; + } + goto next_desc; + } + ret =ath12k_hal_desc_reo_parse_err (ab, reo_desc, &paddr, &desc_bank);if (ret) {
@@ -3742,11 +3804,6 @@ int ath12k_dp_rx_process_err(struct ath12k_base *ab, struct napi_struct *napi,continue ; } - hw_link_id =le32_get_bits (reo_desc->info0, -HAL_REO_DEST_RING_INFO0_SRC_LINK_ID ); - device_id = hw_links[hw_link_id].device_id; - partner_ab =ath12k_ag_to_ab (ag, device_id); - pdev_id =ath12k_hw_mac_id_to_pdev_id (partner_ab->hw_params, hw_links[hw_link_id].pdev_idx); ar = partner_ab->pdevs[pdev_id].ar;
@@ -3795,6 +3852,7 @@ int ath12k_dp_rx_process_err(struct ath12k_base *ab, struct napi_struct *napi, } } +next_desc:if (tot_n_bufs_reaped >= quota) { tot_n_bufs_reaped = quota; goto exit;
drivers/net/wireless/ath/ath12k/hal_rx.c +2 -8
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include "debug.h"
@@ -320,7 +320,7 @@ int ath12k_hal_desc_reo_parse_err(struct ath12k_base *ab, {enum hal_reo_dest_ring_push_reason push_reason;enum hal_reo_dest_ring_error_code err_code; -u32 cookie, val; +u32 cookie; push_reason =le32_get_bits (desc->info0,HAL_REO_DEST_RING_INFO0_PUSH_REASON );
@@ -335,12 +335,6 @@ int ath12k_hal_desc_reo_parse_err(struct ath12k_base *ab,return -EINVAL ; } - val =le32_get_bits (desc->info0,HAL_REO_DEST_RING_INFO0_BUFFER_TYPE ); -if (val !=HAL_REO_DEST_RING_BUFFER_TYPE_LINK_DESC ) { -ath12k_warn (ab,"expected buffer type link_desc" ); -return -EINVAL ; - } -ath12k_hal_rx_reo_ent_paddr_get (ab, &desc->buf_addr_info, paddr, &cookie); *desc_bank =u32_get_bits (cookie,DP_LINK_DESC_BANK_MASK );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 35/507 wifi: ath12k: fix VHT MCS assignment
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit 8c21b32c2cc82224c7fc1a9f67318f3b1199744b ]
While associating, firmware needs the peer's receive capability to calculate its own VHT transmit MCS. Currently, the host sends this information via mcs->rx_mcs_set field, but firmware actually reads it from mcs->tx_mcs_set field. This mismatch is incorrect.
This issue has not caused failures so far because most peers advertise identical TX and RX capabilities. Fix this by assigning the value to tx_mcs_set as expected.
Additionally, the rate control mask is intended to limit our transmit MCS, so it should also apply to the peer's receive capability. Update the logic accordingly.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath12k/mac.c | 7 +++---- drivers/net/wireless/ath/ath12k/wmi.c | 13 ++++++++----- drivers/net/wireless/ath/ath12k/wmi.h | 2 ++ 3 files changed, 13 insertions(+), 9 deletions(-)
drivers/net/wireless/ath/ath12k/mac.c +3 -4
@@ -2263,7 +2263,6 @@ static void ath12k_peer_assoc_h_vht(struct ath12k *ar,struct cfg80211_chan_def def;enum nl80211_band band;u16 *vht_mcs_mask; -u16 tx_mcs_map;u8 ampdu_factor;u8 max_nss, vht_mcs;int i, vht_nss, nss_idx;
@@ -2354,10 +2353,10 @@ static void ath12k_peer_assoc_h_vht(struct ath12k *ar, arg->peer_nss =min (link_sta->rx_nss, max_nss); arg->rx_max_rate =__le16_to_cpu (vht_cap->vht_mcs.rx_highest); arg->rx_mcs_set =__le16_to_cpu (vht_cap->vht_mcs.rx_mcs_map); - arg->tx_max_rate =__le16_to_cpu (vht_cap->vht_mcs.tx_highest); + arg->rx_mcs_set =ath12k_peer_assoc_h_vht_limit (arg->rx_mcs_set, vht_mcs_mask); - tx_mcs_map =__le16_to_cpu (vht_cap->vht_mcs.tx_mcs_map); - arg->tx_mcs_set =ath12k_peer_assoc_h_vht_limit (tx_mcs_map, vht_mcs_mask); + arg->tx_max_rate =__le16_to_cpu (vht_cap->vht_mcs.tx_highest); + arg->tx_mcs_set =__le16_to_cpu (vht_cap->vht_mcs.tx_mcs_map);/* In QCN9274 platform, VHT MCS rate 10 and 11 is enabled by default. * VHT MCS rate 10 and 11 is not supported in 11ac standard.
drivers/net/wireless/ath/ath12k/wmi.c +8 -5
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/skbuff.h> #include <linux/ctype.h>
@@ -2362,10 +2362,13 @@ int ath12k_wmi_send_peer_assoc_cmd(struct ath12k *ar, cmd->peer_bw_rxnss_override |=cpu_to_le32 (arg->peer_bw_rxnss_override);if (arg->vht_capable) { - mcs->rx_max_rate =cpu_to_le32 (arg->rx_max_rate); - mcs->rx_mcs_set =cpu_to_le32 (arg->rx_mcs_set); - mcs->tx_max_rate =cpu_to_le32 (arg->tx_max_rate); - mcs->tx_mcs_set =cpu_to_le32 (arg->tx_mcs_set); +/* Firmware interprets mcs->tx_mcs_set field as peer's +* RX capability +*/ + mcs->rx_max_rate =cpu_to_le32 (arg->tx_max_rate); + mcs->rx_mcs_set =cpu_to_le32 (arg->tx_mcs_set); + mcs->tx_max_rate =cpu_to_le32 (arg->rx_max_rate); + mcs->tx_mcs_set =cpu_to_le32 (arg->rx_mcs_set); }/* HE Rates */
drivers/net/wireless/ath/ath12k/wmi.h +2 -0
@@ -4218,8 +4218,10 @@ struct wmi_unit_test_cmd {struct ath12k_wmi_vht_rate_set_params {__le32 tlv_header;__le32 rx_max_rate; +/* MCS at which the peer can transmit */ __le32 rx_mcs_set;__le32 tx_max_rate; +/* MCS at which the peer can receive */ __le32 tx_mcs_set;__le32 tx_max_mcs_nss; } __packed;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 36/507 wifi: ath12k: fix TX and RX MCS rate configurations in HE mode
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pradeep Kumar Chitrapu <[email protected]>
[ Upstream commit 9c5f229b1312a31aff762b2111f6751e4e3722fe ]
Currently, the TX and RX MCS rate configurations per peer are reversed when sent to the firmware. As a result, RX MCS rates are configured for TX, and vice versa. This commit rectifies the configuration to match what the firmware expects.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath12k/mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath12k/mac.c +3 -2
@@ -2638,9 +2638,10 @@ static void ath12k_peer_assoc_h_he(struct ath12k *ar,switch (link_sta->bandwidth) {case IEEE80211_STA_RX_BW_160 : v =le16_to_cpu (he_cap->he_mcs_nss_supp.rx_mcs_160); + v =ath12k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160 ] = v; - v =ath12k_peer_assoc_h_he_limit (v, he_mcs_mask); + v =le16_to_cpu (he_cap->he_mcs_nss_supp.tx_mcs_160); arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160 ] = v; arg->peer_he_mcs_count++;
@@ -2650,10 +2651,10 @@ static void ath12k_peer_assoc_h_he(struct ath12k *ar,default : v =le16_to_cpu (he_cap->he_mcs_nss_supp.rx_mcs_80); + v =ath12k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80 ] = v; v =le16_to_cpu (he_cap->he_mcs_nss_supp.tx_mcs_80); - v =ath12k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80 ] = v; arg->peer_he_mcs_count++;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 37/507 sched/fair: Forfeit vruntime on yield
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fernand Sieber <[email protected]>
[ Upstream commit 79104becf42baeeb4a3f2b106f954b9fc7c10a3c ]
If a task yields, the scheduler may decide to pick it again. The task in turn may decide to yield immediately or shortly after, leading to a tight loop of yields.
If there's another runnable task as this point, the deadline will be increased by the slice at each loop. This can cause the deadline to runaway pretty quickly, and subsequent elevated run delays later on as the task doesn't get picked again. The reason the scheduler can pick the same task again and again despite its deadline increasing is because it may be the only eligible task at that point.
Fix this by making the task forfeiting its remaining vruntime and pushing the deadline one slice ahead. This implements yield behavior more authentically.
We limit the forfeiting to eligible tasks. This is because core scheduling prefers running ineligible tasks rather than force idling. As such, without the condition, we can end up on a yield loop which makes the vruntime increase rapidly, leading to anomalous run delays later down the line.
--- kernel/sched/fair.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
kernel/sched/fair.c +13 -1
@@ -8919,7 +8919,19 @@ static void yield_task_fair(struct rq *rq)*/ rq_clock_skip_update (rq); - se->deadline +=calc_delta_fair (se->slice, se); +/* +* Forfeit the remaining vruntime, only if the entity is eligible. This +* condition is necessary because in core scheduling we prefer to run +* ineligible tasks rather than force idling. If this happens we may +* end up in a loop where the core scheduler picks the yielding task, +* which yields immediately again; without the condition the vruntime +* ends up quickly running away. +*/ +if (entity_eligible (cfs_rq, se)) { + se->vruntime = se->deadline; + se->deadline +=calc_delta_fair (se->slice, se); +update_min_vruntime (cfs_rq); + } }static bool yield_to_task_fair (struct rq *rq,struct task_struct *p)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 38/507 irqchip/bcm2712-mip: Fix OF node reference imbalance
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 0435bcc4e5858c632c1b6d5afa637580d9779890 ]
The init callback must not decrement the reference count of the provided irqchip OF node.
This should not cause any trouble currently, but if the driver ever starts probe deferring it could lead to warnings about reference underflow and saturation.
--- drivers/irqchip/irq-bcm2712-mip.c | 1 - 1 file changed, 1 deletion(-)
drivers/irqchip/irq-bcm2712-mip.c +0 -1
@@ -239,7 +239,6 @@ static int __init mip_of_msi_init(struct device_node *node, struct device_node *int ret; pdev =of_find_device_by_node (node); -of_node_put (node);if (!pdev)return -EPROBE_DEFER ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 39/507 irqchip/bcm2712-mip: Fix section mismatch
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit a8452d1d59d46066051e676d5daa472cd08cb304 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init.
--- drivers/irqchip/irq-bcm2712-mip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-bcm2712-mip.c +1 -1
@@ -232,7 +232,7 @@ static int mip_parse_dt(struct mip_priv *mip, struct device_node *np)return ret; } -static int __init mip_of_msi_init (struct device_node *node,struct device_node *parent) +static int mip_of_msi_init (struct device_node *node,struct device_node *parent) {struct platform_device *pdev;struct mip_priv *mip;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 40/507 irqchip/irq-bcm7038-l1: Fix section mismatch
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit e9db5332caaf4789ae3bafe72f61ad8e6e0c2d81 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init.
--- drivers/irqchip/irq-bcm7038-l1.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/irqchip/irq-bcm7038-l1.c +3 -5
@@ -219,9 +219,8 @@ static int bcm7038_l1_set_affinity(struct irq_data *d, }#endif -static int __init bcm7038_l1_init_one (struct device_node *dn, -unsigned int idx, -struct bcm7038_l1_chip *intc) +static int bcm7038_l1_init_one (struct device_node *dn,unsigned int idx, +struct bcm7038_l1_chip *intc) {struct resource res;resource_size_t sz;
@@ -395,8 +394,7 @@ static const struct irq_domain_ops bcm7038_l1_domain_ops = { .map = bcm7038_l1_map, }; -static int __init bcm7038_l1_of_init (struct device_node *dn, -struct device_node *parent) +static int bcm7038_l1_of_init (struct device_node *dn,struct device_node *parent) {struct bcm7038_l1_chip *intc;int idx, ret;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 41/507 irqchip/irq-bcm7120-l2: Fix section mismatch
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit bfc0c5beab1fde843677923cf008f41d583c980a ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init.
--- drivers/irqchip/irq-bcm7120-l2.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)
drivers/irqchip/irq-bcm7120-l2.c +6 -11
@@ -143,8 +143,7 @@ static int bcm7120_l2_intc_init_one(struct device_node *dn,return 0 ; } -static int __init bcm7120_l2_intc_iomap_7120 (struct device_node *dn, -struct bcm7120_l2_intc_data *data) +static int bcm7120_l2_intc_iomap_7120 (struct device_node *dn,struct bcm7120_l2_intc_data *data) {int ret;
@@ -177,8 +176,7 @@ static int __init bcm7120_l2_intc_iomap_7120(struct device_node *dn,return 0 ; } -static int __init bcm7120_l2_intc_iomap_3380 (struct device_node *dn, -struct bcm7120_l2_intc_data *data) +static int bcm7120_l2_intc_iomap_3380 (struct device_node *dn,struct bcm7120_l2_intc_data *data) {unsigned int gc_idx;
@@ -208,10 +206,9 @@ static int __init bcm7120_l2_intc_iomap_3380(struct device_node *dn,return 0 ; } -static int __init bcm7120_l2_intc_probe (struct device_node *dn, -struct device_node *parent, +static int bcm7120_l2_intc_probe (struct device_node *dn,struct device_node *parent,int (*iomap_regs_fn)(struct device_node *, -struct bcm7120_l2_intc_data *), +struct bcm7120_l2_intc_data *),const char *intc_name) {unsigned int clr =IRQ_NOREQUEST |IRQ_NOPROBE |IRQ_NOAUTOEN ;
@@ -339,15 +336,13 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,return ret; } -static int __init bcm7120_l2_intc_probe_7120 (struct device_node *dn, -struct device_node *parent) +static int bcm7120_l2_intc_probe_7120 (struct device_node *dn,struct device_node *parent) {return bcm7120_l2_intc_probe (dn, parent, bcm7120_l2_intc_iomap_7120,"BCM7120 L2" ); } -static int __init bcm7120_l2_intc_probe_3380 (struct device_node *dn, -struct device_node *parent) +static int bcm7120_l2_intc_probe_3380 (struct device_node *dn,struct device_node *parent) {return bcm7120_l2_intc_probe (dn, parent, bcm7120_l2_intc_iomap_3380,"BCM3380 L2" );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 42/507 irqchip/irq-brcmstb-l2: Fix section mismatch
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit bbe1775924478e95372c2f896064ab6446000713 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init.
--- drivers/irqchip/irq-brcmstb-l2.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/irqchip/irq-brcmstb-l2.c +4 -8
@@ -138,10 +138,8 @@ static void brcmstb_l2_intc_resume(struct irq_data *d)irq_reg_writel (gc, ~b->saved_mask, ct->regs.enable); } -static int __init brcmstb_l2_intc_of_init (struct device_node *np, -struct device_node *parent, -const struct brcmstb_intc_init_params - *init_params) +static int brcmstb_l2_intc_of_init (struct device_node *np,struct device_node *parent, +const struct brcmstb_intc_init_params *init_params) {unsigned int clr =IRQ_NOREQUEST |IRQ_NOPROBE |IRQ_NOAUTOEN ;unsigned int set =0 ;
@@ -257,14 +255,12 @@ static int __init brcmstb_l2_intc_of_init(struct device_node *np,return ret; } -static int __init brcmstb_l2_edge_intc_of_init (struct device_node *np, -struct device_node *parent) +static int brcmstb_l2_edge_intc_of_init (struct device_node *np,struct device_node *parent) {return brcmstb_l2_intc_of_init (np, parent, &l2_edge_intc_init); } -static int __init brcmstb_l2_lvl_intc_of_init (struct device_node *np, -struct device_node *parent) +static int brcmstb_l2_lvl_intc_of_init (struct device_node *np,struct device_node *parent) {return brcmstb_l2_intc_of_init (np, parent, &l2_lvl_intc_init); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 43/507 irqchip/imx-mu-msi: Fix section mismatch
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 64acfd8e680ff8992c101fe19aadb112ce551072 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init.
--- drivers/irqchip/irq-imx-mu-msi.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
drivers/irqchip/irq-imx-mu-msi.c +5 -9
@@ -296,9 +296,8 @@ static const struct imx_mu_dcfg imx_mu_cfg_imx8ulp = { }, }; -static int __init imx_mu_of_init (struct device_node *dn, -struct device_node *parent, -const struct imx_mu_dcfg *cfg) +static int imx_mu_of_init (struct device_node *dn,struct device_node *parent, +const struct imx_mu_dcfg *cfg) {struct platform_device *pdev =of_find_device_by_node (dn);struct device_link *pd_link_a;
@@ -416,20 +415,17 @@ static const struct dev_pm_ops imx_mu_pm_ops = { imx_mu_runtime_resume, NULL) }; -static int __init imx_mu_imx7ulp_of_init (struct device_node *dn, -struct device_node *parent) +static int imx_mu_imx7ulp_of_init (struct device_node *dn,struct device_node *parent) {return imx_mu_of_init (dn, parent, &imx_mu_cfg_imx7ulp); } -static int __init imx_mu_imx6sx_of_init (struct device_node *dn, -struct device_node *parent) +static int imx_mu_imx6sx_of_init (struct device_node *dn,struct device_node *parent) {return imx_mu_of_init (dn, parent, &imx_mu_cfg_imx6sx); } -static int __init imx_mu_imx8ulp_of_init (struct device_node *dn, -struct device_node *parent) +static int imx_mu_imx8ulp_of_init (struct device_node *dn,struct device_node *parent) {return imx_mu_of_init (dn, parent, &imx_mu_cfg_imx8ulp); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 44/507 irqchip/renesas-rzg2l: Fix section mismatch
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 5b338fbb2b5b21d61a9eaba14dcf43108de30258 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init.
--- drivers/irqchip/irq-renesas-rzg2l.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/irqchip/irq-renesas-rzg2l.c +2 -4
@@ -597,14 +597,12 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node *return 0 ; } -static int __init rzg2l_irqc_init (struct device_node *node, -struct device_node *parent) +static int rzg2l_irqc_init (struct device_node *node,struct device_node *parent) {return rzg2l_irqc_common_init (node, parent, &rzg2l_irqc_chip); } -static int __init rzfive_irqc_init (struct device_node *node, -struct device_node *parent) +static int rzfive_irqc_init (struct device_node *node,struct device_node *parent) {return rzg2l_irqc_common_init (node, parent, &rzfive_irqc_chip); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 45/507 irqchip/starfive-jh8100: Fix section mismatch
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit f798bdb9aa81c425184f92e3d0b44d3b53d10da7 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init.
--- drivers/irqchip/irq-starfive-jh8100-intc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/irqchip/irq-starfive-jh8100-intc.c +1 -2
@@ -114,8 +114,7 @@ static void starfive_intc_irq_handler(struct irq_desc *desc)chained_irq_exit (chip, desc); } -static int __init starfive_intc_init (struct device_node *intc, -struct device_node *parent) +static int starfive_intc_init (struct device_node *intc,struct device_node *parent) {struct starfive_irq_chip *irqc;struct reset_control *rst;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 46/507 irqchip/qcom-irq-combiner: Fix section mismatch
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 9b685058ca936752285c5520d351b828312ac965 ]
Platform drivers can be probed after their init sections have been discarded so the probe callback must not live in init.
--- drivers/irqchip/qcom-irq-combiner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/qcom-irq-combiner.c +1 -1
@@ -222,7 +222,7 @@ static int get_registers(struct platform_device *pdev, struct combiner *comb)return 0 ; } -static int __init combiner_probe (struct platform_device *pdev) +static int combiner_probe (struct platform_device *pdev) {struct combiner *combiner;int nregs;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 47/507 crypto: authenc - Correctly pass EINPROGRESS back up to the caller
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <[email protected]>
[ Upstream commit 96feb73def02d175850daa0e7c2c90c876681b5c ]
When authenc is invoked with MAY_BACKLOG, it needs to pass EINPROGRESS notifications back up to the caller when the underlying algorithm returns EBUSY synchronously.
However, if the EBUSY comes from the second part of an authenc call, i.e., it is asynchronous, both the EBUSY and the subsequent EINPROGRESS notification must not be passed to the caller.
Implement this by passing a mask to the function that starts the second half of authenc and using it to determine whether EBUSY and EINPROGRESS should be passed to the caller.
This was a deficiency in the original implementation of authenc because it was not expected to be used with MAY_BACKLOG.
--- crypto/authenc.c | 75 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 25 deletions(-)
crypto/authenc.c +50 -25
@@ -37,7 +37,7 @@ struct authenc_request_ctx {static void authenc_request_complete (struct aead_request *req,int err) { -if (err != -EINPROGRESS ) +if (err != -EINPROGRESS && err != -EBUSY )aead_request_complete (req, err); }
@@ -107,27 +107,42 @@ static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key,return err; } -static void authenc_geniv_ahash_done (void *data,int err) +static void authenc_geniv_ahash_finish (struct aead_request *req) { -struct aead_request *req = data;struct crypto_aead *authenc =crypto_aead_reqtfm (req);struct aead_instance *inst =aead_alg_instance (authenc);struct authenc_instance_ctx *ictx =aead_instance_ctx (inst);struct authenc_request_ctx *areq_ctx =aead_request_ctx (req);struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); -if (err) - goto out; -scatterwalk_map_and_copy (ahreq->result, req->dst, req->assoclen + req->cryptlen,crypto_aead_authsize (authenc),1 ); +} -out: +static void authenc_geniv_ahash_done (void *data,int err) +{ +struct aead_request *req = data; + +if (!err) +authenc_geniv_ahash_finish (req);aead_request_complete (req, err); } -static int crypto_authenc_genicv (struct aead_request *req,unsigned int flags) +/* +* Used when the ahash request was invoked in the async callback context +* of the previous skcipher request. Eat any EINPROGRESS notifications. +*/ +static void authenc_geniv_ahash_done2 (void *data,int err) +{ +struct aead_request *req = data; + +if (!err) +authenc_geniv_ahash_finish (req); +authenc_request_complete (req, err); +} + +static int crypto_authenc_genicv (struct aead_request *req,unsigned int mask) {struct crypto_aead *authenc =crypto_aead_reqtfm (req);struct aead_instance *inst =aead_alg_instance (authenc);
@@ -136,6 +151,7 @@ static int crypto_authenc_genicv(struct aead_request *req, unsigned int flags)struct crypto_ahash *auth = ctx->auth;struct authenc_request_ctx *areq_ctx =aead_request_ctx (req);struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); +unsigned int flags =aead_request_flags (req) & ~mask;u8 *hash = areq_ctx->tail;int err;
@@ -143,7 +159,8 @@ static int crypto_authenc_genicv(struct aead_request *req, unsigned int flags)ahash_request_set_crypt (ahreq, req->dst, hash, req->assoclen + req->cryptlen);ahash_request_set_callback (ahreq, flags, - authenc_geniv_ahash_done, req); + mask ? authenc_geniv_ahash_done2 : + authenc_geniv_ahash_done, req); err =crypto_ahash_digest (ahreq);if (err)
@@ -159,12 +176,11 @@ static void crypto_authenc_encrypt_done(void *data, int err) {struct aead_request *areq = data; -if (err) - goto out; - - err =crypto_authenc_genicv (areq,0 ); - -out: +if (err) { +aead_request_complete (areq, err); +return ; + } + err =crypto_authenc_genicv (areq,CRYPTO_TFM_REQ_MAY_SLEEP );authenc_request_complete (areq, err); }
@@ -199,11 +215,18 @@ static int crypto_authenc_encrypt(struct aead_request *req)if (err)return err; -return crypto_authenc_genicv (req,aead_request_flags (req)); +return crypto_authenc_genicv (req,0 ); +} + +static void authenc_decrypt_tail_done (void *data,int err) +{ +struct aead_request *req = data; + +authenc_request_complete (req, err); }static int crypto_authenc_decrypt_tail (struct aead_request *req, -unsigned int flags) +unsigned int mask) {struct crypto_aead *authenc =crypto_aead_reqtfm (req);struct aead_instance *inst =aead_alg_instance (authenc);
@@ -214,6 +237,7 @@ static int crypto_authenc_decrypt_tail(struct aead_request *req,struct skcipher_request *skreq = (void *)(areq_ctx->tail + ictx->reqoff);unsigned int authsize =crypto_aead_authsize (authenc); +unsigned int flags =aead_request_flags (req) & ~mask;u8 *ihash = ahreq->result + authsize;struct scatterlist *src, *dst;
@@ -230,7 +254,9 @@ static int crypto_authenc_decrypt_tail(struct aead_request *req,skcipher_request_set_tfm (skreq, ctx->enc);skcipher_request_set_callback (skreq, flags, - req->base.complete, req->base.data); + mask ? authenc_decrypt_tail_done : + req->base.complete, + mask ? req : req->base.data);skcipher_request_set_crypt (skreq, src, dst, req->cryptlen - authsize, req->iv);
@@ -241,12 +267,11 @@ static void authenc_verify_ahash_done(void *data, int err) {struct aead_request *req = data; -if (err) - goto out; - - err =crypto_authenc_decrypt_tail (req,0 ); - -out: +if (err) { +aead_request_complete (req, err); +return ; + } + err =crypto_authenc_decrypt_tail (req,CRYPTO_TFM_REQ_MAY_SLEEP );authenc_request_complete (req, err); }
@@ -273,7 +298,7 @@ static int crypto_authenc_decrypt(struct aead_request *req)if (err)return err; -return crypto_authenc_decrypt_tail (req,aead_request_flags (req)); +return crypto_authenc_decrypt_tail (req,0 ); }static int crypto_authenc_init_tfm (struct crypto_aead *tfm)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 48/507 ntfs3: fix uninit memory after failed mi_read in mi_format_new
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raphael Pinsonneault-Thibeault <[email protected]>
[ Upstream commit 73e6b9dacf72a1e7a4265eacca46f8f33e0997d6 ]
Fix a KMSAN un-init bug found by syzkaller.
ntfs_get_bh() expects a buffer from sb_getblk(), that buffer may not be uptodate. We do not bring the buffer uptodate before setting it as uptodate. If the buffer were to not be uptodate, it could mean adding a buffer with un-init data to the mi record. Attempting to load that record will trigger KMSAN.
Avoid this by setting the buffer as uptodate, if it’s not already, by overwriting it.
--- fs/ntfs3/fsntfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
fs/ntfs3/fsntfs.c +8 -1
@@ -1349,7 +1349,14 @@ int ntfs_get_bh(struct ntfs_sb_info *sbi, const struct runs_tree *run, u64 vbo, }if (buffer_locked (bh))__wait_on_buffer (bh); -set_buffer_uptodate (bh); + +lock_buffer (bh); +if (!buffer_uptodate (bh)) + { +memset (bh->b_data,0 , blocksize); +set_buffer_uptodate (bh); + } +unlock_buffer (bh); }else { bh =ntfs_bread (sb, block);if (!bh) {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 49/507 ntfs3: Fix uninit buffer allocated by __getname()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sidharth Seela <[email protected]>
[ Upstream commit 9948dcb2f7b5a1bf8e8710eafaf6016e00be3ad6 ]
Fix uninit errors caused after buffer allocation given to 'de'; by initializing the buffer with zeroes. The fix was found by using KMSAN.
--- fs/ntfs3/inode.c | 1 + 1 file changed, 1 insertion(+)
fs/ntfs3/inode.c +1 -0
@@ -1717,6 +1717,7 @@ int ntfs_link_inode(struct inode *inode, struct dentry *dentry) de =__getname ();if (!de)return -ENOMEM ; +memset (de,0 ,PATH_MAX );/* Mark rw ntfs as dirty. It will be cleared at umount. */ ntfs_set_state (sbi,NTFS_DIRTY_DIRTY );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 50/507 dt-bindings: clock: qcom,x1e80100-gcc: Add missing USB4 clocks/resets
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit e4c4f5a1ae18a7828c2bfaf9dfe2473632b92d1b ]
Some of the USB4 muxes, RCGs and resets were not initially described.
Add indices for them to allow extending the driver.
Stable-dep-of: 8abe970efea5 ("clk: qcom: gcc-x1e80100: Add missing USB4 clocks/resets")
--- .../bindings/clock/qcom,x1e80100-gcc.yaml | 62 +++++++++++++++++-- include/dt-bindings/clock/qcom,x1e80100-gcc.h | 61 ++++++++++++++++++ 2 files changed, 119 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/clock/qcom,x1e80100-gcc.yaml +58 -4
@@ -32,9 +32,36 @@ properties: - description: PCIe 5 pipe clock - description: PCIe 6a pipe clock - description: PCIe 6b pipe clock - - description: USB QMP Phy 0 clock source - - description: USB QMP Phy 1 clock source - - description: USB QMP Phy 2 clock source + - description: USB4_0 QMPPHY clock source + - description: USB4_1 QMPPHY clock source + - description: USB4_2 QMPPHY clock source + - description: USB4_0 PHY DP0 GMUX clock source + - description: USB4_0 PHY DP1 GMUX clock source + - description: USB4_0 PHY PCIE PIPEGMUX clock source + - description: USB4_0 PHY PIPEGMUX clock source + - description: USB4_0 PHY SYS PCIE PIPEGMUX clock source + - description: USB4_1 PHY DP0 GMUX 2 clock source + - description: USB4_1 PHY DP1 GMUX 2 clock source + - description: USB4_1 PHY PCIE PIPEGMUX clock source + - description: USB4_1 PHY PIPEGMUX clock source + - description: USB4_1 PHY SYS PCIE PIPEGMUX clock source + - description: USB4_2 PHY DP0 GMUX 2 clock source + - description: USB4_2 PHY DP1 GMUX 2 clock source + - description: USB4_2 PHY PCIE PIPEGMUX clock source + - description: USB4_2 PHY PIPEGMUX clock source + - description: USB4_2 PHY SYS PCIE PIPEGMUX clock source + - description: USB4_0 PHY RX 0 clock source + - description: USB4_0 PHY RX 1 clock source + - description: USB4_1 PHY RX 0 clock source + - description: USB4_1 PHY RX 1 clock source + - description: USB4_2 PHY RX 0 clock source + - description: USB4_2 PHY RX 1 clock source + - description: USB4_0 PHY PCIE PIPE clock source + - description: USB4_0 PHY max PIPE clock source + - description: USB4_1 PHY PCIE PIPE clock source + - description: USB4_1 PHY max PIPE clock source + - description: USB4_2 PHY PCIE PIPE clock source + - description: USB4_2 PHY max PIPE clock source power-domains: description:
@@ -67,7 +94,34 @@ examples: <&pcie6b_phy>, <&usb_1_ss0_qmpphy 0>, <&usb_1_ss1_qmpphy 1>, - <&usb_1_ss2_qmpphy 2>; + <&usb_1_ss2_qmpphy 2>, + <&usb4_0_phy_dp0_gmux_clk>, + <&usb4_0_phy_dp1_gmux_clk>, + <&usb4_0_phy_pcie_pipegmux_clk>, + <&usb4_0_phy_pipegmux_clk>, + <&usb4_0_phy_sys_pcie_pipegmux_clk>, + <&usb4_1_phy_dp0_gmux_2_clk>, + <&usb4_1_phy_dp1_gmux_2_clk>, + <&usb4_1_phy_pcie_pipegmux_clk>, + <&usb4_1_phy_pipegmux_clk>, + <&usb4_1_phy_sys_pcie_pipegmux_clk>, + <&usb4_2_phy_dp0_gmux_2_clk>, + <&usb4_2_phy_dp1_gmux_2_clk>, + <&usb4_2_phy_pcie_pipegmux_clk>, + <&usb4_2_phy_pipegmux_clk>, + <&usb4_2_phy_sys_pcie_pipegmux_clk>, + <&usb4_0_phy_rx_0_clk>, + <&usb4_0_phy_rx_1_clk>, + <&usb4_1_phy_rx_0_clk>, + <&usb4_1_phy_rx_1_clk>, + <&usb4_2_phy_rx_0_clk>, + <&usb4_2_phy_rx_1_clk>, + <&usb4_0_phy_pcie_pipe_clk>, + <&usb4_0_phy_max_pipe_clk>, + <&usb4_1_phy_pcie_pipe_clk>, + <&usb4_1_phy_max_pipe_clk>, + <&usb4_2_phy_pcie_pipe_clk>, + <&usb4_2_phy_max_pipe_clk>; power-domains = <&rpmhpd RPMHPD_CX>; #clock-cells = <1>; #reset-cells = <1>;
include/dt-bindings/clock/qcom,x1e80100-gcc.h +61 -0
71 lines not on this page · raw message
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 51/507 clk: qcom: gcc-x1e80100: Add missing USB4 clocks/resets
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 8abe970efea56f44773713cf91032cd2fd4d8c01 ]
Currently, some of the USB4 clocks/resets are described, but not all of the back-end muxes are present. Configuring them properly is necessary for proper operation of the hardware.
Add all the resets & muxes and wire up any unaccounted USB4 clock paths.
--- drivers/clk/qcom/gcc-x1e80100.c | 698 +++++++++++++++++++++++++++++++- 1 file changed, 681 insertions(+), 17 deletions(-)
drivers/clk/qcom/gcc-x1e80100.c +681 -17
@@ -32,6 +32,33 @@ enum {DT_USB3_PHY_0_WRAPPER_GCC_USB30_PIPE ,DT_USB3_PHY_1_WRAPPER_GCC_USB30_PIPE ,DT_USB3_PHY_2_WRAPPER_GCC_USB30_PIPE , +DT_GCC_USB4_0_PHY_DP0_GMUX_CLK_SRC , +DT_GCC_USB4_0_PHY_DP1_GMUX_CLK_SRC , +DT_GCC_USB4_0_PHY_PCIE_PIPEGMUX_CLK_SRC , +DT_GCC_USB4_0_PHY_PIPEGMUX_CLK_SRC , +DT_GCC_USB4_0_PHY_SYS_PIPEGMUX_CLK_SRC , +DT_GCC_USB4_1_PHY_DP0_GMUX_CLK_SRC , +DT_GCC_USB4_1_PHY_DP1_GMUX_CLK_SRC , +DT_GCC_USB4_1_PHY_PCIE_PIPEGMUX_CLK_SRC , +DT_GCC_USB4_1_PHY_PIPEGMUX_CLK_SRC , +DT_GCC_USB4_1_PHY_SYS_PIPEGMUX_CLK_SRC , +DT_GCC_USB4_2_PHY_DP0_GMUX_CLK_SRC , +DT_GCC_USB4_2_PHY_DP1_GMUX_CLK_SRC , +DT_GCC_USB4_2_PHY_PCIE_PIPEGMUX_CLK_SRC , +DT_GCC_USB4_2_PHY_PIPEGMUX_CLK_SRC , +DT_GCC_USB4_2_PHY_SYS_PIPEGMUX_CLK_SRC , +DT_QUSB4PHY_0_GCC_USB4_RX0_CLK , +DT_QUSB4PHY_0_GCC_USB4_RX1_CLK , +DT_QUSB4PHY_1_GCC_USB4_RX0_CLK , +DT_QUSB4PHY_1_GCC_USB4_RX1_CLK , +DT_QUSB4PHY_2_GCC_USB4_RX0_CLK , +DT_QUSB4PHY_2_GCC_USB4_RX1_CLK , +DT_USB4_0_PHY_GCC_USB4_PCIE_PIPE_CLK , +DT_USB4_0_PHY_GCC_USB4RTR_MAX_PIPE_CLK , +DT_USB4_1_PHY_GCC_USB4_PCIE_PIPE_CLK , +DT_USB4_1_PHY_GCC_USB4RTR_MAX_PIPE_CLK , +DT_USB4_2_PHY_GCC_USB4_PCIE_PIPE_CLK , + DT_USB4_2_PHY_GCC_USB4RTR_MAX_PIPE_CLK, }; enum {
@@ -42,10 +69,40 @@ enum {P_GCC_GPLL7_OUT_MAIN ,P_GCC_GPLL8_OUT_MAIN ,P_GCC_GPLL9_OUT_MAIN , +P_GCC_USB3_PRIM_PHY_PIPE_CLK_SRC , +P_GCC_USB3_SEC_PHY_PIPE_CLK_SRC , +P_GCC_USB3_TERT_PHY_PIPE_CLK_SRC , +P_GCC_USB4_0_PHY_DP0_GMUX_CLK_SRC , +P_GCC_USB4_0_PHY_DP1_GMUX_CLK_SRC , +P_GCC_USB4_0_PHY_PCIE_PIPEGMUX_CLK_SRC , +P_GCC_USB4_0_PHY_PIPEGMUX_CLK_SRC , +P_GCC_USB4_0_PHY_SYS_PIPEGMUX_CLK_SRC , +P_GCC_USB4_1_PHY_DP0_GMUX_CLK_SRC , +P_GCC_USB4_1_PHY_DP1_GMUX_CLK_SRC , +P_GCC_USB4_1_PHY_PCIE_PIPEGMUX_CLK_SRC , +P_GCC_USB4_1_PHY_PIPEGMUX_CLK_SRC , +P_GCC_USB4_1_PHY_SYS_PIPEGMUX_CLK_SRC , +P_GCC_USB4_2_PHY_DP0_GMUX_CLK_SRC , +P_GCC_USB4_2_PHY_DP1_GMUX_CLK_SRC , +P_GCC_USB4_2_PHY_PCIE_PIPEGMUX_CLK_SRC , +P_GCC_USB4_2_PHY_PIPEGMUX_CLK_SRC , +P_GCC_USB4_2_PHY_SYS_PIPEGMUX_CLK_SRC , +P_QUSB4PHY_0_GCC_USB4_RX0_CLK , +P_QUSB4PHY_0_GCC_USB4_RX1_CLK , +P_QUSB4PHY_1_GCC_USB4_RX0_CLK , +P_QUSB4PHY_1_GCC_USB4_RX1_CLK , +P_QUSB4PHY_2_GCC_USB4_RX0_CLK , +P_QUSB4PHY_2_GCC_USB4_RX1_CLK ,P_SLEEP_CLK ,P_USB3_PHY_0_WRAPPER_GCC_USB30_PIPE_CLK ,P_USB3_PHY_1_WRAPPER_GCC_USB30_PIPE_CLK ,P_USB3_PHY_2_WRAPPER_GCC_USB30_PIPE_CLK , +P_USB4_0_PHY_GCC_USB4_PCIE_PIPE_CLK , +P_USB4_0_PHY_GCC_USB4RTR_MAX_PIPE_CLK , +P_USB4_1_PHY_GCC_USB4_PCIE_PIPE_CLK , +P_USB4_1_PHY_GCC_USB4RTR_MAX_PIPE_CLK , +P_USB4_2_PHY_GCC_USB4_PCIE_PIPE_CLK , + P_USB4_2_PHY_GCC_USB4RTR_MAX_PIPE_CLK, }; static struct clk_alpha_pll gcc_gpll0 = {
@@ -320,6 +377,342 @@ static const struct freq_tbl ftbl_gcc_gp1_clk_src[] = { { } }; +static const struct clk_parent_data gcc_parent_data_13[] = { + { .index =DT_GCC_USB4_0_PHY_DP0_GMUX_CLK_SRC }, + { .index =DT_USB4_0_PHY_GCC_USB4RTR_MAX_PIPE_CLK }, +}; + +static const struct clk_parent_data gcc_parent_data_14[] = { + { .index =DT_GCC_USB4_0_PHY_DP1_GMUX_CLK_SRC }, + { .index =DT_USB4_0_PHY_GCC_USB4RTR_MAX_PIPE_CLK }, +}; + +static const struct clk_parent_data gcc_parent_data_15[] = { + { .index =DT_USB4_0_PHY_GCC_USB4_PCIE_PIPE_CLK }, + { .index =DT_BI_TCXO }, +}; + +static const struct clk_parent_data gcc_parent_data_16[] = { + { .index =DT_GCC_USB4_0_PHY_PCIE_PIPEGMUX_CLK_SRC }, + { .index =DT_USB4_0_PHY_GCC_USB4_PCIE_PIPE_CLK }, +}; + +static const struct clk_parent_data gcc_parent_data_17[] = { + { .index =DT_QUSB4PHY_0_GCC_USB4_RX0_CLK }, + { .index =DT_BI_TCXO }, +}; + +static const struct clk_parent_data gcc_parent_data_18[] = { + { .index =DT_QUSB4PHY_0_GCC_USB4_RX1_CLK }, + { .index =DT_BI_TCXO }, +}; + +static const struct clk_parent_data gcc_parent_data_19[] = { + { .index =DT_GCC_USB4_0_PHY_SYS_PIPEGMUX_CLK_SRC }, + { .index =DT_USB4_0_PHY_GCC_USB4_PCIE_PIPE_CLK }, +}; + +static const struct clk_parent_data gcc_parent_data_20[] = { + { .index =DT_GCC_USB4_1_PHY_DP0_GMUX_CLK_SRC }, + { .index =DT_USB4_1_PHY_GCC_USB4RTR_MAX_PIPE_CLK }, +}; + +static const struct clk_parent_data gcc_parent_data_21[] = { + { .index =DT_GCC_USB4_1_PHY_DP1_GMUX_CLK_SRC }, + { .index =DT_USB4_1_PHY_GCC_USB4RTR_MAX_PIPE_CLK }, +}; + +static const struct clk_parent_data gcc_parent_data_22[] = { + { .index =DT_USB4_1_PHY_GCC_USB4_PCIE_PIPE_CLK }, + { .index =DT_BI_TCXO }, +}; + +static const struct clk_parent_data gcc_parent_data_23[] = { + { .index =DT_GCC_USB4_1_PHY_PCIE_PIPEGMUX_CLK_SRC }, + { .index =DT_USB4_1_PHY_GCC_USB4_PCIE_PIPE_CLK }, +}; + +static const struct clk_parent_data gcc_parent_data_24[] = { + { .index =DT_QUSB4PHY_1_GCC_USB4_RX0_CLK }, + { .index =DT_BI_TCXO }, +}; + +static const struct clk_parent_data gcc_parent_data_25[] = { + { .index =DT_QUSB4PHY_1_GCC_USB4_RX1_CLK }, + { .index =DT_BI_TCXO }, +}; + +static const struct clk_parent_data gcc_parent_data_26[] = { + { .index =DT_GCC_USB4_1_PHY_SYS_PIPEGMUX_CLK_SRC }, + { .index =DT_USB4_1_PHY_GCC_USB4_PCIE_PIPE_CLK }, +}; + +static const struct clk_parent_data gcc_parent_data_27[] = { + { .index =DT_GCC_USB4_2_PHY_DP0_GMUX_CLK_SRC }, + { .index =DT_USB4_2_PHY_GCC_USB4RTR_MAX_PIPE_CLK }, +}; + +static const struct clk_parent_data gcc_parent_data_28[] = { + { .index =DT_GCC_USB4_2_PHY_DP1_GMUX_CLK_SRC }, + { .index =DT_USB4_2_PHY_GCC_USB4RTR_MAX_PIPE_CLK }, +}; + +static const struct clk_parent_data gcc_parent_data_29[] = { + { .index =DT_USB4_2_PHY_GCC_USB4_PCIE_PIPE_CLK }, + { .index =DT_BI_TCXO }, +}; + +static const struct clk_parent_data gcc_parent_data_30[] = { + { .index =DT_GCC_USB4_2_PHY_PCIE_PIPEGMUX_CLK_SRC }, + { .index =DT_USB4_2_PHY_GCC_USB4_PCIE_PIPE_CLK }, +}; + +static const struct clk_parent_data gcc_parent_data_31[] = { + { .index =DT_QUSB4PHY_2_GCC_USB4_RX0_CLK }, + { .index =DT_BI_TCXO }, +}; + +static const struct clk_parent_data gcc_parent_data_32[] = { + { .index =DT_QUSB4PHY_2_GCC_USB4_RX1_CLK }, + { .index =DT_BI_TCXO }, +}; + +static const struct clk_parent_data gcc_parent_data_33[] = { + { .index =DT_GCC_USB4_2_PHY_SYS_PIPEGMUX_CLK_SRC }, + { .index =DT_USB4_2_PHY_GCC_USB4_PCIE_PIPE_CLK }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_0_phy_dp0_clk_src = { + .reg =0x9f06c , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_0_phy_dp0_clk_src" , + .parent_data = gcc_parent_data_13, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_0_phy_dp1_clk_src = { + .reg =0x9f114 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_0_phy_dp1_clk_src" , + .parent_data = gcc_parent_data_14, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_0_phy_p2rr2p_pipe_clk_src = { + .reg =0x9f0d4 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_0_phy_p2rr2p_pipe_clk_src" , + .parent_data = gcc_parent_data_15, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_0_phy_pcie_pipe_mux_clk_src = { + .reg =0x9f104 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_0_phy_pcie_pipe_mux_clk_src" , + .parent_data = gcc_parent_data_16, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_0_phy_rx0_clk_src = { + .reg =0x9f0ac , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_0_phy_rx0_clk_src" , + .parent_data = gcc_parent_data_17, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_0_phy_rx1_clk_src = { + .reg =0x9f0bc , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_0_phy_rx1_clk_src" , + .parent_data = gcc_parent_data_18, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_0_phy_sys_clk_src = { + .reg =0x9f0e4 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_0_phy_sys_clk_src" , + .parent_data = gcc_parent_data_19, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_1_phy_dp0_clk_src = { + .reg =0x2b06c , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_1_phy_dp0_clk_src" , + .parent_data = gcc_parent_data_20, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_1_phy_dp1_clk_src = { + .reg =0x2b114 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_1_phy_dp1_clk_src" , + .parent_data = gcc_parent_data_21, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_1_phy_p2rr2p_pipe_clk_src = { + .reg =0x2b0d4 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_1_phy_p2rr2p_pipe_clk_src" , + .parent_data = gcc_parent_data_22, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_1_phy_pcie_pipe_mux_clk_src = { + .reg =0x2b104 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_1_phy_pcie_pipe_mux_clk_src" , + .parent_data = gcc_parent_data_23, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_1_phy_rx0_clk_src = { + .reg =0x2b0ac , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_1_phy_rx0_clk_src" , + .parent_data = gcc_parent_data_24, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_1_phy_rx1_clk_src = { + .reg =0x2b0bc , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_1_phy_rx1_clk_src" , + .parent_data = gcc_parent_data_25, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_1_phy_sys_clk_src = { + .reg =0x2b0e4 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_1_phy_sys_clk_src" , + .parent_data = gcc_parent_data_26, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_2_phy_dp0_clk_src = { + .reg =0x1106c , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_2_phy_dp0_clk_src" , + .parent_data = gcc_parent_data_27, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_2_phy_dp1_clk_src = { + .reg =0x11114 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_2_phy_dp1_clk_src" , + .parent_data = gcc_parent_data_28, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_2_phy_p2rr2p_pipe_clk_src = { + .reg =0x110d4 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_2_phy_p2rr2p_pipe_clk_src" , + .parent_data = gcc_parent_data_29, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_2_phy_pcie_pipe_mux_clk_src = { + .reg =0x11104 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_2_phy_pcie_pipe_mux_clk_src" , + .parent_data = gcc_parent_data_30, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_2_phy_rx0_clk_src = { + .reg =0x110ac , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_2_phy_rx0_clk_src" , + .parent_data = gcc_parent_data_31, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_2_phy_rx1_clk_src = { + .reg =0x110bc , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_2_phy_rx1_clk_src" , + .parent_data = gcc_parent_data_32, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; + +static struct clk_regmap_phy_mux gcc_usb4_2_phy_sys_clk_src = { + .reg =0x110e4 , + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb4_2_phy_sys_clk_src" , + .parent_data = gcc_parent_data_33, + .ops = &clk_regmap_phy_mux_ops, + }, + }, +}; +static struct clk_rcg2 gcc_gp1_clk_src = { .cmd_rcgr =0x64004 , .mnd_width =16 ,
@@ -2790,6 +3183,11 @@ static struct clk_branch gcc_pcie_0_pipe_clk = { .enable_mask = BIT(25), .hw.init = &(const struct clk_init_data ) { .name ="gcc_pcie_0_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_0_phy_pcie_pipe_mux_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -2879,6 +3277,11 @@ static struct clk_branch gcc_pcie_1_pipe_clk = { .enable_mask = BIT(30), .hw.init = &(const struct clk_init_data ) { .name ="gcc_pcie_1_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_1_phy_pcie_pipe_mux_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -2968,6 +3371,11 @@ static struct clk_branch gcc_pcie_2_pipe_clk = { .enable_mask = BIT(23), .hw.init = &(const struct clk_init_data ) { .name ="gcc_pcie_2_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_2_phy_pcie_pipe_mux_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5156,6 +5564,33 @@ static struct clk_regmap_mux gcc_usb3_prim_phy_pipe_clk_src = { }, }; +static const struct parent_map gcc_parent_map_34[] = { + {P_GCC_USB3_PRIM_PHY_PIPE_CLK_SRC ,0 }, + {P_USB4_0_PHY_GCC_USB4RTR_MAX_PIPE_CLK ,1 }, + {P_GCC_USB4_0_PHY_PIPEGMUX_CLK_SRC ,3 }, +}; + +static const struct clk_parent_data gcc_parent_data_34[] = { + { .hw = &gcc_usb3_prim_phy_pipe_clk_src.clkr.hw }, + { .index =DT_USB4_0_PHY_GCC_USB4RTR_MAX_PIPE_CLK }, + { .index =DT_GCC_USB4_0_PHY_PIPEGMUX_CLK_SRC }, +}; + +static struct clk_regmap_mux gcc_usb34_prim_phy_pipe_clk_src = { + .reg =0x39070 , + .shift =0 , + .width =2 , + .parent_map = gcc_parent_map_34, + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb34_prim_phy_pipe_clk_src" , + .parent_data = gcc_parent_data_34, + .num_parents =ARRAY_SIZE (gcc_parent_data_34), + .ops = &clk_regmap_mux_closest_ops, + }, + }, +}; +static struct clk_branch gcc_usb3_prim_phy_pipe_clk = { .halt_reg =0x39068 , .halt_check =BRANCH_HALT_SKIP ,
@@ -5167,7 +5602,7 @@ static struct clk_branch gcc_usb3_prim_phy_pipe_clk = { .hw.init = &(const struct clk_init_data) { .name ="gcc_usb3_prim_phy_pipe_clk" , .parent_hws = (const struct clk_hw *[]) { - &gcc_usb3_prim_phy_pipe_clk_src.clkr.hw, + &gcc_usb34_prim_phy_pipe_clk_src.clkr.hw, }, .num_parents =1 , .flags =CLK_SET_RATE_PARENT ,
@@ -5227,6 +5662,33 @@ static struct clk_regmap_mux gcc_usb3_sec_phy_pipe_clk_src = { }, }; +static const struct parent_map gcc_parent_map_35[] = { + {P_GCC_USB3_SEC_PHY_PIPE_CLK_SRC ,0 }, + {P_USB4_1_PHY_GCC_USB4RTR_MAX_PIPE_CLK ,1 }, + {P_GCC_USB4_1_PHY_PIPEGMUX_CLK_SRC ,3 }, +}; + +static const struct clk_parent_data gcc_parent_data_35[] = { + { .hw = &gcc_usb3_sec_phy_pipe_clk_src.clkr.hw }, + { .index =DT_USB4_1_PHY_GCC_USB4RTR_MAX_PIPE_CLK }, + { .index =DT_GCC_USB4_1_PHY_PIPEGMUX_CLK_SRC }, +}; + +static struct clk_regmap_mux gcc_usb34_sec_phy_pipe_clk_src = { + .reg =0xa1070 , + .shift =0 , + .width =2 , + .parent_map = gcc_parent_map_35, + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb34_sec_phy_pipe_clk_src" , + .parent_data = gcc_parent_data_35, + .num_parents =ARRAY_SIZE (gcc_parent_data_35), + .ops = &clk_regmap_mux_closest_ops, + }, + }, +}; +static struct clk_branch gcc_usb3_sec_phy_pipe_clk = { .halt_reg =0xa1068 , .halt_check =BRANCH_HALT_SKIP ,
@@ -5238,7 +5700,7 @@ static struct clk_branch gcc_usb3_sec_phy_pipe_clk = { .hw.init = &(const struct clk_init_data) { .name ="gcc_usb3_sec_phy_pipe_clk" , .parent_hws = (const struct clk_hw *[]) { - &gcc_usb3_sec_phy_pipe_clk_src.clkr.hw, + &gcc_usb34_sec_phy_pipe_clk_src.clkr.hw, }, .num_parents =1 , .flags =CLK_SET_RATE_PARENT ,
@@ -5298,6 +5760,33 @@ static struct clk_regmap_mux gcc_usb3_tert_phy_pipe_clk_src = { }, }; +static const struct parent_map gcc_parent_map_36[] = { + {P_GCC_USB3_TERT_PHY_PIPE_CLK_SRC ,0 }, + {P_USB4_2_PHY_GCC_USB4RTR_MAX_PIPE_CLK ,1 }, + {P_GCC_USB4_2_PHY_PIPEGMUX_CLK_SRC ,3 }, +}; + +static const struct clk_parent_data gcc_parent_data_36[] = { + { .hw = &gcc_usb3_tert_phy_pipe_clk_src.clkr.hw }, + { .index =DT_USB4_2_PHY_GCC_USB4RTR_MAX_PIPE_CLK }, + { .index =DT_GCC_USB4_2_PHY_PIPEGMUX_CLK_SRC }, +}; + +static struct clk_regmap_mux gcc_usb34_tert_phy_pipe_clk_src = { + .reg =0xa2070 , + .shift =0 , + .width =2 , + .parent_map = gcc_parent_map_36, + .clkr = { + .hw.init = &(const struct clk_init_data ) { + .name ="gcc_usb34_tert_phy_pipe_clk_src" , + .parent_data = gcc_parent_data_36, + .num_parents =ARRAY_SIZE (gcc_parent_data_36), + .ops = &clk_regmap_mux_closest_ops, + }, + }, +}; +static struct clk_branch gcc_usb3_tert_phy_pipe_clk = { .halt_reg =0xa2068 , .halt_check =BRANCH_HALT_SKIP ,
@@ -5309,7 +5798,7 @@ static struct clk_branch gcc_usb3_tert_phy_pipe_clk = { .hw.init = &(const struct clk_init_data) { .name ="gcc_usb3_tert_phy_pipe_clk" , .parent_hws = (const struct clk_hw *[]) { - &gcc_usb3_tert_phy_pipe_clk_src.clkr.hw, + &gcc_usb34_tert_phy_pipe_clk_src.clkr.hw, }, .num_parents =1 , .flags =CLK_SET_RATE_PARENT ,
@@ -5335,12 +5824,17 @@ static struct clk_branch gcc_usb4_0_cfg_ahb_clk = {static struct clk_branch gcc_usb4_0_dp0_clk = { .halt_reg =0x9f060 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x9f060 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_0_dp0_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_0_phy_dp0_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5348,12 +5842,17 @@ static struct clk_branch gcc_usb4_0_dp0_clk = {static struct clk_branch gcc_usb4_0_dp1_clk = { .halt_reg =0x9f108 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x9f108 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_0_dp1_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_0_phy_dp1_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5385,6 +5884,11 @@ static struct clk_branch gcc_usb4_0_phy_p2rr2p_pipe_clk = { .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_0_phy_p2rr2p_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_0_phy_p2rr2p_pipe_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5398,6 +5902,11 @@ static struct clk_branch gcc_usb4_0_phy_pcie_pipe_clk = { .enable_mask = BIT(19), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_0_phy_pcie_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_0_phy_pcie_pipe_mux_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5405,12 +5914,17 @@ static struct clk_branch gcc_usb4_0_phy_pcie_pipe_clk = {static struct clk_branch gcc_usb4_0_phy_rx0_clk = { .halt_reg =0x9f0b0 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x9f0b0 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_0_phy_rx0_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_0_phy_rx0_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5418,12 +5932,17 @@ static struct clk_branch gcc_usb4_0_phy_rx0_clk = {static struct clk_branch gcc_usb4_0_phy_rx1_clk = { .halt_reg =0x9f0c0 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x9f0c0 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_0_phy_rx1_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_0_phy_rx1_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5439,6 +5958,11 @@ static struct clk_branch gcc_usb4_0_phy_usb_pipe_clk = { .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_0_phy_usb_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb34_prim_phy_pipe_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5470,6 +5994,11 @@ static struct clk_branch gcc_usb4_0_sys_clk = { .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_0_sys_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_0_phy_sys_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5512,12 +6041,17 @@ static struct clk_branch gcc_usb4_1_cfg_ahb_clk = {static struct clk_branch gcc_usb4_1_dp0_clk = { .halt_reg =0x2b060 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x2b060 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_1_dp0_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_1_phy_dp0_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5525,12 +6059,17 @@ static struct clk_branch gcc_usb4_1_dp0_clk = {static struct clk_branch gcc_usb4_1_dp1_clk = { .halt_reg =0x2b108 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x2b108 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_1_dp1_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_1_phy_dp1_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5562,6 +6101,11 @@ static struct clk_branch gcc_usb4_1_phy_p2rr2p_pipe_clk = { .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_1_phy_p2rr2p_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_1_phy_p2rr2p_pipe_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5575,6 +6119,11 @@ static struct clk_branch gcc_usb4_1_phy_pcie_pipe_clk = { .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_1_phy_pcie_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_1_phy_pcie_pipe_mux_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5582,12 +6131,17 @@ static struct clk_branch gcc_usb4_1_phy_pcie_pipe_clk = {static struct clk_branch gcc_usb4_1_phy_rx0_clk = { .halt_reg =0x2b0b0 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x2b0b0 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_1_phy_rx0_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_1_phy_rx0_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5595,12 +6149,17 @@ static struct clk_branch gcc_usb4_1_phy_rx0_clk = {static struct clk_branch gcc_usb4_1_phy_rx1_clk = { .halt_reg =0x2b0c0 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x2b0c0 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_1_phy_rx1_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_1_phy_rx1_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5616,6 +6175,11 @@ static struct clk_branch gcc_usb4_1_phy_usb_pipe_clk = { .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_1_phy_usb_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb34_sec_phy_pipe_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5647,6 +6211,11 @@ static struct clk_branch gcc_usb4_1_sys_clk = { .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_1_sys_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_1_phy_sys_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5689,12 +6258,17 @@ static struct clk_branch gcc_usb4_2_cfg_ahb_clk = {static struct clk_branch gcc_usb4_2_dp0_clk = { .halt_reg =0x11060 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x11060 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_2_dp0_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_2_phy_dp0_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5702,12 +6276,17 @@ static struct clk_branch gcc_usb4_2_dp0_clk = {static struct clk_branch gcc_usb4_2_dp1_clk = { .halt_reg =0x11108 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x11108 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_2_dp1_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_2_phy_dp1_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5739,6 +6318,11 @@ static struct clk_branch gcc_usb4_2_phy_p2rr2p_pipe_clk = { .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_2_phy_p2rr2p_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_2_phy_p2rr2p_pipe_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5752,6 +6336,11 @@ static struct clk_branch gcc_usb4_2_phy_pcie_pipe_clk = { .enable_mask = BIT(1), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_2_phy_pcie_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_2_phy_pcie_pipe_mux_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5759,12 +6348,17 @@ static struct clk_branch gcc_usb4_2_phy_pcie_pipe_clk = {static struct clk_branch gcc_usb4_2_phy_rx0_clk = { .halt_reg =0x110b0 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x110b0 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_2_phy_rx0_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_2_phy_rx0_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5772,12 +6366,17 @@ static struct clk_branch gcc_usb4_2_phy_rx0_clk = {static struct clk_branch gcc_usb4_2_phy_rx1_clk = { .halt_reg =0x110c0 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x110c0 , .enable_mask =BIT (0 ), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_2_phy_rx1_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb4_2_phy_rx1_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -5793,6 +6392,11 @@ static struct clk_branch gcc_usb4_2_phy_usb_pipe_clk = { .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data ) { .name ="gcc_usb4_2_phy_usb_pipe_clk" , + .parent_hws = (const struct clk_hw *[]) { + &gcc_usb34_tert_phy_pipe_clk_src.clkr.hw, + }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops, }, },
@@ -6483,6 +7087,9 @@ static struct clk_regmap *gcc_x1e80100_clocks[] = { [GCC_USB30_TERT_MOCK_UTMI_CLK_SRC] = &gcc_usb30_tert_mock_utmi_clk_src.clkr, [GCC_USB30_TERT_MOCK_UTMI_POSTDIV_CLK_SRC] = &gcc_usb30_tert_mock_utmi_postdiv_clk_src.clkr, [GCC_USB30_TERT_SLEEP_CLK] = &gcc_usb30_tert_sleep_clk.clkr, + [GCC_USB34_PRIM_PHY_PIPE_CLK_SRC] = &gcc_usb34_prim_phy_pipe_clk_src.clkr, + [GCC_USB34_SEC_PHY_PIPE_CLK_SRC] = &gcc_usb34_sec_phy_pipe_clk_src.clkr, + [GCC_USB34_TERT_PHY_PIPE_CLK_SRC] = &gcc_usb34_tert_phy_pipe_clk_src.clkr, [GCC_USB3_MP_PHY_AUX_CLK] = &gcc_usb3_mp_phy_aux_clk.clkr, [GCC_USB3_MP_PHY_AUX_CLK_SRC] = &gcc_usb3_mp_phy_aux_clk_src.clkr, [GCC_USB3_MP_PHY_COM_AUX_CLK] = &gcc_usb3_mp_phy_com_aux_clk.clkr,
@@ -6508,11 +7115,18 @@ static struct clk_regmap *gcc_x1e80100_clocks[] = { [GCC_USB4_0_DP1_CLK] = &gcc_usb4_0_dp1_clk.clkr, [GCC_USB4_0_MASTER_CLK] = &gcc_usb4_0_master_clk.clkr, [GCC_USB4_0_MASTER_CLK_SRC] = &gcc_usb4_0_master_clk_src.clkr, + [GCC_USB4_0_PHY_DP0_CLK_SRC] = &gcc_usb4_0_phy_dp0_clk_src.clkr, + [GCC_USB4_0_PHY_DP1_CLK_SRC] = &gcc_usb4_0_phy_dp1_clk_src.clkr, [GCC_USB4_0_PHY_P2RR2P_PIPE_CLK] = &gcc_usb4_0_phy_p2rr2p_pipe_clk.clkr, + [GCC_USB4_0_PHY_P2RR2P_PIPE_CLK_SRC] = &gcc_usb4_0_phy_p2rr2p_pipe_clk_src.clkr, [GCC_USB4_0_PHY_PCIE_PIPE_CLK] = &gcc_usb4_0_phy_pcie_pipe_clk.clkr, [GCC_USB4_0_PHY_PCIE_PIPE_CLK_SRC] = &gcc_usb4_0_phy_pcie_pipe_clk_src.clkr, + [GCC_USB4_0_PHY_PCIE_PIPE_MUX_CLK_SRC] = &gcc_usb4_0_phy_pcie_pipe_mux_clk_src.clkr, [GCC_USB4_0_PHY_RX0_CLK] = &gcc_usb4_0_phy_rx0_clk.clkr, + [GCC_USB4_0_PHY_RX0_CLK_SRC] = &gcc_usb4_0_phy_rx0_clk_src.clkr, [GCC_USB4_0_PHY_RX1_CLK] = &gcc_usb4_0_phy_rx1_clk.clkr, + [GCC_USB4_0_PHY_RX1_CLK_SRC] = &gcc_usb4_0_phy_rx1_clk_src.clkr, + [GCC_USB4_0_PHY_SYS_CLK_SRC] = &gcc_usb4_0_phy_sys_clk_src.clkr, [GCC_USB4_0_PHY_USB_PIPE_CLK] = &gcc_usb4_0_phy_usb_pipe_clk.clkr, [GCC_USB4_0_SB_IF_CLK] = &gcc_usb4_0_sb_if_clk.clkr, [GCC_USB4_0_SB_IF_CLK_SRC] = &gcc_usb4_0_sb_if_clk_src.clkr,
@@ -6524,11 +7138,18 @@ static struct clk_regmap *gcc_x1e80100_clocks[] = { [GCC_USB4_1_DP1_CLK] = &gcc_usb4_1_dp1_clk.clkr, [GCC_USB4_1_MASTER_CLK] = &gcc_usb4_1_master_clk.clkr, [GCC_USB4_1_MASTER_CLK_SRC] = &gcc_usb4_1_master_clk_src.clkr, + [GCC_USB4_1_PHY_DP0_CLK_SRC] = &gcc_usb4_1_phy_dp0_clk_src.clkr, + [GCC_USB4_1_PHY_DP1_CLK_SRC] = &gcc_usb4_1_phy_dp1_clk_src.clkr, [GCC_USB4_1_PHY_P2RR2P_PIPE_CLK] = &gcc_usb4_1_phy_p2rr2p_pipe_clk.clkr, + [GCC_USB4_1_PHY_P2RR2P_PIPE_CLK_SRC] = &gcc_usb4_1_phy_p2rr2p_pipe_clk_src.clkr, [GCC_USB4_1_PHY_PCIE_PIPE_CLK] = &gcc_usb4_1_phy_pcie_pipe_clk.clkr, [GCC_USB4_1_PHY_PCIE_PIPE_CLK_SRC] = &gcc_usb4_1_phy_pcie_pipe_clk_src.clkr, + [GCC_USB4_1_PHY_PCIE_PIPE_MUX_CLK_SRC] = &gcc_usb4_1_phy_pcie_pipe_mux_clk_src.clkr, [GCC_USB4_1_PHY_RX0_CLK] = &gcc_usb4_1_phy_rx0_clk.clkr, + [GCC_USB4_1_PHY_RX0_CLK_SRC] = &gcc_usb4_1_phy_rx0_clk_src.clkr, [GCC_USB4_1_PHY_RX1_CLK] = &gcc_usb4_1_phy_rx1_clk.clkr, + [GCC_USB4_1_PHY_RX1_CLK_SRC] = &gcc_usb4_1_phy_rx1_clk_src.clkr, + [GCC_USB4_1_PHY_SYS_CLK_SRC] = &gcc_usb4_1_phy_sys_clk_src.clkr, [GCC_USB4_1_PHY_USB_PIPE_CLK] = &gcc_usb4_1_phy_usb_pipe_clk.clkr, [GCC_USB4_1_SB_IF_CLK] = &gcc_usb4_1_sb_if_clk.clkr, [GCC_USB4_1_SB_IF_CLK_SRC] = &gcc_usb4_1_sb_if_clk_src.clkr,
@@ -6540,11 +7161,18 @@ static struct clk_regmap *gcc_x1e80100_clocks[] = { [GCC_USB4_2_DP1_CLK] = &gcc_usb4_2_dp1_clk.clkr, [GCC_USB4_2_MASTER_CLK] = &gcc_usb4_2_master_clk.clkr, [GCC_USB4_2_MASTER_CLK_SRC] = &gcc_usb4_2_master_clk_src.clkr, + [GCC_USB4_2_PHY_DP0_CLK_SRC] = &gcc_usb4_2_phy_dp0_clk_src.clkr, + [GCC_USB4_2_PHY_DP1_CLK_SRC] = &gcc_usb4_2_phy_dp1_clk_src.clkr, [GCC_USB4_2_PHY_P2RR2P_PIPE_CLK] = &gcc_usb4_2_phy_p2rr2p_pipe_clk.clkr, + [GCC_USB4_2_PHY_P2RR2P_PIPE_CLK_SRC] = &gcc_usb4_2_phy_p2rr2p_pipe_clk_src.clkr, [GCC_USB4_2_PHY_PCIE_PIPE_CLK] = &gcc_usb4_2_phy_pcie_pipe_clk.clkr, [GCC_USB4_2_PHY_PCIE_PIPE_CLK_SRC] = &gcc_usb4_2_phy_pcie_pipe_clk_src.clkr, + [GCC_USB4_2_PHY_PCIE_PIPE_MUX_CLK_SRC] = &gcc_usb4_2_phy_pcie_pipe_mux_clk_src.clkr, [GCC_USB4_2_PHY_RX0_CLK] = &gcc_usb4_2_phy_rx0_clk.clkr, + [GCC_USB4_2_PHY_RX0_CLK_SRC] = &gcc_usb4_2_phy_rx0_clk_src.clkr, [GCC_USB4_2_PHY_RX1_CLK] = &gcc_usb4_2_phy_rx1_clk.clkr, + [GCC_USB4_2_PHY_RX1_CLK_SRC] = &gcc_usb4_2_phy_rx1_clk_src.clkr, + [GCC_USB4_2_PHY_SYS_CLK_SRC] = &gcc_usb4_2_phy_sys_clk_src.clkr, [GCC_USB4_2_PHY_USB_PIPE_CLK] = &gcc_usb4_2_phy_usb_pipe_clk.clkr, [GCC_USB4_2_SB_IF_CLK] = &gcc_usb4_2_sb_if_clk.clkr, [GCC_USB4_2_SB_IF_CLK_SRC] = &gcc_usb4_2_sb_if_clk_src.clkr,
@@ -6660,16 +7288,52 @@ static const struct qcom_reset_map gcc_x1e80100_resets[] = { [GCC_USB3_UNIPHY_MP0_BCR] = { 0x19000 }, [GCC_USB3_UNIPHY_MP1_BCR] = { 0x54000 }, [GCC_USB3PHY_PHY_PRIM_BCR] = { 0x50004 }, + [GCC_USB4PHY_PHY_PRIM_BCR] = { 0x5000c }, [GCC_USB3PHY_PHY_SEC_BCR] = { 0x2a004 }, + [GCC_USB4PHY_PHY_SEC_BCR] = { 0x2a00c }, [GCC_USB3PHY_PHY_TERT_BCR] = { 0xa3004 }, + [GCC_USB4PHY_PHY_TERT_BCR] = { 0xa300c }, [GCC_USB3UNIPHY_PHY_MP0_BCR] = { 0x19004 }, [GCC_USB3UNIPHY_PHY_MP1_BCR] = { 0x54004 }, [GCC_USB4_0_BCR] = { 0x9f000 }, [GCC_USB4_0_DP0_PHY_PRIM_BCR] = { 0x50010 }, - [GCC_USB4_1_DP0_PHY_SEC_BCR] = { 0x2a010 }, - [GCC_USB4_2_DP0_PHY_TERT_BCR] = { 0xa3010 }, + [GCC_USB4_0_MISC_USB4_SYS_BCR] = { .reg = 0xad0f8, .bit = 0 }, + [GCC_USB4_0_MISC_RX_CLK_0_BCR] = { .reg = 0xad0f8, .bit = 1 }, + [GCC_USB4_0_MISC_RX_CLK_1_BCR] = { .reg = 0xad0f8, .bit = 2 }, + [GCC_USB4_0_MISC_USB_PIPE_BCR] = { .reg = 0xad0f8, .bit = 3 }, + [GCC_USB4_0_MISC_PCIE_PIPE_BCR] = { .reg = 0xad0f8, .bit = 4 }, + [GCC_USB4_0_MISC_TMU_BCR] = { .reg = 0xad0f8, .bit = 5 }, + [GCC_USB4_0_MISC_SB_IF_BCR] = { .reg = 0xad0f8, .bit = 6 }, + [GCC_USB4_0_MISC_HIA_MSTR_BCR] = { .reg = 0xad0f8, .bit = 7 }, + [GCC_USB4_0_MISC_AHB_BCR] = { .reg = 0xad0f8, .bit = 8 }, + [GCC_USB4_0_MISC_DP0_MAX_PCLK_BCR] = { .reg = 0xad0f8, .bit = 9 }, + [GCC_USB4_0_MISC_DP1_MAX_PCLK_BCR] = { .reg = 0xad0f8, .bit = 10 }, [GCC_USB4_1_BCR] = { 0x2b000 }, + [GCC_USB4_1_DP0_PHY_SEC_BCR] = { 0x2a010 }, + [GCC_USB4_1_MISC_USB4_SYS_BCR] = { .reg = 0xae0f8, .bit = 0 }, + [GCC_USB4_1_MISC_RX_CLK_0_BCR] = { .reg = 0xae0f8, .bit = 1 }, + [GCC_USB4_1_MISC_RX_CLK_1_BCR] = { .reg = 0xae0f8, .bit = 2 }, + [GCC_USB4_1_MISC_USB_PIPE_BCR] = { .reg = 0xae0f8, .bit = 3 }, + [GCC_USB4_1_MISC_PCIE_PIPE_BCR] = { .reg = 0xae0f8, .bit = 4 }, + [GCC_USB4_1_MISC_TMU_BCR] = { .reg = 0xae0f8, .bit = 5 }, + [GCC_USB4_1_MISC_SB_IF_BCR] = { .reg = 0xae0f8, .bit = 6 }, + [GCC_USB4_1_MISC_HIA_MSTR_BCR] = { .reg = 0xae0f8, .bit = 7 }, + [GCC_USB4_1_MISC_AHB_BCR] = { .reg = 0xae0f8, .bit = 8 }, + [GCC_USB4_1_MISC_DP0_MAX_PCLK_BCR] = { .reg = 0xae0f8, .bit = 9 }, + [GCC_USB4_1_MISC_DP1_MAX_PCLK_BCR] = { .reg = 0xae0f8, .bit = 10 }, [GCC_USB4_2_BCR] = { 0x11000 }, + [GCC_USB4_2_DP0_PHY_TERT_BCR] = { 0xa3010 }, + [GCC_USB4_2_MISC_USB4_SYS_BCR] = { .reg = 0xaf0f8, .bit = 0 }, + [GCC_USB4_2_MISC_RX_CLK_0_BCR] = { .reg = 0xaf0f8, .bit = 1 }, + [GCC_USB4_2_MISC_RX_CLK_1_BCR] = { .reg = 0xaf0f8, .bit = 2 }, + [GCC_USB4_2_MISC_USB_PIPE_BCR] = { .reg = 0xaf0f8, .bit = 3 }, + [GCC_USB4_2_MISC_PCIE_PIPE_BCR] = { .reg = 0xaf0f8, .bit = 4 }, + [GCC_USB4_2_MISC_TMU_BCR] = { .reg = 0xaf0f8, .bit = 5 }, + [GCC_USB4_2_MISC_SB_IF_BCR] = { .reg = 0xaf0f8, .bit = 6 }, + [GCC_USB4_2_MISC_HIA_MSTR_BCR] = { .reg = 0xaf0f8, .bit = 7 }, + [GCC_USB4_2_MISC_AHB_BCR] = { .reg = 0xaf0f8, .bit = 8 }, + [GCC_USB4_2_MISC_DP0_MAX_PCLK_BCR] = { .reg = 0xaf0f8, .bit = 9 }, + [GCC_USB4_2_MISC_DP1_MAX_PCLK_BCR] = { .reg = 0xaf0f8, .bit = 10 }, [GCC_USB_0_PHY_BCR] = { 0x50020 }, [GCC_USB_1_PHY_BCR] = { 0x2a020 }, [GCC_USB_2_PHY_BCR] = { 0xa3020 },
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 52/507 rculist: Add hlist_nulls_replace_rcu() and hlist_nulls_replace_init_rcu()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xuanqiang Luo <[email protected]>
[ Upstream commit 9c4609225ec1cb551006d6a03c7c4ad8cb5584c0 ]
Add two functions to atomically replace RCU-protected hlist_nulls entries.
Keep using WRITE_ONCE() to assign values to ->next and ->pprev, as mentioned in the patch below:
commit efd04f8a8b45 ("rcu: Use WRITE_ONCE() for assignments to ->next for rculist_nulls")
commit 860c8802ace1 ("rcu: Use WRITE_ONCE() for assignments to ->pprev for hlist_nulls")
Stable-dep-of: 1532ed0d0753 ("inet: Avoid ehash lookup race in inet_ehash_insert()")
--- include/linux/rculist_nulls.h | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+)
include/linux/rculist_nulls.h +59 -0
@@ -52,6 +52,13 @@ static inline void hlist_nulls_del_init_rcu(struct hlist_nulls_node *n)#define hlist_nulls_next_rcu (node) \ (*((struct hlist_nulls_node __rcu __force **)&(node)->next)) +/** +* hlist_nulls_pprev_rcu - returns the dereferenced pprev of @node. +* @node: element of the list. +*/ +#define hlist_nulls_pprev_rcu (node) \ + (*((struct hlist_nulls_node __rcu __force **)(node)->pprev)) +/** * hlist_nulls_del_rcu - deletes entry from hash list without re-initialization * @n: the element to delete from the hash list.
@@ -152,6 +159,58 @@ static inline void hlist_nulls_add_fake(struct hlist_nulls_node *n) n->next = (struct hlist_nulls_node *)NULLS_MARKER (NULL ); } +/** +* hlist_nulls_replace_rcu - replace an old entry by a new one +* @old: the element to be replaced +* @new: the new element to insert +* +* Description: +* Replace the old entry with the new one in a RCU-protected hlist_nulls, while +* permitting racing traversals. +* +* The caller must take whatever precautions are necessary (such as holding +* appropriate locks) to avoid racing with another list-mutation primitive, such +* as hlist_nulls_add_head_rcu() or hlist_nulls_del_rcu(), running on this same +* list. However, it is perfectly legal to run concurrently with the _rcu +* list-traversal primitives, such as hlist_nulls_for_each_entry_rcu(). +*/ +static inline void hlist_nulls_replace_rcu (struct hlist_nulls_node *old, +struct hlist_nulls_node *new) +{ +struct hlist_nulls_node *next = old->next; + +WRITE_ONCE (new->next, next); +WRITE_ONCE (new->pprev, old->pprev); +rcu_assign_pointer (hlist_nulls_pprev_rcu (new), new); +if (!is_a_nulls (next)) +WRITE_ONCE (next->pprev, &new->next); +} + +/** +* hlist_nulls_replace_init_rcu - replace an old entry by a new one and +* initialize the old +* @old: the element to be replaced +* @new: the new element to insert +* +* Description: +* Replace the old entry with the new one in a RCU-protected hlist_nulls, while +* permitting racing traversals, and reinitialize the old entry. +* +* Note: @old must be hashed. +* +* The caller must take whatever precautions are necessary (such as holding +* appropriate locks) to avoid racing with another list-mutation primitive, such +* as hlist_nulls_add_head_rcu() or hlist_nulls_del_rcu(), running on this same +* list. However, it is perfectly legal to run concurrently with the _rcu +* list-traversal primitives, such as hlist_nulls_for_each_entry_rcu(). +*/ +static inline void hlist_nulls_replace_init_rcu (struct hlist_nulls_node *old, +struct hlist_nulls_node *new) +{ +hlist_nulls_replace_rcu (old, new); +WRITE_ONCE (old->pprev,NULL ); +} +/** * hlist_nulls_for_each_entry_rcu - iterate over rcu list of given type * @tpos: the type * to use as a loop cursor.
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 53/507 inet: Avoid ehash lookup race in inet_ehash_insert()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xuanqiang Luo <[email protected]>
[ Upstream commit 1532ed0d0753c83e72595f785f82b48c28bbe5dc ]
Since ehash lookups are lockless, if one CPU performs a lookup while another concurrently deletes and inserts (removing reqsk and inserting sk), the lookup may fail to find the socket, an RST may be sent.
The call trace map is drawn as follows:
CPU 0 CPU 1
----- -----
inet_ehash_insert()
spin_lock()
sk_nulls_del_node_init_rcu(osk)
__inet_lookup_established()
(lookup failed)
__sk_nulls_add_node_rcu(sk, list)
spin_unlock()As both deletion and insertion operate on the same ehash chain, this patch introduces a new sk_nulls_replace_node_init_rcu() helper functions to implement atomic replacement.
--- include/net/sock.h | 13 +++++++++++++ net/ipv4/inet_hashtables.c | 8 ++++++-- 2 files changed, 19 insertions(+), 2 deletions(-)
include/net/sock.h +13 -0
@@ -850,6 +850,19 @@ static inline bool sk_nulls_del_node_init_rcu(struct sock *sk)return rc; } +static inline bool sk_nulls_replace_node_init_rcu (struct sock *old, +struct sock *new) +{ +if (sk_hashed (old)) { +hlist_nulls_replace_init_rcu (&old->sk_nulls_node, + &new->sk_nulls_node); +__sock_put (old); +return true; + } + +return false; +} +static inline void __sk_add_node (struct sock *sk,struct hlist_head *list) {hlist_add_head (&sk->sk_node, list);
net/ipv4/inet_hashtables.c +6 -2
@@ -720,8 +720,11 @@ bool inet_ehash_insert(struct sock *sk, struct sock *osk, bool *found_dup_sk)spin_lock (lock);if (osk) {WARN_ON_ONCE (sk->sk_hash != osk->sk_hash); - ret =sk_nulls_del_node_init_rcu (osk); - }else if (found_dup_sk) { + ret =sk_nulls_replace_node_init_rcu (osk, sk); + goto unlock; + } + +if (found_dup_sk) { *found_dup_sk =inet_ehash_lookup_by_sk (sk, list);if (*found_dup_sk) ret = false;
@@ -730,6 +733,7 @@ bool inet_ehash_insert(struct sock *sk, struct sock *osk, bool *found_dup_sk)if (ret)__sk_nulls_add_node_rcu (sk, list); +unlock:spin_unlock (lock);return ret;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 54/507 inet: Avoid ehash lookup race in inet_twsk_hashdance_schedule()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xuanqiang Luo <[email protected]>
[ Upstream commit b8ec80b130211e7bf076ef72365952979d5f7a72 ]
Since ehash lookups are lockless, if another CPU is converting sk to tw concurrently, fetching the newly inserted tw with tw->tw_refcnt == 0 cause lookup failure.
The call trace map is drawn as follows:
CPU 0 CPU 1
----- -----
inet_twsk_hashdance_schedule() spin_lock() inet_twsk_add_node_rcu(tw, ...) __inet_lookup_established() (find tw, failure due to tw_refcnt = 0) __sk_nulls_del_node_init_rcu(sk) refcount_set(&tw->tw_refcnt, 3) spin_unlock()
By replacing sk with tw atomically via hlist_nulls_replace_init_rcu() after setting tw_refcnt, we ensure that tw is either fully initialized or not visible to other CPUs, eliminating the race.
It's worth noting that we held lock_sock() before the replacement, so there's no need to check if sk is hashed. Thanks to Kuniyuki Iwashima!
--- net/ipv4/inet_timewait_sock.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-)
net/ipv4/inet_timewait_sock.c +12 -23
@@ -86,12 +86,6 @@ void inet_twsk_put(struct inet_timewait_sock *tw) }EXPORT_SYMBOL_GPL (inet_twsk_put); -static void inet_twsk_add_node_rcu (struct inet_timewait_sock *tw, -struct hlist_nulls_head *list) -{ -hlist_nulls_add_head_rcu (&tw->tw_node, list); -} -static void inet_twsk_schedule (struct inet_timewait_sock *tw,int timeo) {__inet_twsk_schedule (tw, timeo, false);
@@ -111,13 +105,12 @@ void inet_twsk_hashdance_schedule(struct inet_timewait_sock *tw, {const struct inet_sock *inet =inet_sk (sk);const struct inet_connection_sock *icsk =inet_csk (sk); -struct inet_ehash_bucket *ehead =inet_ehash_bucket (hashinfo, sk->sk_hash);spinlock_t *lock =inet_ehash_lockp (hashinfo, sk->sk_hash);struct inet_bind_hashbucket *bhead, *bhead2; -/* Step 1: Put TW into bind hash. Original socket stays there too. -Note, that any socket with inet->num != 0 MUST be bound in -binding cache, even if it is closed. +/* Put TW into bind hash. Original socket stays there too. +* Note, that any socket with inet->num != 0 MUST be bound in +* binding cache, even if it is closed. */ bhead = &hashinfo->bhash[inet_bhashfn (twsk_net (tw), inet->inet_num, hashinfo->bhash_size)];
@@ -139,19 +132,6 @@ void inet_twsk_hashdance_schedule(struct inet_timewait_sock *tw,spin_lock (lock); -/* Step 2: Hash TW into tcp ehash chain */ -inet_twsk_add_node_rcu (tw, &ehead->chain); - -/* Step 3: Remove SK from hash chain */ -if (__sk_nulls_del_node_init_rcu (sk)) -sock_prot_inuse_add (sock_net (sk), sk->sk_prot,-1 ); - - -/* Ensure above writes are committed into memory before updating the -* refcount. -* Provides ordering vs later refcount_inc(). -*/ -smp_wmb ();/* tw_refcnt is set to 3 because we have : * - one reference for bhash chain. * - one reference for ehash chain.
@@ -161,6 +141,15 @@ void inet_twsk_hashdance_schedule(struct inet_timewait_sock *tw,*/ refcount_set (&tw->tw_refcnt,3 ); +/* Ensure tw_refcnt has been set before tw is published. +* smp_wmb() provides the necessary memory barrier to enforce this +* ordering. +*/ +smp_wmb (); + +hlist_nulls_replace_init_rcu (&sk->sk_nulls_node, &tw->tw_node); +sock_prot_inuse_add (sock_net (sk), sk->sk_prot,-1 ); +inet_twsk_schedule (tw, timeo);spin_unlock (lock);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 55/507 iio: imu: st_lsm6dsx: Fix measurement unit for odr struct member
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Francesco Lavra <[email protected]>
[ Upstream commit c6d702f2b77194b62fb2098c63bb7f2a87da142d ]
The odr field in struct st_lsm6dsx_sensor contains a data rate value expressed in mHz, not in Hz.
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h +1 -1
@@ -383,7 +383,7 @@ enum st_lsm6dsx_fifo_mode {* @id: Sensor identifier. * @hw: Pointer to instance of struct st_lsm6dsx_hw. * @gain: Configured sensor sensitivity. -* @odr: Output data rate of the sensor [Hz]. +* @odr: Output data rate of the sensor [mHz]. * @samples_to_discard: Number of samples to discard for filters settling time. * @watermark: Sensor watermark level. * @decimator: Sensor decimation factor.
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 56/507 firmware: qcom: tzmem: fix qcom_tzmem_policy kernel-doc
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <[email protected]>
[ Upstream commit edd548dc64a699d71ea4f537f815044e763d01e1 ]
Fix kernel-doc warnings by using correct kernel-doc syntax and formatting to prevent warnings:
Warning: include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
'QCOM_TZMEM_POLICY_STATIC' not described in enum 'qcom_tzmem_policy'
Warning: ../include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
'QCOM_TZMEM_POLICY_MULTIPLIER' not described in enum 'qcom_tzmem_policy'
Warning: ../include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
'QCOM_TZMEM_POLICY_ON_DEMAND' not described in enum 'qcom_tzmem_policy'
--- include/linux/firmware/qcom/qcom_tzmem.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
include/linux/firmware/qcom/qcom_tzmem.h +12 -3
@@ -17,11 +17,20 @@ struct qcom_tzmem_pool;* enum qcom_tzmem_policy - Policy for pool growth. */ enum qcom_tzmem_policy { -/**< Static pool, never grow above initial size. */ +/** +* @QCOM_TZMEM_POLICY_STATIC: Static pool, +* never grow above initial size. +*/ QCOM_TZMEM_POLICY_STATIC =1 , -/**< When out of memory, add increment * current size of memory. */ +/** +* @QCOM_TZMEM_POLICY_MULTIPLIER: When out of memory, +* add increment * current size of memory. +*/ QCOM_TZMEM_POLICY_MULTIPLIER , -/**< When out of memory add as much as is needed until max_size. */ +/** +* @QCOM_TZMEM_POLICY_ON_DEMAND: When out of memory +* add as much as is needed until max_size. +*/ QCOM_TZMEM_POLICY_ON_DEMAND , };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 57/507 crypto: aead - Fix reqsize handling
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: T Pratham <[email protected]>
[ Upstream commit 9b04d8f00569573796dd05397f5779135593eb24 ]
Commit afddce13ce81d ("crypto: api - Add reqsize to crypto_alg") introduced cra_reqsize field in crypto_alg struct to replace type specific reqsize fields. It looks like this was introduced specifically for ahash and acomp from the commit description as subsequent commits add necessary changes in these alg frameworks.
However, this is being recommended for use in all crypto algs instead of setting reqsize using crypto_*_set_reqsize(). Using cra_reqsize in aead algorithms, hence, causes memory corruptions and crashes as the underlying functions in the algorithm framework have not been updated to set the reqsize properly from cra_reqsize. [1]
Add proper set_reqsize calls in the aead init function to properly initialize reqsize for these algorithms in the framework.
[1]: https://gist.github.com/Pratham-T/24247446f1faf4b7843e4014d5089f6b
--- crypto/aead.c | 1 + 1 file changed, 1 insertion(+)
crypto/aead.c +1 -0
@@ -120,6 +120,7 @@ static int crypto_aead_init_tfm(struct crypto_tfm *tfm)struct aead_alg *alg =crypto_aead_alg (aead);crypto_aead_set_flags (aead,CRYPTO_TFM_NEED_KEY ); +crypto_aead_set_reqsize (aead,crypto_tfm_alg_reqsize (tfm)); aead->authsize = alg->maxauthsize;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 58/507 block/mq-deadline: Introduce dd_start_request()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit 93a358af59c6e8ab00b57cfdb1c437516a4948ca ]
Prepare for adding a second caller of this function. No functionality has been changed.
Stable-dep-of: d60055cf5270 ("block/mq-deadline: Switch back to a single dispatch list")
--- block/mq-deadline.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
block/mq-deadline.c +14 -8
@@ -310,6 +310,19 @@ static bool started_after(struct deadline_data *dd, struct request *rq,return time_after (start_time, latest_start); } +static struct request *dd_start_request (struct deadline_data *dd, +enum dd_data_dir data_dir, +struct request *rq) +{ +u8 ioprio_class =dd_rq_ioclass (rq); +enum dd_prio prio = ioprio_class_to_prio[ioprio_class]; + + dd->per_prio[prio].latest_pos[data_dir] =blk_rq_pos (rq); + dd->per_prio[prio].stats.dispatched++; + rq->rq_flags |=RQF_STARTED ; +return rq; +} +/* * deadline_dispatch_requests selects the best request according to * read/write expire, fifo_batch, etc and with a start time <= @latest_start.
@@ -320,8 +333,6 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd, {struct request *rq, *next_rq;enum dd_data_dir data_dir; -enum dd_prio prio; -u8 ioprio_class;lockdep_assert_held (&dd->lock);
@@ -415,12 +426,7 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd, dd->batching++;deadline_move_request (dd, per_prio, rq); done: - ioprio_class =dd_rq_ioclass (rq); - prio = ioprio_class_to_prio[ioprio_class]; - dd->per_prio[prio].latest_pos[data_dir] =blk_rq_pos (rq); - dd->per_prio[prio].stats.dispatched++; - rq->rq_flags |=RQF_STARTED ; -return rq; +return dd_start_request (dd, data_dir, rq); }/*
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 59/507 block/mq-deadline: Switch back to a single dispatch list
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit d60055cf52703a705b86fb25b9b7931ec7ee399c ]
Commit c807ab520fc3 ("block/mq-deadline: Add I/O priority support") modified the behavior of request flag BLK_MQ_INSERT_AT_HEAD from dispatching a request before other requests into dispatching a request before other requests with the same I/O priority. This is not correct since BLK_MQ_INSERT_AT_HEAD is used when requeuing requests and also when a flush request is inserted. Both types of requests should be dispatched as soon as possible. Hence, make the mq-deadline I/O scheduler again ignore the I/O priority for BLK_MQ_INSERT_AT_HEAD requests.
--- block/mq-deadline.c | 107 +++++++++++++++++++------------------------- 1 file changed, 47 insertions(+), 60 deletions(-)
block/mq-deadline.c +47 -60
@@ -71,7 +71,6 @@ struct io_stats_per_prio {* present on both sort_list[] and fifo_list[]. */ struct dd_per_prio { -struct list_head dispatch;struct rb_root sort_list[DD_DIR_COUNT ];struct list_head fifo_list[DD_DIR_COUNT ];/* Position of the most recently dispatched request. */
@@ -84,6 +83,7 @@ struct deadline_data {* run time data */ +struct list_head dispatch;struct dd_per_prio per_prio[DD_PRIO_COUNT ];/* Data direction of latest dispatched request. */
@@ -336,16 +336,6 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd,lockdep_assert_held (&dd->lock); -if (!list_empty (&per_prio->dispatch)) { - rq = list_first_entry(&per_prio->dispatch, struct request, - queuelist); -if (started_after (dd, rq, latest_start)) -return NULL ; -list_del_init (&rq->queuelist); - data_dir =rq_data_dir (rq); - goto done; - } -/* * batches are currently reads XOR writes */
@@ -425,7 +415,6 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd,*/ dd->batching++;deadline_move_request (dd, per_prio, rq); -done:return dd_start_request (dd, data_dir, rq); }
@@ -473,6 +462,14 @@ static struct request *dd_dispatch_request(struct blk_mq_hw_ctx *hctx)enum dd_prio prio;spin_lock (&dd->lock); + +if (!list_empty (&dd->dispatch)) { + rq = list_first_entry(&dd->dispatch, struct request, queuelist); +list_del_init (&rq->queuelist); +dd_start_request (dd,rq_data_dir (rq), rq); + goto unlock; + } + rq =dd_dispatch_prio_aged_requests (dd, now);if (rq) goto unlock;
@@ -561,10 +558,10 @@ static int dd_init_sched(struct request_queue *q, struct elevator_queue *eq) eq->elevator_data = dd; +INIT_LIST_HEAD (&dd->dispatch);for (prio =0 ; prio <=DD_PRIO_MAX ; prio++) {struct dd_per_prio *per_prio = &dd->per_prio[prio]; -INIT_LIST_HEAD (&per_prio->dispatch);INIT_LIST_HEAD (&per_prio->fifo_list[DD_READ ]);INIT_LIST_HEAD (&per_prio->fifo_list[DD_WRITE ]); per_prio->sort_list[DD_READ ] =RB_ROOT ;
@@ -668,7 +665,7 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,trace_block_rq_insert (rq);if (flags &BLK_MQ_INSERT_AT_HEAD ) { -list_add (&rq->queuelist, &per_prio->dispatch); +list_add (&rq->queuelist, &dd->dispatch); rq->fifo_time = jiffies; }else {deadline_add_rq_rb (per_prio, rq);
@@ -735,8 +732,7 @@ static void dd_finish_request(struct request *rq)static bool dd_has_work_for_prio (struct dd_per_prio *per_prio) { -return !list_empty_careful (&per_prio->dispatch) || - !list_empty_careful (&per_prio->fifo_list[DD_READ ]) || +return !list_empty_careful (&per_prio->fifo_list[DD_READ ]) || !list_empty_careful (&per_prio->fifo_list[DD_WRITE ]); }
@@ -745,6 +741,9 @@ static bool dd_has_work(struct blk_mq_hw_ctx *hctx)struct deadline_data *dd = hctx->queue->elevator->elevator_data;enum dd_prio prio; +if (!list_empty_careful (&dd->dispatch)) +return true; +for (prio =0 ; prio <=DD_PRIO_MAX ; prio++)if (dd_has_work_for_prio (&dd->per_prio[prio]))return true;
@@ -953,49 +952,39 @@ static int dd_owned_by_driver_show(void *data, struct seq_file *m)return 0 ; } -#define DEADLINE_DISPATCH_ATTR (prio) \ -static void *deadline_dispatch##prio##_start(struct seq_file *m, \ - loff_t *pos) \ - __acquires(&dd->lock) \ -{ \ - struct request_queue *q = m->private; \ - struct deadline_data *dd = q->elevator->elevator_data; \ - struct dd_per_prio *per_prio = &dd->per_prio[prio]; \ - \ - spin_lock(&dd->lock); \ - return seq_list_start(&per_prio->dispatch, *pos); \ -} \ - \ -static void *deadline_dispatch##prio##_next(struct seq_file *m, \ - void *v, loff_t *pos) \ -{ \ - struct request_queue *q = m->private; \ - struct deadline_data *dd = q->elevator->elevator_data; \ - struct dd_per_prio *per_prio = &dd->per_prio[prio]; \ - \ - return seq_list_next(v, &per_prio->dispatch, pos); \ -} \ - \ -static void deadline_dispatch##prio##_stop(struct seq_file *m, void *v) \ - __releases(&dd->lock) \ -{ \ - struct request_queue *q = m->private; \ - struct deadline_data *dd = q->elevator->elevator_data; \ - \ - spin_unlock(&dd->lock); \ -} \ - \ -static const struct seq_operations deadline_dispatch##prio##_seq_ops = { \ - .start = deadline_dispatch##prio##_start, \ - .next = deadline_dispatch##prio##_next, \ - .stop = deadline_dispatch##prio##_stop, \ - .show = blk_mq_debugfs_rq_show, \ +static void *deadline_dispatch_start (struct seq_file *m,loff_t *pos) + __acquires(&dd->lock) +{ +struct request_queue *q = m->private; +struct deadline_data *dd = q->elevator->elevator_data; + +spin_lock (&dd->lock); +return seq_list_start (&dd->dispatch, *pos); } -DEADLINE_DISPATCH_ATTR (0 ); -DEADLINE_DISPATCH_ATTR (1 ); -DEADLINE_DISPATCH_ATTR (2 ); -#undef DEADLINE_DISPATCH_ATTR +static void *deadline_dispatch_next (struct seq_file *m,void *v,loff_t *pos) +{ +struct request_queue *q = m->private; +struct deadline_data *dd = q->elevator->elevator_data; + +return seq_list_next (v, &dd->dispatch, pos); +} + +static void deadline_dispatch_stop (struct seq_file *m,void *v) + __releases(&dd->lock) +{ +struct request_queue *q = m->private; +struct deadline_data *dd = q->elevator->elevator_data; + +spin_unlock (&dd->lock); +} + +static const struct seq_operations deadline_dispatch_seq_ops = { + .start = deadline_dispatch_start, + .next = deadline_dispatch_next, + .stop = deadline_dispatch_stop, + .show = blk_mq_debugfs_rq_show, +};#define DEADLINE_QUEUE_DDIR_ATTRS (name) \ {#name "_fifo_list", 0400, \
@@ -1018,9 +1007,7 @@ static const struct blk_mq_debugfs_attr deadline_queue_debugfs_attrs[] = { {"batching", 0400, deadline_batching_show}, {"starved", 0400, deadline_starved_show}, {"async_depth", 0400, dd_async_depth_show}, - {"dispatch0", 0400, .seq_ops = &deadline_dispatch0_seq_ops}, - {"dispatch1", 0400, .seq_ops = &deadline_dispatch1_seq_ops}, - {"dispatch2", 0400, .seq_ops = &deadline_dispatch2_seq_ops}, + {"dispatch", 0400, .seq_ops = &deadline_dispatch_seq_ops}, {"owned_by_driver", 0400, dd_owned_by_driver_show}, {"queued", 0400, dd_queued_show}, {},
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 60/507 arm64: dts: freescale: imx8mp-venice-gw7905-2x: remove duplicate usdhc1 props
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Harvey <[email protected]>
[ Upstream commit 8b7e58ab4a02601a0e86e9f9701d4612038d8b29 ]
Remove the un-intended duplicate properties from usdhc1.
--- arch/arm64/boot/dts/freescale/imx8mp-venice-gw702x.dtsi | 3 --- 1 file changed, 3 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-venice-gw702x.dtsi +0 -3
@@ -423,9 +423,6 @@ &usdhc1 { bus-width = <4>; non-removable; status = "okay"; - bus-width = <4>; - non-removable; - status = "okay"; }; /* eMMC */
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 61/507 arm64: dts: imx8mm-venice-gw72xx: remove unused sdhc1 pinctrl
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Harvey <[email protected]>
[ Upstream commit d949b8d12d6e8fa119bca10d3157cd42e810f6f7 ]
The SDHC1 interface is not used on the imx8mm-venice-gw72xx. Remove the unused pinctrl_usdhc1 iomux node.
--- .../boot/dts/freescale/imx8mm-venice-gw72xx.dtsi | 11 ----------- 1 file changed, 11 deletions(-)
arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi +0 -11
@@ -351,17 +351,6 @@ MX8MM_IOMUXC_UART4_TXD_UART4_DCE_TX 0x140 >; }; - pinctrl_usdhc1: usdhc1grp { - fsl,pins = < - MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x190 - MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d0 - MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d0 - MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d0 - MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d0 - MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d0 - >; - }; - pinctrl_usdhc2: usdhc2grp { fsl,pins = < MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 62/507 arm64: dts: imx8mp-venice-gw702x: remove off-board uart
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Harvey <[email protected]>
[ Upstream commit effe98060f70eb96e142f656e750d6af275ceac3 ]
UART1 and UART3 go to a connector for use on a baseboard and as such are defined in the baseboard device-trees. Remove them from the gw702x SOM device-tree.
--- .../dts/freescale/imx8mp-venice-gw702x.dtsi | 28 ------------------- 1 file changed, 28 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-venice-gw702x.dtsi +0 -28
@@ -395,13 +395,6 @@ &i2c3 { status = "okay"; }; -/* off-board header */ -&uart1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart1>; - status = "okay"; -}; - /* console */ &uart2 { pinctrl-names = "default";
@@ -409,13 +402,6 @@ &uart2 { status = "okay"; }; -/* off-board header */ -&uart3 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart3>; - status = "okay"; -}; - /* off-board */ &usdhc1 { pinctrl-names = "default";
@@ -520,13 +506,6 @@ MX8MP_IOMUXC_I2C3_SDA__GPIO5_IO19 0x400001c2 >; }; - pinctrl_uart1: uart1grp { - fsl,pins = < - MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x140 - MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x140 - >; - }; - pinctrl_uart2: uart2grp { fsl,pins = < MX8MP_IOMUXC_UART2_RXD__UART2_DCE_RX 0x140
@@ -534,13 +513,6 @@ MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX 0x140 >; }; - pinctrl_uart3: uart3grp { - fsl,pins = < - MX8MP_IOMUXC_UART3_RXD__UART3_DCE_RX 0x140 - MX8MP_IOMUXC_UART3_TXD__UART3_DCE_TX 0x140 - >; - }; - pinctrl_usdhc1: usdhc1grp { fsl,pins = < MX8MP_IOMUXC_SD1_CLK__USDHC1_CLK 0x190
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 63/507 arm64: dts: imx8mp-venice-gw702x: remove off-board sdhc1
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Harvey <[email protected]>
[ Upstream commit 9db04b310ef99b546e4240c55842e81b06b78579 ]
SDHC1 on the GW702x SOM routes to a connector for use on a baseboard and as such are defined in the baseboard device-trees.
Remove it from the gw702x SOM device-tree.
--- .../dts/freescale/imx8mp-venice-gw702x.dtsi | 20 ------------------- .../dts/freescale/imx8mp-venice-gw72xx.dtsi | 11 ---------- 2 files changed, 31 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-venice-gw702x.dtsi +0 -20
@@ -402,15 +402,6 @@ &uart2 { status = "okay"; }; -/* off-board */ -&usdhc1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usdhc1>; - bus-width = <4>; - non-removable; - status = "okay"; -}; - /* eMMC */ &usdhc3 { pinctrl-names = "default", "state_100mhz", "state_200mhz";
@@ -513,17 +504,6 @@ MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX 0x140 >; }; - pinctrl_usdhc1: usdhc1grp { - fsl,pins = < - MX8MP_IOMUXC_SD1_CLK__USDHC1_CLK 0x190 - MX8MP_IOMUXC_SD1_CMD__USDHC1_CMD 0x1d0 - MX8MP_IOMUXC_SD1_DATA0__USDHC1_DATA0 0x1d0 - MX8MP_IOMUXC_SD1_DATA1__USDHC1_DATA1 0x1d0 - MX8MP_IOMUXC_SD1_DATA2__USDHC1_DATA2 0x1d0 - MX8MP_IOMUXC_SD1_DATA3__USDHC1_DATA3 0x1d0 - >; - }; - pinctrl_usdhc3: usdhc3grp { fsl,pins = < MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x190
arch/arm64/boot/dts/freescale/imx8mp-venice-gw72xx.dtsi +0 -11
@@ -365,17 +365,6 @@ MX8MP_IOMUXC_UART4_TXD__UART4_DCE_TX 0x140 >; }; - pinctrl_usdhc1: usdhc1grp { - fsl,pins = < - MX8MP_IOMUXC_SD1_CLK__USDHC1_CLK 0x190 - MX8MP_IOMUXC_SD1_CMD__USDHC1_CMD 0x1d0 - MX8MP_IOMUXC_SD1_DATA0__USDHC1_DATA0 0x1d0 - MX8MP_IOMUXC_SD1_DATA1__USDHC1_DATA1 0x1d0 - MX8MP_IOMUXC_SD1_DATA2__USDHC1_DATA2 0x1d0 - MX8MP_IOMUXC_SD1_DATA3__USDHC1_DATA3 0x1d0 - >; - }; - pinctrl_usdhc2: usdhc2grp { fsl,pins = < MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x190
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 64/507 arm64: dts: imx95-15x15-evk: add fan-supply property for pwm-fan
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joy Zou <[email protected]>
[ Upstream commit 93b2fac5cdaf0d501d04c9a4b0e5024632a6af7c ]
Add fan-supply regulator to pwm-fan node to specify power source.
--- arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts +1 -0
@@ -44,6 +44,7 @@ chosen { fan0: pwm-fan { compatible = "pwm-fan"; + fan-supply = <®_vcc_12v>; #cooling-cells = <2>; cooling-levels = <64 128 192 255>; pwms = <&tpm6 0 4000000 PWM_POLARITY_INVERTED>;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 65/507 perf annotate: Check return value of evsel__get_arch() properly
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tianyou Li <[email protected]>
[ Upstream commit f1204e5846d22fb2fffbd1164eeb19535f306797 ]
Check the error code of evsel__get_arch() in the symbol__annotate(). Previously it checked non-zero value but after the refactoring it does only for negative values.
--- tools/perf/util/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/annotate.c +1 -1
@@ -1020,7 +1020,7 @@ int symbol__annotate(struct map_symbol *ms, struct evsel *evsel,int err, nr; err =evsel__get_arch (evsel, &arch); -if (err <0 ) +if (err)return err;if (parch)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 66/507 arm64: dts: exynos: gs101: fix sysreg_apm reg property
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Griffin <[email protected]>
[ Upstream commit 4348c22a4f15dbef1314f1a353d7f053b24e9ace ]
Both the start address and size are incorrect for the apm_sysreg DT node. Update to match the TRM (rather than how it was defined downstream).
--- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/exynos/google/gs101.dtsi +2 -2
@@ -1401,9 +1401,9 @@ cmu_apm: clock-controller@17400000 { clock-names = "oscclk"; }; - sysreg_apm: syscon@174204e0 { + sysreg_apm: syscon@17420000 { compatible = "google,gs101-apm-sysreg", "syscon"; - reg = <0x174204e0 0x1000>; + reg = <0x17420000 0x10000>; }; pmu_system_controller: system-controller@17460000 {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 67/507 PCI: rcar-gen2: Drop ARM dependency from PCI_RCAR_GEN2
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit d312742f686582e6457070bcfd24bee8acfdf213 ]
Since the reliance on ARM-specific struct pci_sys_data was removed, this driver can be compile-tested on other architectures.
While at it, make the help text a bit more generic, as some members of the R-Car Gen2 family have a different number of internal PCI controllers.
--- drivers/pci/controller/Kconfig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/pci/controller/Kconfig +3 -4
@@ -259,12 +259,11 @@ config PCIE_RCAR_EP config PCI_RCAR_GEN2 bool "Renesas R-Car Gen2 Internal PCI controller" - depends on ARCH_RENESAS || COMPILE_TEST - depends on ARM + depends on (ARCH_RENESAS && ARM) || COMPILE_TEST help Say Y here if you want internal PCI support on R-Car Gen2 SoC. - There are 3 internal PCI controllers available with a single - built-in EHCI/OHCI host controller present on each one. + Each internal PCI controller contains a single built-in EHCI/OHCI + host controller. config PCIE_ROCKCHIP bool
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 68/507 uio: uio_fsl_elbc_gpcm:: Add null pointer check to uio_fsl_elbc_gpcm_probe
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Qiang <[email protected]>
[ Upstream commit d48fb15e6ad142e0577428a8c5028136e10c7b3d ]
devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure.
--- drivers/uio/uio_fsl_elbc_gpcm.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/uio/uio_fsl_elbc_gpcm.c +7 -0
@@ -384,6 +384,11 @@ static int uio_fsl_elbc_gpcm_probe(struct platform_device *pdev)/* set all UIO data */ info->mem[0 ].name =devm_kasprintf (&pdev->dev,GFP_KERNEL ,"%pOFn" , node); +if (!info->mem[0 ].name) { + ret = -ENODEV ; + goto out_err3; + } + info->mem[0 ].addr = res.start; info->mem[0 ].size =resource_size (&res); info->mem[0 ].memtype =UIO_MEM_PHYS ;
@@ -423,6 +428,8 @@ static int uio_fsl_elbc_gpcm_probe(struct platform_device *pdev) out_err2:if (priv->shutdown) priv->shutdown (info, true); + +out_err3:iounmap (info->mem[0 ].internal_addr);return ret; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 69/507 tty: introduce tty_port_tty guard()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Slaby (SUSE) <[email protected]>
[ Upstream commit e8398b8aed50382c21fcec77e80a5314e7c45c25 ]
Having this, guards like these work:
scoped_guard(tty_port_tty, port)
tty_wakeup(scoped_tty());
See e.g. "tty_port: use scoped_guard()" later in this series.
The definitions depend on CONFIG_TTY. It's due to tty_kref_put(). On !CONFIG_TTY, it is an inline and its declaration would conflict. The guards are not needed in that case, of course.
Stable-dep-of: d55f3d2375ce ("tty: serial: imx: Only configure the wake register when device is set as wakeup source")
--- include/linux/tty_port.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
include/linux/tty_port.h +14 -0
@@ -270,4 +270,18 @@ static inline void tty_port_tty_vhangup(struct tty_port *port)__tty_port_tty_hangup (port, false, false); } +#ifdef CONFIG_TTY +void tty_kref_put (struct tty_struct *tty); +__DEFINE_CLASS_IS_CONDITIONAL (tty_port_tty, true); +__DEFINE_UNLOCK_GUARD(tty_port_tty, struct tty_struct, tty_kref_put(_T->lock)); +static inline class_tty_port_tty_t class_tty_port_tty_constructor (struct tty_port *tport) +{ +class_tty_port_tty_t _t = { + .lock =tty_port_tty_get (tport), + }; +return _t; +} +#define scoped_tty () ((struct tty_struct *)(__guard_ptr(tty_port_tty)(&scope))) +#endif +#endif
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 70/507 tty: serial: imx: Only configure the wake register when device is set as wakeup source
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sherry Sun <[email protected]>
[ Upstream commit d55f3d2375ceeb08330d30f1e08196993c0b6583 ]
Currently, the i.MX UART driver enables wake-related registers for all UART devices by default. However, this is unnecessary for devices that are not configured as wakeup sources. To address this, add a device_may_wakeup() check before configuring the UART wake-related registers.
--- drivers/tty/serial/imx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/tty/serial/imx.c +14 -0
@@ -2697,8 +2697,22 @@ static void imx_uart_save_context(struct imx_port *sport)/* called with irq off */ static void imx_uart_enable_wakeup (struct imx_port *sport,bool on) { +struct tty_port *port = &sport->port.state->port; +struct device *tty_dev; +bool may_wake = false;u32 ucr3; + scoped_guard(tty_port_tty, port) { +struct tty_struct *tty =scoped_tty (); + + tty_dev = tty->dev; + may_wake = tty_dev &&device_may_wakeup (tty_dev); + } + +/* only configure the wake register when device set as wakeup source */ +if (!may_wake) +return ; +uart_port_lock_irq (&sport->port); ucr3 =imx_uart_readl (sport,UCR3 );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 71/507 clk: qcom: camcc-sm8550: Specify Titan GDSC power domain as a parent to other
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vladimir Zapolskiy <[email protected]>
[ Upstream commit d8f1121ebf4036884fc9ab1968f606523dd1c1fe ]
When a consumer turns on/off a power domain dependent on another power domain in hardware, the parent power domain shall be turned on/off by the power domain provider as well, and to get it the power domain hardware hierarchy shall be described in the CAMCC driver.
Establish the power domain hierarchy with a Titan GDSC set as a parent of all other GDSC power domains provided by the SM8550 camera clock controller to enforce a correct sequence of enabling and disabling power domains by the consumers, this fixes the CAMCC as a supplier of power domains to CAMSS IP and its driver.
--- drivers/clk/qcom/camcc-sm8550.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/clk/qcom/camcc-sm8550.c +10 -0
@@ -3204,6 +3204,8 @@ static struct clk_branch cam_cc_sfe_1_fast_ahb_clk = { }, }; +static struct gdsc cam_cc_titan_top_gdsc; +static struct gdsc cam_cc_bps_gdsc = { .gdscr =0x10004 , .en_rest_wait_val =0x2 ,
@@ -3213,6 +3215,7 @@ static struct gdsc cam_cc_bps_gdsc = { .name = "cam_cc_bps_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3225,6 +3228,7 @@ static struct gdsc cam_cc_ife_0_gdsc = { .name = "cam_cc_ife_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3237,6 +3241,7 @@ static struct gdsc cam_cc_ife_1_gdsc = { .name = "cam_cc_ife_1_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3249,6 +3254,7 @@ static struct gdsc cam_cc_ife_2_gdsc = { .name = "cam_cc_ife_2_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3261,6 +3267,7 @@ static struct gdsc cam_cc_ipe_0_gdsc = { .name = "cam_cc_ipe_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3273,6 +3280,7 @@ static struct gdsc cam_cc_sbi_gdsc = { .name = "cam_cc_sbi_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3285,6 +3293,7 @@ static struct gdsc cam_cc_sfe_0_gdsc = { .name = "cam_cc_sfe_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3297,6 +3306,7 @@ static struct gdsc cam_cc_sfe_1_gdsc = { .name = "cam_cc_sfe_1_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 72/507 clk: qcom: camcc-sm6350: Specify Titan GDSC power domain as a parent to other
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vladimir Zapolskiy <[email protected]>
[ Upstream commit a76ce61d7225934b0a52c8172a8cd944002a8c6f ]
When a consumer turns on/off a power domain dependent on another power domain in hardware, the parent power domain shall be turned on/off by the power domain provider as well, and to get it the power domain hardware hierarchy shall be described in the CAMCC driver.
Establish the power domain hierarchy with a Titan GDSC set as a parent of all other GDSC power domains provided by the SM6350 camera clock controller to enforce a correct sequence of enabling and disabling power domains by the consumers, this fixes the CAMCC as a supplier of power domains to CAMSS IP and its driver.
--- drivers/clk/qcom/camcc-sm6350.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/clk/qcom/camcc-sm6350.c +7 -0
@@ -1693,6 +1693,8 @@ static struct clk_branch camcc_sys_tmr_clk = { }, }; +static struct gdsc titan_top_gdsc; +static struct gdsc bps_gdsc = { .gdscr =0x6004 , .en_rest_wait_val =0x2 ,
@@ -1702,6 +1704,7 @@ static struct gdsc bps_gdsc = { .name = "bps_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, .flags = VOTABLE, };
@@ -1714,6 +1717,7 @@ static struct gdsc ipe_0_gdsc = { .name = "ipe_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, .flags = VOTABLE, };
@@ -1726,6 +1730,7 @@ static struct gdsc ife_0_gdsc = { .name = "ife_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, }; static struct gdsc ife_1_gdsc = {
@@ -1737,6 +1742,7 @@ static struct gdsc ife_1_gdsc = { .name = "ife_1_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, }; static struct gdsc ife_2_gdsc = {
@@ -1748,6 +1754,7 @@ static struct gdsc ife_2_gdsc = { .name = "ife_2_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, }; static struct gdsc titan_top_gdsc = {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 73/507 clk: qcom: rpmh: Define RPMH_IPA_CLK on QCS615
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 17e4db05930e455770b15b77708a07681ed24efc ]
This was previously (mis)represented in the interconnect driver, move the resource under the clk-rpmh driver control, just like we did for all platforms in the past, see e.g. Commit aa055bf158cd ("clk: qcom:
rpmh: define IPA clocks where required")
--- drivers/clk/qcom/clk-rpmh.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/qcom/clk-rpmh.c +1 -0
@@ -850,6 +850,7 @@ static struct clk_hw *qcs615_rpmh_clocks[] = { [RPMH_RF_CLK1_A] = &clk_rpmh_rf_clk1_a_ao.hw, [RPMH_RF_CLK2] = &clk_rpmh_rf_clk2_a.hw, [RPMH_RF_CLK2_A] = &clk_rpmh_rf_clk2_a_ao.hw, + [RPMH_IPA_CLK] = &clk_rpmh_ipa.hw, };static const struct clk_rpmh_desc clk_rpmh_qcs615 = {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 74/507 clk: qcom: gcc-sm8750: Add a new frequency for sdcc2 clock
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Taniya Das <[email protected]>
[ Upstream commit 393f7834cd2b1eaf4a9eff2701e706e73e660dd7 ]
The SD card support requires a 37.5MHz clock; add it to the frequency list for the storage SW driver to be able to request for the frequency.
--- drivers/clk/qcom/gcc-sm8750.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/qcom/gcc-sm8750.c +1 -0
@@ -1012,6 +1012,7 @@ static struct clk_rcg2 gcc_qupv3_wrap2_s7_clk_src = {static const struct freq_tbl ftbl_gcc_sdcc2_apps_clk_src[] = {F (400000 ,P_BI_TCXO ,12 ,1 ,4 ),F (25000000 ,P_GCC_GPLL0_OUT_EVEN ,12 ,0 ,0 ), +F (37500000 ,P_GCC_GPLL0_OUT_EVEN ,8 ,0 ,0 ),F (50000000 ,P_GCC_GPLL0_OUT_EVEN ,6 ,0 ,0 ),F (100000000 ,P_GCC_GPLL0_OUT_EVEN ,3 ,0 ,0 ),F (202000000 ,P_GCC_GPLL9_OUT_MAIN ,4 ,0 ,0 ),
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 75/507 clk: qcom: gcc-ipq5424: Correct the icc_first_node_id
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luo Jie <[email protected]>
[ Upstream commit 464ce94531f5a62ce29081a9d3c70eb4d525f443 ]
Update to use the expected icc_first_node_id for registering the icc clocks, ensuring correct association of clocks with interconnect nodes.
--- drivers/clk/qcom/gcc-ipq5424.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/qcom/gcc-ipq5424.c +2 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2018,2020 The Linux Foundation. All rights reserved. -* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/clk-provider.h>
@@ -3284,6 +3284,7 @@ static const struct qcom_cc_desc gcc_ipq5424_desc = { .num_clk_hws = ARRAY_SIZE(gcc_ipq5424_hws), .icc_hws = icc_ipq5424_hws, .num_icc_hws = ARRAY_SIZE(icc_ipq5424_hws), + .icc_first_node_id = IPQ_APPS_ID, };static int gcc_ipq5424_probe (struct platform_device *pdev)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 76/507 clk: qcom: camcc-sm6350: Fix PLL config of PLL2
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit ab0e13141d679fdffdd3463a272c5c1b10be1794 ]
The 'Agera' PLLs (with clk_agera_pll_configure) do not take some of the parameters that are provided in the vendor driver. Instead the upstream configuration should provide the final user_ctl value that is written to the USER_CTL register.
Fix the config so that the PLL is configured correctly, and fixes CAMCC_MCLK* being stuck off.
--- drivers/clk/qcom/camcc-sm6350.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/clk/qcom/camcc-sm6350.c +1 -5
@@ -145,15 +145,11 @@ static struct clk_alpha_pll_postdiv camcc_pll1_out_even = {static const struct alpha_pll_config camcc_pll2_config = { .l =0x64 , .alpha =0x0 , - .post_div_val =0x3 <<8 , - .post_div_mask =0x3 <<8 , - .aux_output_mask =BIT (1 ), - .main_output_mask =BIT (0 ), - .early_output_mask =BIT (3 ), .config_ctl_val =0x20000800 , .config_ctl_hi_val =0x400003d2 , .test_ctl_val =0x04000400 , .test_ctl_hi_val =0x00004000 , + .user_ctl_val =0x0000030b , };static struct clk_alpha_pll camcc_pll2 = {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 77/507 clk: qcom: camcc-sm7150: Fix PLL config of PLL2
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 415aad75c7e5cdb72e0672dc1159be1a99535ecd ]
The 'Agera' PLLs (with clk_agera_pll_configure) do not take some of the parameters that are provided in the vendor driver. Instead the upstream configuration should provide the final user_ctl value that is written to the USER_CTL register.
Fix the config so that the PLL is configured correctly.
--- drivers/clk/qcom/camcc-sm7150.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/clk/qcom/camcc-sm7150.c +1 -5
@@ -139,13 +139,9 @@ static struct clk_fixed_factor camcc_pll1_out_even = {/* 1920MHz configuration */ static const struct alpha_pll_config camcc_pll2_config = { .l =0x64 , - .post_div_val =0x3 <<8 , - .post_div_mask =0x3 <<8 , - .early_output_mask =BIT (3 ), - .aux_output_mask =BIT (1 ), - .main_output_mask =BIT (0 ), .config_ctl_hi_val =0x400003d6 , .config_ctl_val =0x20000954 , + .user_ctl_val =0x0000030b , };static struct clk_alpha_pll camcc_pll2 = {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 78/507 soc: qcom: gsbi: fix double disable caused by devm
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haotian Zhang <[email protected]>
[ Upstream commit 2286e18e3937c69cc103308a8c1d4898d8a7b04f ]
In the commit referenced by the Fixes tag, devm_clk_get_enabled() was introduced to replace devm_clk_get() and clk_prepare_enable(). While the clk_disable_unprepare() call in the error path was correctly removed, the one in the remove function was overlooked, leading to a double disable issue.
Remove the redundant clk_disable_unprepare() call from gsbi_remove() to fix this issue. Since all resources are now managed by devres and will be automatically released, the remove function serves no purpose and can be deleted entirely.
--- drivers/soc/qcom/qcom_gsbi.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/soc/qcom/qcom_gsbi.c +0 -8
@@ -212,13 +212,6 @@ static int gsbi_probe(struct platform_device *pdev)return of_platform_populate (node,NULL ,NULL , &pdev->dev); } -static void gsbi_remove (struct platform_device *pdev) -{ -struct gsbi_info *gsbi =platform_get_drvdata (pdev); - -clk_disable_unprepare (gsbi->hclk); -} -static const struct of_device_id gsbi_dt_match[] = { { .compatible ="qcom,gsbi-v1.0.0" , }, { },
@@ -232,7 +225,6 @@ static struct platform_driver gsbi_driver = { .of_match_table = gsbi_dt_match, }, .probe = gsbi_probe, - .remove = gsbi_remove, };module_platform_driver (gsbi_driver);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 79/507 crypto: asymmetric_keys - prevent overflow in asymmetric_key_generate_id
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thorsten Blum <[email protected]>
[ Upstream commit df0845cf447ae1556c3440b8b155de0926cbaa56 ]
Use check_add_overflow() to guard against potential integer overflows when adding the binary blob lengths and the size of an asymmetric_key_id structure and return ERR_PTR(-EOVERFLOW) accordingly. This prevents a possible buffer overflow when copying data from potentially malicious X.509 certificate fields that can be arbitrarily large, such as ASN.1 INTEGER serial numbers, issuer names, etc.
--- crypto/asymmetric_keys/asymmetric_type.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
crypto/asymmetric_keys/asymmetric_type.c +10 -4
@@ -11,6 +11,7 @@#include <crypto/public_key.h> #include <linux/seq_file.h> #include <linux/module.h> +#include <linux/overflow.h> #include <linux/slab.h> #include <linux/ctype.h> #include <keys/system_keyring.h>
@@ -141,12 +142,17 @@ struct asymmetric_key_id *asymmetric_key_generate_id(const void *val_1, size_t len_2) {struct asymmetric_key_id *kid; - - kid =kmalloc (sizeof (struct asymmetric_key_id ) + len_1 + len_2, -GFP_KERNEL ); +size_t kid_sz; +size_t len; + +if (check_add_overflow (len_1, len_2, &len)) +return ERR_PTR (-EOVERFLOW ); +if (check_add_overflow (sizeof (struct asymmetric_key_id ), len, &kid_sz)) +return ERR_PTR (-EOVERFLOW ); + kid =kmalloc (kid_sz,GFP_KERNEL );if (!kid)return ERR_PTR (-ENOMEM ); - kid->len = len_1 + len_2; + kid->len = len;memcpy (kid->data, val_1, len_1);memcpy (kid->data + len_1, val_2, len_2);return kid;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 80/507 crypto: hisilicon/qm - restore original qos values
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: nieweiqiang <[email protected]>
[ Upstream commit e7066160f5b4187ad9869b712fa7a35d3d5be6b9 ]
When the new qos valus setting fails, restore to the original qos values.
--- drivers/crypto/hisilicon/qm.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/crypto/hisilicon/qm.c +13 -1
@@ -3664,6 +3664,7 @@ static void qm_clear_vft_config(struct hisi_qm *qm)static int qm_func_shaper_enable (struct hisi_qm *qm,u32 fun_index,u32 qos) {struct device *dev = &qm->pdev->dev; +struct qm_shaper_factor t_factor;u32 ir = qos *QM_QOS_RATE ;int ret, total_vfs, i;
@@ -3671,6 +3672,7 @@ static int qm_func_shaper_enable(struct hisi_qm *qm, u32 fun_index, u32 qos)if (fun_index > total_vfs)return -EINVAL ; +memcpy (&t_factor, &qm->factor[fun_index],sizeof (t_factor)); qm->factor[fun_index].func_qos = qos; ret =qm_get_shaper_para (ir, &qm->factor[fun_index]);
@@ -3684,11 +3686,21 @@ static int qm_func_shaper_enable(struct hisi_qm *qm, u32 fun_index, u32 qos) ret =qm_set_vft_common (qm,SHAPER_VFT , fun_index, i,1 );if (ret) {dev_err (dev,"type: %d, failed to set shaper vft!\n" , i); -return -EINVAL ; + goto back_func_qos; } }return 0 ; + +back_func_qos: +memcpy (&qm->factor[fun_index], &t_factor,sizeof (t_factor)); +for (i--; i >=ALG_TYPE_0 ; i--) { + ret =qm_set_vft_common (qm,SHAPER_VFT , fun_index, i,1 ); +if (ret) +dev_err (dev,"failed to restore shaper vft during rollback!\n" ); + } + +return -EINVAL ; }static u32 qm_get_shaper_vft_qos (struct hisi_qm *qm,u32 fun_index)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 81/507 wifi: ath11k: fix VHT MCS assignment
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit 47d0cd6bccb4604192633cc8d29511e85d811fc0 ]
While associating, firmware needs to know peer's receive capability to calculate its own VHT transmit MCS, currently host sends this information to firmware via mcs->rx_mcs_set field, this is wrong as firmware actually takes it from mcs->tx_mcs_set field. Till now there is no failure seen due to this, most likely because almost all peers are advertising the same capability for both transmit and receive. Swap the assignment to fix it.
Besides, rate control mask is meant to limit our own transmit MCS, hence need to go via mcs->tx_mcs_set field. With the aforementioned swapping done, change is needed as well to apply it to the peer's receive capability rather than transmit capability.
Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/mac.c | 4 ++-- drivers/net/wireless/ath/ath11k/wmi.c | 13 ++++++++----- drivers/net/wireless/ath/ath11k/wmi.h | 2 ++ 3 files changed, 12 insertions(+), 7 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +2 -2
@@ -2235,9 +2235,9 @@ static void ath11k_peer_assoc_h_vht(struct ath11k *ar, arg->peer_nss =min (sta->deflink.rx_nss, max_nss); arg->rx_max_rate =__le16_to_cpu (vht_cap->vht_mcs.rx_highest); arg->rx_mcs_set =__le16_to_cpu (vht_cap->vht_mcs.rx_mcs_map); + arg->rx_mcs_set =ath11k_peer_assoc_h_vht_limit (arg->rx_mcs_set, vht_mcs_mask); arg->tx_max_rate =__le16_to_cpu (vht_cap->vht_mcs.tx_highest); - arg->tx_mcs_set =ath11k_peer_assoc_h_vht_limit ( -__le16_to_cpu (vht_cap->vht_mcs.tx_mcs_map), vht_mcs_mask); + arg->tx_mcs_set =__le16_to_cpu (vht_cap->vht_mcs.tx_mcs_map);/* In IPQ8074 platform, VHT mcs rate 10 and 11 is enabled by default. * VHT mcs rate 10 and 11 is not supported in 11ac standard.
drivers/net/wireless/ath/ath11k/wmi.c +8 -5
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/skbuff.h> #include <linux/ctype.h>
@@ -2061,10 +2061,13 @@ int ath11k_wmi_send_peer_assoc_cmd(struct ath11k *ar, cmd->peer_bw_rxnss_override |= param->peer_bw_rxnss_override;if (param->vht_capable) { - mcs->rx_max_rate = param->rx_max_rate; - mcs->rx_mcs_set = param->rx_mcs_set; - mcs->tx_max_rate = param->tx_max_rate; - mcs->tx_mcs_set = param->tx_mcs_set; +/* firmware interprets mcs->tx_mcs_set field as peer's +* RX capability +*/ + mcs->tx_max_rate = param->rx_max_rate; + mcs->tx_mcs_set = param->rx_mcs_set; + mcs->rx_max_rate = param->tx_max_rate; + mcs->rx_mcs_set = param->tx_mcs_set; }/* HE Rates */
drivers/net/wireless/ath/ath11k/wmi.h +2 -0
@@ -4133,8 +4133,10 @@ struct wmi_rate_set {struct wmi_vht_rate_set {u32 tlv_header;u32 rx_max_rate; +/* MCS at which the peer can transmit */ u32 rx_mcs_set;u32 tx_max_rate; +/* MCS at which the peer can receive */ u32 tx_mcs_set;u32 tx_max_mcs_nss; } __packed;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 82/507 wifi: ath11k: fix peer HE MCS assignment
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit 4a013ca2d490c73c40588d62712ffaa432046a04 ]
In ath11k_wmi_send_peer_assoc_cmd(), peer's transmit MCS is sent to firmware as receive MCS while peer's receive MCS sent as transmit MCS, which goes against firmwire's definition.
While connecting to a misbehaved AP that advertises 0xffff (meaning not supported) for 160 MHz transmit MCS map, firmware crashes due to 0xffff is assigned to he_mcs->rx_mcs_set field.
Ext Tag: HE Capabilities [...] Supported HE-MCS and NSS Set [...] Rx and Tx MCS Maps 160 MHz [...] Tx HE-MCS Map 160 MHz: 0xffff
Swap the assignment to fix this issue.
As the HE rate control mask is meant to limit our own transmit MCS, it needs to go via he_mcs->rx_mcs_set field. With the aforementioned swapping done, change is needed as well to apply it to the peer's receive MCS.
Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/mac.c | 4 ++-- drivers/net/wireless/ath/ath11k/wmi.c | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +2 -2
@@ -2522,10 +2522,10 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar, he_tx_mcs = v; } v =le16_to_cpu (he_cap->he_mcs_nss_supp.rx_mcs_160); + v =ath11k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160 ] = v; v =le16_to_cpu (he_cap->he_mcs_nss_supp.tx_mcs_160); - v =ath11k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160 ] = v; arg->peer_he_mcs_count++;
@@ -2535,10 +2535,10 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,default : v =le16_to_cpu (he_cap->he_mcs_nss_supp.rx_mcs_80); + v =ath11k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80 ] = v; v =le16_to_cpu (he_cap->he_mcs_nss_supp.tx_mcs_80); - v =ath11k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80 ] = v; arg->peer_he_mcs_count++;
drivers/net/wireless/ath/ath11k/wmi.c +5 -2
@@ -2091,8 +2091,11 @@ int ath11k_wmi_send_peer_assoc_cmd(struct ath11k *ar,FIELD_PREP (WMI_TLV_LEN ,sizeof (*he_mcs) -TLV_HDR_SIZE ); - he_mcs->rx_mcs_set = param->peer_he_tx_mcs_set[i]; - he_mcs->tx_mcs_set = param->peer_he_rx_mcs_set[i]; +/* firmware interprets mcs->rx_mcs_set field as peer's +* RX capability +*/ + he_mcs->rx_mcs_set = param->peer_he_rx_mcs_set[i]; + he_mcs->tx_mcs_set = param->peer_he_tx_mcs_set[i]; ptr +=sizeof (*he_mcs); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 83/507 s390/smp: Fix fallback CPU detection
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <[email protected]>
[ Upstream commit 07a75d08cfa1b883a6e1256666e5f0617ee99231 ]
In case SCLP CPU detection does not work a fallback mechanism using SIGP is in place. Since a cleanup this does not work correctly anymore: new CPUs are only considered if their type matches the boot CPU.
Before the cleanup the information if a CPU type should be considered was also part of a structure generated by the fallback mechanism and indicated that a CPU type should not be considered when adding CPUs.
Since the rework a global SCLP state is used instead. If the global SCLP state indicates that the CPU type should be considered and the fallback mechanism is used, there may be a mismatch with CPU types if CPUs are added. This can lead to a system with only a single CPU even tough there are many more CPUs.
Address this by simply copying the boot cpu type into the generated data structure from the fallback mechanism.
--- arch/s390/kernel/smp.c | 1 + 1 file changed, 1 insertion(+)
arch/s390/kernel/smp.c +1 -0
@@ -697,6 +697,7 @@ static void __ref smp_get_core_info(struct sclp_core_info *info, int early)continue ; info->core[info->configured].core_id = address >> smp_cpu_mt_shift; + info->core[info->configured].type = boot_core_type; info->configured++; } info->combined = info->configured;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 84/507 scsi: ufs: core: Move the ufshcd_enable_intr() declaration
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit b30006b5bec1dcba207bc42e7f7cd96a568acc27 ]
ufshcd_enable_intr() is not exported and hence should not be declared in include/ufs/ufshcd.h.
--- drivers/ufs/core/ufshcd-priv.h | 2 ++ include/ufs/ufshcd.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/ufs/core/ufshcd-priv.h +2 -0
@@ -6,6 +6,8 @@#include <linux/pm_runtime.h> #include <ufs/ufshcd.h> +void ufshcd_enable_intr (struct ufs_hba *hba,u32 intrs); +static inline bool ufshcd_is_user_access_allowed (struct ufs_hba *hba) {return !hba->shutting_down;
include/ufs/ufshcd.h +0 -1
@@ -1328,7 +1328,6 @@ static inline void ufshcd_rmwl(struct ufs_hba *hba, u32 mask, u32 val, u32 reg)void ufshcd_enable_irq (struct ufs_hba *hba);void ufshcd_disable_irq (struct ufs_hba *hba); -void ufshcd_enable_intr (struct ufs_hba *hba,u32 intrs);int ufshcd_alloc_host (struct device *,struct ufs_hba **);int ufshcd_hba_enable (struct ufs_hba *hba);int ufshcd_init (struct ufs_hba *,void __iomem *,unsigned int );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 85/507 s390/ap: Dont leak debug feature files if AP instructions are not available
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <[email protected]>
[ Upstream commit 020d5dc57874e58d3ebae398f3fe258f029e3d06 ]
If no AP instructions are available the AP bus module leaks registered debug feature files. Change function call order to fix this.
--- drivers/s390/crypto/ap_bus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/s390/crypto/ap_bus.c +4 -4
@@ -2484,15 +2484,15 @@ static int __init ap_module_init(void) {int rc; - rc =ap_debug_init (); -if (rc) -return rc; -if (!ap_instructions_available ()) {pr_warn ("The hardware system does not support AP instructions\n" );return -ENODEV ; } + rc =ap_debug_init (); +if (rc) +return rc; +/* init ap_queue hashtable */ hash_init (ap_queues);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 86/507 tools/power turbostat: Regression fix Uncore MHz printed in hex
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Len Brown <[email protected]>
[ Upstream commit 92664f2e6ab2228a3330734fc72dabeaf8a49ee1 ]
A patch to allow specifying FORMAT_AVERAGE to added counters... broke the internally added counter for Cluster Uncore MHz -- printing it in HEX.
--- tools/power/x86/turbostat/turbostat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
tools/power/x86/turbostat/turbostat.c +6 -6
@@ -3285,13 +3285,13 @@ int format_counters(PER_THREAD_PARAMS)/* Added counters */ for (i =0 , mp = sys.tp; mp; i++, mp = mp->next) { -if (mp->format ==FORMAT_RAW || mp->format ==FORMAT_AVERAGE ) { +if (mp->format ==FORMAT_RAW ) {if (mp->width ==32 ) outp +=sprintf (outp,"%s0x%08x" , (printed++ ? delim :"" ), (unsigned int )t->counter[i]);else outp +=sprintf (outp,"%s0x%016llx" , (printed++ ? delim :"" ), t->counter[i]); - }else if (mp->format ==FORMAT_DELTA ) { + }else if (mp->format ==FORMAT_DELTA || mp->format ==FORMAT_AVERAGE ) {if ((mp->type ==COUNTER_ITEMS ) && sums_need_wide_columns) outp +=sprintf (outp,"%s%8lld" , (printed++ ? delim :"" ), t->counter[i]);else
@@ -3382,13 +3382,13 @@ int format_counters(PER_THREAD_PARAMS) outp +=sprintf (outp,"%s%lld" , (printed++ ? delim :"" ), c->core_throt_cnt);for (i =0 , mp = sys.cp; mp; i++, mp = mp->next) { -if (mp->format ==FORMAT_RAW || mp->format ==FORMAT_AVERAGE ) { +if (mp->format ==FORMAT_RAW ) {if (mp->width ==32 ) outp +=sprintf (outp,"%s0x%08x" , (printed++ ? delim :"" ), (unsigned int )c->counter[i]);else outp +=sprintf (outp,"%s0x%016llx" , (printed++ ? delim :"" ), c->counter[i]); - }else if (mp->format ==FORMAT_DELTA ) { + }else if (mp->format ==FORMAT_DELTA || mp->format ==FORMAT_AVERAGE ) {if ((mp->type ==COUNTER_ITEMS ) && sums_need_wide_columns) outp +=sprintf (outp,"%s%8lld" , (printed++ ? delim :"" ), c->counter[i]);else
@@ -3581,7 +3581,7 @@ int format_counters(PER_THREAD_PARAMS) outp +=sprintf (outp,"%s%d" , (printed++ ? delim :"" ), p->uncore_mhz);for (i =0 , mp = sys.pp; mp; i++, mp = mp->next) { -if (mp->format ==FORMAT_RAW || mp->format ==FORMAT_AVERAGE ) { +if (mp->format ==FORMAT_RAW ) {if (mp->width ==32 ) outp +=sprintf (outp,"%s0x%08x" , (printed++ ? delim :"" ), (unsigned int )p->counter[i]);
@@ -3758,7 +3758,7 @@ int delta_package(struct pkg_data *new, struct pkg_data *old) new->rapl_dram_perf_status.raw_value - old->rapl_dram_perf_status.raw_value;for (i =0 , mp = sys.pp; mp; i++, mp = mp->next) { -if (mp->format ==FORMAT_RAW || mp->format ==FORMAT_AVERAGE ) +if (mp->format ==FORMAT_RAW ) old->counter[i] = new->counter[i];else if (mp->format ==FORMAT_AVERAGE ) old->counter[i] = new->counter[i];
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 87/507 wifi: ath12k: restore register window after global reset
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit a41281f6518e485220d180a6031d302a736fc463 ]
Hardware target implements an address space larger than that PCI BAR can map. In order to be able to access the whole target address space, the BAR space is split into 4 segments, of which the last 3, called windows, can be dynamically mapped to the desired area. This is achieved by updating WINDOW_REG_ADDRESS register with appropriate window value. Currently each time when accessing a register that beyond WINDOW_START, host calculates the window value and caches it after window update, this way next time when accessing a register falling in the same window, host knows that the window is already good hence no additional update needed.
However this mechanism breaks after global reset is triggered in ath12k_pci_soc_global_reset(), because with global reset hardware resets WINDOW_REG_ADDRESS register hence the window is not properly mapped any more. Current host does nothing about this, as a result a subsequent register access may not work as expected if it falls in a window same as before.
Although there is no obvious issue seen now, better to fix it to avoid future problem. The fix is done by restoring the window register after global reset.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284.1-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
--- drivers/net/wireless/ath/ath12k/pci.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath12k/pci.c +19 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/module.h>
@@ -218,6 +218,19 @@ static inline bool ath12k_pci_is_offset_within_mhi_region(u32 offset)return (offset >=PCI_MHIREGLEN_REG && offset <=PCI_MHI_REGION_END ); } +static void ath12k_pci_restore_window (struct ath12k_base *ab) +{ +struct ath12k_pci *ab_pci =ath12k_pci_priv (ab); + +spin_lock_bh (&ab_pci->window_lock); + +iowrite32 (WINDOW_ENABLE_BIT | ab_pci->register_window, + ab->mem +WINDOW_REG_ADDRESS ); +ioread32 (ab->mem +WINDOW_REG_ADDRESS ); + +spin_unlock_bh (&ab_pci->window_lock); +} +static void ath12k_pci_soc_global_reset (struct ath12k_base *ab) {u32 val, delay;
@@ -242,6 +255,11 @@ static void ath12k_pci_soc_global_reset(struct ath12k_base *ab) val =ath12k_pci_read32 (ab,PCIE_SOC_GLOBAL_RESET );if (val ==0xffffffff )ath12k_warn (ab,"link down error during global reset\n" ); + +/* Restore window register as its content is cleared during +* hardware global reset, such that it aligns with host cache. +*/ +ath12k_pci_restore_window (ab); }static void ath12k_pci_clear_dbg_registers (struct ath12k_base *ab)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 88/507 leds: upboard: Fix module alias
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Richard <[email protected]>
[ Upstream commit c06a017439110debd335b6864bc2d69835624235 ]
The module alias does not match the cell name defined in the MFD driver, preventing automatic loading when the driver is built as a module. So fix the module alias to ensure proper module auto-loading.
--- drivers/leds/leds-upboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-upboard.c +1 -1
@@ -123,4 +123,4 @@ MODULE_AUTHOR("Gary Wang <[email protected]>");MODULE_AUTHOR ("Thomas Richard <[email protected]>" );MODULE_DESCRIPTION ("UP Board LED driver" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:upboard-led" ); +MODULE_ALIAS ("platform:upboard-leds" );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 89/507 PCI: endpoint: pci-epf-test: Fix sleeping function being called from atomic context
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bhanu Seshu Kumar Valluri <[email protected]>
[ Upstream commit 25423cda145f9ed6ee4a72d9f2603ac2a4685e74 ]
When Root Complex (RC) triggers a Doorbell interrupt to Endpoint (EP), it triggers the below warning in the EP:
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:271 Call trace: __might_resched+0x130/0x158 __might_sleep+0x70/0x88 mutex_lock+0x2c/0x80 pci_epc_get_msi+0x78/0xd8 pci_epf_test_raise_irq.isra.0+0x74/0x138 pci_epf_test_doorbell_handler+0x34/0x50
The BUG arises because the EP's pci_epf_test_doorbell_handler() which is running in the hard IRQ context is making an indirect call to pci_epc_get_msi(), which uses mutex inside.
To fix the issue, convert the hard IRQ handler to a threaded IRQ handler to allow it to call functions that can sleep during bottom half execution. Also, register the threaded IRQ handler with IRQF_ONESHOT to keep the interrupt line disabled until the threaded IRQ handler completes execution.
--- drivers/pci/endpoint/functions/pci-epf-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pci/endpoint/functions/pci-epf-test.c +3 -2
@@ -730,8 +730,9 @@ static void pci_epf_test_enable_doorbell(struct pci_epf_test *epf_test,if (bar <BAR_0 ) goto err_doorbell_cleanup; - ret =request_irq (epf->db_msg[0 ].virq, pci_epf_test_doorbell_handler,0 , -"pci-ep-test-doorbell" , epf_test); + ret =request_threaded_irq (epf->db_msg[0 ].virq,NULL , + pci_epf_test_doorbell_handler,IRQF_ONESHOT , +"pci-ep-test-doorbell" , epf_test);if (ret) { dev_err(&epf->dev, "Failed to request doorbell IRQ: %d\n",
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 90/507 arm64: dts: ti: k3-am62p: Fix memory ranges for GPU
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randolph Sapp <[email protected]>
[ Upstream commit 76546090b1726118cd6fb3db7159fc2a3fdda8a0 ]
Update the memory region listed in the k3-am62p.dtsi for the BXS-4-64 GPU to match the Main Memory Map described in the TRM [1].
[1] https://www.ti.com/lit/ug/spruj83b/spruj83b.pdf
--- arch/arm64/boot/dts/ti/k3-am62p.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am62p.dtsi +1 -1
@@ -59,7 +59,7 @@ cbass_main: bus@f0000 { <0x00 0x01000000 0x00 0x01000000 0x00 0x01b28400>, /* First peripheral window */ <0x00 0x08000000 0x00 0x08000000 0x00 0x00200000>, /* Main CPSW */ <0x00 0x0e000000 0x00 0x0e000000 0x00 0x01d20000>, /* Second peripheral window */ - <0x00 0x0fd00000 0x00 0x0fd00000 0x00 0x00020000>, /* GPU */ + <0x00 0x0fd80000 0x00 0x0fd80000 0x00 0x00080000>, /* GPU */ <0x00 0x20000000 0x00 0x20000000 0x00 0x0a008000>, /* Third peripheral window */ <0x00 0x30040000 0x00 0x30040000 0x00 0x00080000>, /* PRUSS-M */ <0x00 0x30101000 0x00 0x30101000 0x00 0x00010100>, /* CSI window */
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 91/507 firmware: imx: scu-irq: fix OF node leak in
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <[email protected]>
[ Upstream commit ee67247843a2b62d1473cfa4df300e69b5190ccf ]
imx_scu_enable_general_irq_channel() calls of_parse_phandle_with_args(), but does not release the OF node reference. Add a of_node_put() call to release the reference.
--- drivers/firmware/imx/imx-scu-irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/firmware/imx/imx-scu-irq.c +3 -1
@@ -226,8 +226,10 @@ int imx_scu_enable_general_irq_channel(struct device *dev)INIT_WORK (&imx_sc_irq_work, imx_scu_irq_work_handler);if (!of_parse_phandle_with_args (dev->of_node,"mboxes" , -"#mbox-cells" ,0 , &spec)) +"#mbox-cells" ,0 , &spec)) { i =of_alias_get_id (spec.np,"mu" ); +of_node_put (spec.np); + }/* use mu1 as general mu irq channel if failed */ if (i <0 )
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 92/507 arm64: dts: qcom: x1e80100: Fix compile warnings for USB HS controller
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krishna Kurapati <[email protected]>
[ Upstream commit 0dab10c38282e6ef87ef88efb99d4106cce7ed33 ]
With W=1, the following error comes up:
Warning (graph_child_address): /soc@0/usb@a2f8800/usb@a200000/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
This could be since the controller is only HS capable and only one port node is added.
--- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/qcom/x1e80100.dtsi +2 -9
@@ -4876,15 +4876,8 @@ usb_2_dwc3: usb@a200000 { dma-coherent; - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - - usb_2_dwc3_hs: endpoint { - }; + port { + usb_2_dwc3_hs: endpoint { }; }; };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 93/507 arm64: dts: qcom: x1e80100: Add missing quirk for HS only USB controller
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krishna Kurapati <[email protected]>
[ Upstream commit 6b3e8a5d6c88609d9ce93789524f818cca0aa485 ]
The PIPE clock is provided by the USB3 PHY, which is predictably not connected to the HS-only controller. Add "qcom,select-utmi-as-pipe-clk" quirk to HS only USB controller to disable pipe clock requirement.
--- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/x1e80100.dtsi +1 -0
@@ -4859,6 +4859,7 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, interconnect-names = "usb-ddr", "apps-usb"; + qcom,select-utmi-as-pipe-clk; wakeup-source; status = "disabled";
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 94/507 arm64: dts: qcom: sdm845-starqltechn: remove (address|size)-cells
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dzmitry Sankouski <[email protected]>
[ Upstream commit 4133486382364f60ea7e4f2c9070555689d9606e ]
Drop the unused address/size-cells properties to silence the DT checker warning:
pmic@66 (maxim,max77705): '#address-cells', '#size-cells' do not match any of the regexes: '^pinctrl-[0-9]+$'
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 2 -- 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +0 -2
@@ -591,8 +591,6 @@ pmic@66 { interrupts = <11 IRQ_TYPE_LEVEL_LOW>; pinctrl-0 = <&pmic_int_default>; pinctrl-names = "default"; - #address-cells = <1>; - #size-cells = <0>; leds { compatible = "maxim,max77705-rgb";
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 95/507 arm64: dts: qcom: starqltechn: remove extra empty line
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Gonçalves <[email protected]>
[ Upstream commit 6e71c5812856d67881572159098f701184c9356a ]
Remove empty white line ine starqltechn device tree at the end of max77705_charger node.
Stable-dep-of: 4372b15d89e2 ("arm64: dts: qcom: sdm845-starqltechn: fix max77705 interrupts")
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +0 -1
@@ -631,7 +631,6 @@ max77705_charger: charger@69 { monitored-battery = <&battery>; interrupt-parent = <&pm8998_gpios>; interrupts = <11 IRQ_TYPE_LEVEL_LOW>; - }; fuel-gauge@36 {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 96/507 arm64: dts: qcom: sdm845-starqltechn: fix max77705 interrupts
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dzmitry Sankouski <[email protected]>
[ Upstream commit 4372b15d89e253e40816f0bde100890cddd25a81 ]
Since max77705 has a register, which indicates interrupt source, it acts as an interrupt controller.
Direct MAX77705's subdevices to use the IC's internal interrupt controller, instead of listening to every interrupt fired by the chip towards the host device.
--- .../boot/dts/qcom/sdm845-samsung-starqltechn.dts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +7 -5
@@ -584,11 +584,13 @@ &uart9 { &i2c14 { status = "okay"; - pmic@66 { + max77705: pmic@66 { compatible = "maxim,max77705"; reg = <0x66>; + #interrupt-cells = <1>; interrupt-parent = <&pm8998_gpios>; interrupts = <11 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; pinctrl-0 = <&pmic_int_default>; pinctrl-names = "default";
@@ -629,8 +631,8 @@ max77705_charger: charger@69 { reg = <0x69>; compatible = "maxim,max77705-charger"; monitored-battery = <&battery>; - interrupt-parent = <&pm8998_gpios>; - interrupts = <11 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&max77705>; + interrupts = <0>; }; fuel-gauge@36 {
@@ -638,8 +640,8 @@ fuel-gauge@36 { compatible = "maxim,max77705-battery"; power-supplies = <&max77705_charger>; maxim,rsns-microohm = <5000>; - interrupt-parent = <&pm8998_gpios>; - interrupts = <11 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&max77705>; + interrupts = <2>; }; };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 97/507 arm64: dts: qcom: sdm845-oneplus: Correct gpio used for slider
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gergo Koteles <[email protected]>
[ Upstream commit d7ec7d34237498fab7a6afed8da4b7139b0e387c ]
The previous GPIO numbers were wrong. Update them to the correct ones and fix the label.
--- arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +2 -2
@@ -799,8 +799,8 @@ hall_sensor_default: hall-sensor-default-state { bias-disable; }; - tri_state_key_default: tri-state-key-default-state { - pins = "gpio40", "gpio42", "gpio26"; + alert_slider_default: alert-slider-default-state { + pins = "gpio126", "gpio52", "gpio24"; function = "gpio"; drive-strength = <2>; bias-disable;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 98/507 arm64: dts: qcom: qcm6490-fairphone-fp5: Add supplies to simple-fb node
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 3d4142cac46b4dde4e60908c509c4cf107067114 ]
Add the OLED power supplies to the simple-framebuffer node, so that the regulators don't get turned off while the simple-fb is being used.
--- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts +2 -0
@@ -47,6 +47,8 @@ framebuffer0: framebuffer@a000000 { stride = <(1224 * 4)>; format = "a8r8g8b8"; clocks = <&gcc GCC_DISP_HF_AXI_CLK>; + vci-supply = <&vreg_oled_vci>; + dvdd-supply = <&vreg_oled_dvdd>; }; };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 99/507 arm64: dts: qcom: sm8650: set ufs as dma coherent
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <[email protected]>
[ Upstream commit c2703c90161b45bca5b65f362adbae02ed71fcc1 ]
The UFS device is ovbiously dma coherent like the other IOMMU devices like usb, mmc, ... let's fix this by adding the flag.
To be sure an extensive test has been performed to be sure it's safe, as downstream uses this flag for UFS as well.
As an experiment, I checked how the dma-coherent could impact the UFS bandwidth, and it happens the max bandwidth on cached write is slighly highter (up to 10%) while using less cpu time since cache sync/flush is skipped.
--- arch/arm64/boot/dts/qcom/sm8650.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/sm8650.dtsi +2 -0
@@ -4020,6 +4020,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, iommus = <&apps_smmu 0x60 0>; + dma-coherent; + lanes-per-direction = <2>; qcom,ice = <&ice>;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 100/507 arm64: dts: qcom: qcm6490-shift-otter: Add missing reserved-memory
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Martinz <[email protected]>
[ Upstream commit f404fdcb50021fdad6bc734d69468cc777901a80 ]
It seems we also need to reserve a region of 81 MiB called "removed_mem" otherwise we can easily hit memory errors with higher RAM usage.
--- arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts +5 -0
@@ -118,6 +118,11 @@ cdsp_mem: cdsp@88f00000 { no-map; }; + removed_mem: removed@c0000000 { + reg = <0x0 0xc0000000 0x0 0x5100000>; + no-map; + }; + rmtfs_mem: rmtfs@f8500000 { compatible = "qcom,rmtfs-mem"; reg = <0x0 0xf8500000 0x0 0x600000>;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 101/507 arm64: dts: qcom: sdm845-starqltechn: Fix i2c-gpio node name
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 6030fa06360b8b8d898b66ac156adaaf990b83cb ]
Fix the following DT checker warning:
$nodename:0: 'i2c21' does not match '^i2c(@.+|-[a-z0-9]+)?$'
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +1 -1
@@ -143,7 +143,7 @@ rmtfs_mem: rmtfs-mem@fde00000 { }; }; - i2c21 { + i2c-21 { compatible = "i2c-gpio"; sda-gpios = <&tlmm 127 GPIO_ACTIVE_HIGH>; scl-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 102/507 perf hwmon_pmu: Fix uninitialized variable warning
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Suchanek <[email protected]>
[ Upstream commit 2fee899c068c159e486e62623afe9e2a4975bd79 ]
The line_len is only set on success. Check the return value instead.
util/hwmon_pmu.c: In function ‘perf_pmus__read_hwmon_pmus’:
util/hwmon_pmu.c:742:20: warning: ‘line_len’ may be used uninitialized [-Wmaybe-uninitialized]
742 | if (line_len > 0 && line[line_len - 1] == '\n')
| ^
util/hwmon_pmu.c:719:24: note: ‘line_len’ was declared here
719 | size_t line_len;
--- tools/perf/util/hwmon_pmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tools/perf/util/hwmon_pmu.c +1 -2
@@ -742,8 +742,7 @@ int perf_pmus__read_hwmon_pmus(struct list_head *pmus)continue ; }io__init (&io, name_fd, buf2,sizeof (buf2)); -io__getline (&io, &line, &line_len); -if (line_len >0 && line[line_len -1 ] =='\n' ) +if (io__getline (&io, &line, &line_len) >0 && line[line_len -1 ] =='\n' ) line[line_len -1 ] ='\0' ;hwmon_pmu__new (pmus, buf, class_hwmon_ent->d_name, line);close (name_fd);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 103/507 phy: mscc: Fix PTP for VSC8574 and VSC8572
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Horatiu Vultur <[email protected]>
[ Upstream commit ea5df88aeca112aac69e6c32e3dd1433a113b0c9 ]
The PTP initialization is two-step. First part are the function vsc8584_ptp_probe_once() and vsc8584_ptp_probe() at probe time which initialize the locks, queues, creates the PTP device. The second part is the function vsc8584_ptp_init() at config_init() time which initialize PTP in the HW.
For VSC8574 and VSC8572, the PTP initialization is incomplete. It is missing the first part but it makes the second part. Meaning that the ptp_clock_register() is never called.
There is no crash without the first part when enabling PTP but this is unexpected because some PHys have PTP functionality exposed by the driver and some don't even though they share the same PTP clock PTP.
--- drivers/net/phy/mscc/mscc_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/phy/mscc/mscc_main.c +3 -3
@@ -2625,7 +2625,7 @@ static struct phy_driver vsc85xx_driver[] = { .suspend = &genphy_suspend, .resume = &genphy_resume, .remove = &vsc85xx_remove, - .probe = &vsc8574_probe, + .probe = &vsc8584_probe, .set_wol = &vsc85xx_wol_set, .get_wol = &vsc85xx_wol_get, .get_tunable = &vsc85xx_get_tunable,
@@ -2648,12 +2648,12 @@ static struct phy_driver vsc85xx_driver[] = { .config_aneg = &vsc85xx_config_aneg, .aneg_done = &genphy_aneg_done, .read_status = &vsc85xx_read_status, - .handle_interrupt = vsc85xx_handle_interrupt, + .handle_interrupt = vsc8584_handle_interrupt, .config_intr = &vsc85xx_config_intr, .suspend = &genphy_suspend, .resume = &genphy_resume, .remove = &vsc85xx_remove, - .probe = &vsc8574_probe, + .probe = &vsc8584_probe, .set_wol = &vsc85xx_wol_set, .get_wol = &vsc85xx_wol_get, .get_tunable = &vsc85xx_get_tunable,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 104/507 sctp: Defer SCTP_DBG_OBJCNT_DEC() to sctp_destroy_sock().
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuniyuki Iwashima <[email protected]>
[ Upstream commit 622e8838a29845316668ec2e7648428878df7f9a ]
SCTP_DBG_OBJCNT_INC() is called only when sctp_init_sock() returns 0 after successfully allocating sctp_sk(sk)->ep.
OTOH, SCTP_DBG_OBJCNT_DEC() is called in sctp_close().
The code seems to expect that the socket is always exposed to userspace once SCTP_DBG_OBJCNT_INC() is incremented, but there is a path where the assumption is not true.
In sctp_accept(), sctp_sock_migrate() could fail after sctp_init_sock().
Then, sk_common_release() does not call inet_release() nor sctp_close(). Instead, it calls sk->sk_prot->destroy().
Let's move SCTP_DBG_OBJCNT_DEC() from sctp_close() to sctp_destroy_sock().
--- net/sctp/socket.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/sctp/socket.c +3 -2
@@ -1554,8 +1554,6 @@ static void sctp_close(struct sock *sk, long timeout)spin_unlock_bh (&net->sctp.addr_wq_lock);sock_put (sk); - -SCTP_DBG_OBJCNT_DEC (sock); }/* Handle EPIPE error. */
@@ -5112,9 +5110,12 @@ static void sctp_destroy_sock(struct sock *sk) sp->do_auto_asconf =0 ;list_del (&sp->auto_asconf_list); } +sctp_endpoint_free (sp->ep); +sk_sockets_allocated_dec (sk);sock_prot_inuse_add (sock_net (sk), sk->sk_prot,-1 ); +SCTP_DBG_OBJCNT_DEC (sock); }/* Triggered when there are no references on the socket anymore */
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 105/507 arm64: dts: qcom: qcm2290: Add CCI node
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Loic Poulain <[email protected]>
[ Upstream commit e645096d1f6dadcead09c722a3fbc6c44a45fece ]
Add Camera Control Interface (CCI), supporting two I2C masters.
Stable-dep-of: 67445dc8a806 ("arm64: dts: qcom: qcm2290: Fix camss register prop ordering")
--- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)
arch/arm64/boot/dts/qcom/qcm2290.dtsi +50 -0
@@ -565,6 +565,20 @@ qup_uart4_default: qup-uart4-default-state { bias-disable; }; + cci0_default: cci0-default-state { + pins = "gpio22", "gpio23"; + function = "cci_i2c"; + drive-strength = <2>; + bias-disable; + }; + + cci1_default: cci1-default-state { + pins = "gpio29", "gpio30"; + function = "cci_i2c"; + drive-strength = <2>; + bias-disable; + }; + sdc1_state_on: sdc1-on-state { clk-pins { pins = "sdc1_clk";
@@ -1629,6 +1643,42 @@ adreno_smmu: iommu@59a0000 { #iommu-cells = <2>; }; + cci: cci@5c1b000 { + compatible = "qcom,qcm2290-cci", "qcom,msm8996-cci"; + reg = <0x0 0x5c1b000 0x0 0x1000>; + + interrupts = <GIC_SPI 206 IRQ_TYPE_EDGE_RISING>; + + clocks = <&gcc GCC_CAMSS_TOP_AHB_CLK>, <&gcc GCC_CAMSS_CCI_0_CLK>; + clock-names = "ahb", "cci"; + assigned-clocks = <&gcc GCC_CAMSS_CCI_0_CLK>; + assigned-clock-rates = <37500000>; + + power-domains = <&gcc GCC_CAMSS_TOP_GDSC>; + + pinctrl-0 = <&cci0_default &cci1_default>; + pinctrl-names = "default"; + + #address-cells = <1>; + #size-cells = <0>; + + status = "disabled"; + + cci_i2c0: i2c-bus@0 { + reg = <0>; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + }; + + cci_i2c1: i2c-bus@1 { + reg = <1>; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + camss: camss@5c6e000 { compatible = "qcom,qcm2290-camss";
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 106/507 arm64: dts: qcom: qcm2290: Fix camss register prop ordering
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Loic Poulain <[email protected]>
[ Upstream commit 67445dc8a8060309eeb7aebbc41fa0e58302fc09 ]
The qcm2290 CAMSS node has been applied from the V4 series, but a later version changed the order of the register property, fix it to prevent dtb check error.
--- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/qcm2290.dtsi +5 -5
@@ -1679,25 +1679,25 @@ cci_i2c1: i2c-bus@1 { }; }; - camss: camss@5c6e000 { + camss: camss@5c11000 { compatible = "qcom,qcm2290-camss"; - reg = <0x0 0x5c6e000 0x0 0x1000>, + reg = <0x0 0x5c11000 0x0 0x1000>, + <0x0 0x5c6e000 0x0 0x1000>, <0x0 0x5c75000 0x0 0x1000>, <0x0 0x5c52000 0x0 0x1000>, <0x0 0x5c53000 0x0 0x1000>, <0x0 0x5c66000 0x0 0x400>, <0x0 0x5c68000 0x0 0x400>, - <0x0 0x5c11000 0x0 0x1000>, <0x0 0x5c6f000 0x0 0x4000>, <0x0 0x5c76000 0x0 0x4000>; - reg-names = "csid0", + reg-names = "top", + "csid0", "csid1", "csiphy0", "csiphy1", "csitpg0", "csitpg1", - "top", "vfe0", "vfe1";
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 107/507 RDMA/rxe: Fix null deref on srq->rq.queue after resize failure
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhu Yanjun <[email protected]>
[ Upstream commit 503a5e4690ae14c18570141bc0dcf7501a8419b0 ]
A NULL pointer dereference can occur in rxe_srq_chk_attr() when ibv_modify_srq() is invoked twice in succession under certain error conditions. The first call may fail in rxe_queue_resize(), which leads rxe_srq_from_attr() to set srq->rq.queue = NULL. The second call then triggers a crash (null deref) when accessing srq->rq.queue->buf->index_mask.
Call Trace: <TASK> rxe_modify_srq+0x170/0x480 [rdma_rxe] ? __pfx_rxe_modify_srq+0x10/0x10 [rdma_rxe] ? uverbs_try_lock_object+0x4f/0xa0 [ib_uverbs] ? rdma_lookup_get_uobject+0x1f0/0x380 [ib_uverbs] ib_uverbs_modify_srq+0x204/0x290 [ib_uverbs] ? __pfx_ib_uverbs_modify_srq+0x10/0x10 [ib_uverbs] ? tryinc_node_nr_active+0xe6/0x150 ? uverbs_fill_udata+0xed/0x4f0 [ib_uverbs] ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x2c0/0x470 [ib_uverbs] ? __pfx_ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x10/0x10 [ib_uverbs] ? uverbs_fill_udata+0xed/0x4f0 [ib_uverbs] ib_uverbs_run_method+0x55a/0x6e0 [ib_uverbs] ? __pfx_ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x10/0x10 [ib_uverbs] ib_uverbs_cmd_verbs+0x54d/0x800 [ib_uverbs] ? __pfx_ib_uverbs_cmd_verbs+0x10/0x10 [ib_uverbs] ? __pfx___raw_spin_lock_irqsave+0x10/0x10 ? __pfx_do_vfs_ioctl+0x10/0x10 ? ioctl_has_perm.constprop.0.isra.0+0x2c7/0x4c0 ? __pfx_ioctl_has_perm.constprop.0.isra.0+0x10/0x10 ib_uverbs_ioctl+0x13e/0x220 [ib_uverbs] ? __pfx_ib_uverbs_ioctl+0x10/0x10 [ib_uverbs] __x64_sys_ioctl+0x138/0x1c0 do_syscall_64+0x82/0x250 ? fdget_pos+0x58/0x4c0 ? ksys_write+0xf3/0x1c0 ? __pfx_ksys_write+0x10/0x10 ? do_syscall_64+0xc8/0x250 ? __pfx_vm_mmap_pgoff+0x10/0x10 ? fget+0x173/0x230 ? fput+0x2a/0x80 ? ksys_mmap_pgoff+0x224/0x4c0 ? do_syscall_64+0xc8/0x250 ? do_user_addr_fault+0x37b/0xfe0 ? clear_bhb_loop+0x50/0xa0 ? clear_bhb_loop+0x50/0xa0 ? clear_bhb_loop+0x50/0xa0 entry_SYSCALL_64_after_hwframe+0x76/0x7e
--- drivers/infiniband/sw/rxe/rxe_srq.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/infiniband/sw/rxe/rxe_srq.c +1 -6
@@ -171,7 +171,7 @@ int rxe_srq_from_attr(struct rxe_dev *rxe, struct rxe_srq *srq, udata, mi, &srq->rq.producer_lock, &srq->rq.consumer_lock);if (err) - goto err_free; +return err; srq->rq.max_wr = attr->max_wr; }
@@ -180,11 +180,6 @@ int rxe_srq_from_attr(struct rxe_dev *rxe, struct rxe_srq *srq, srq->limit = attr->srq_limit;return 0 ; - -err_free: -rxe_queue_cleanup (q); - srq->rq.queue =NULL ; -return err; }void rxe_srq_cleanup (struct rxe_pool_elem *elem)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 108/507 ARM: dts: renesas: gose: Remove superfluous port property
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wolfram Sang <[email protected]>
[ Upstream commit 00df14f34615630f92f97c9d6790bd9d25c4242d ]
'bus-width' is defined for the corresponding vin input port already. No need to declare it in the output port again. Fixes:
arch/arm/boot/dts/renesas/r8a7793-gose.dtb: composite-in@20 (adi,adv7180cp): ports:port@3:endpoint: Unevaluated properties are not allowed ('bus-width' was unexpected) from schema $id: http://devicetree.org/schemas/media/i2c/adi,adv7180.yaml#
--- arch/arm/boot/dts/renesas/r8a7793-gose.dts | 1 - 1 file changed, 1 deletion(-)
arch/arm/boot/dts/renesas/r8a7793-gose.dts +0 -1
@@ -373,7 +373,6 @@ adv7180_in: endpoint { port@3 { reg = <3>; adv7180_out: endpoint { - bus-width = <8>; remote-endpoint = <&vin1ep>; }; };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 109/507 ARM: dts: renesas: r9a06g032-rzn1d400-db: Drop invalid #cells properties
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wolfram Sang <[email protected]>
[ Upstream commit ca7fffb6e92a7c93604ea2bae0e1c89b20750937 ]
The 'ethernet-ports' node in the SoC DTSI handles them already. Fixes:
arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dtb: switch@44050000 (renesas,r9a06g032-a5psw): Unevaluated properties are not allowed ('#address-cells', '#size-cells' were unexpected)
from schema $id: http://devicetree.org/schemas/net/dsa/renesas,rzn1-a5psw.yaml#
--- arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts | 2 -- 1 file changed, 2 deletions(-)
arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts +0 -2
@@ -308,8 +308,6 @@ &rtc0 { &switch { status = "okay"; - #address-cells = <1>; - #size-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&pins_eth3>, <&pins_eth4>, <&pins_mdio1>;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 110/507 drm/amdgpu: add userq object va track helpers
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Prike Liang <[email protected]>
[ Upstream commit 5cfa33fabf01f2cc0af6b1feed6e65cb81806a37 ]
Add the userq object virtual address list_add() helpers for tracking the userq obj va address usage.
Stable-dep-of: a0559012a18a ("drm/amdgpu/userq: fix SDMA and compute validation")
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 44 ++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 12 ++++-- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 16 ++++---- 4 files changed, 52 insertions(+), 21 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +1 -0
@@ -96,6 +96,7 @@ struct amdgpu_bo_va {* if non-zero, cannot unmap from GPU because user queues may still access it */ unsigned int queue_refcount; +atomic_t userq_va_mapped; };struct amdgpu_bo {
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +33 -11
82 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h +9 -3
@@ -47,6 +47,11 @@ struct amdgpu_userq_obj {struct amdgpu_bo *obj; }; +struct amdgpu_userq_va_cursor { +u64 gpu_addr; +struct list_head list; +}; +struct amdgpu_usermode_queue {int queue_type;enum amdgpu_userq_state state;
@@ -66,6 +71,8 @@ struct amdgpu_usermode_queue {u32 xcp_id;int priority;struct dentry *debugfs_queue; + +struct list_head userq_va_list; };struct amdgpu_userq_funcs {
@@ -132,7 +139,6 @@ int amdgpu_userq_stop_sched_for_enforce_isolation(struct amdgpu_device *adev, u32 idx);int amdgpu_userq_start_sched_for_enforce_isolation (struct amdgpu_device *adev,u32 idx); - -int amdgpu_userq_input_va_validate (struct amdgpu_vm *vm,u64 addr, -u64 expected_size); +int amdgpu_userq_input_va_validate (struct amdgpu_usermode_queue *queue, +u64 addr,u64 expected_size);#endif
drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +9 -7
@@ -250,8 +250,9 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr, goto free_mqd; } -if (amdgpu_userq_input_va_validate (queue->vm, compute_mqd->eop_va, -max_t (u32,PAGE_SIZE ,AMDGPU_GPU_PAGE_SIZE ))) + r =amdgpu_userq_input_va_validate (queue, compute_mqd->eop_va, +max_t (u32,PAGE_SIZE ,AMDGPU_GPU_PAGE_SIZE )); +if (r) goto free_mqd; userq_props->eop_gpu_addr = compute_mqd->eop_va;
@@ -282,8 +283,9 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr, userq_props->tmz_queue = mqd_user->flags &AMDGPU_USERQ_CREATE_FLAGS_QUEUE_SECURE ; -if (amdgpu_userq_input_va_validate (queue->vm, mqd_gfx_v11->shadow_va, - shadow_info.shadow_size)) + r =amdgpu_userq_input_va_validate (queue, mqd_gfx_v11->shadow_va, + shadow_info.shadow_size); +if (r) goto free_mqd;kfree (mqd_gfx_v11);
@@ -302,9 +304,9 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr, r = -ENOMEM ; goto free_mqd; } - -if (amdgpu_userq_input_va_validate (queue->vm, mqd_sdma_v11->csa_va, - shadow_info.csa_size)) + r =amdgpu_userq_input_va_validate (queue, mqd_sdma_v11->csa_va, + shadow_info.csa_size); +if (r) goto free_mqd; userq_props->csa_addr = mqd_sdma_v11->csa_va;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 111/507 drm/amdgpu/userq: fix SDMA and compute validation
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
[ Upstream commit a0559012a18a5a6ad87516e982892765a403b8ab ]
The CSA and EOP buffers have different alignement requirements. Hardcode them for now as a bug fix. A proper query will be added in a subsequent patch.
v2: verify gfx shadow helper callback (Prike)
--- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/mes_userqueue.c +14 -5
@@ -206,7 +206,6 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr,struct amdgpu_mqd *mqd_hw_default = &adev->mqds[queue->queue_type];struct drm_amdgpu_userq_in *mqd_user = args_in;struct amdgpu_mqd_prop *userq_props; -struct amdgpu_gfx_shadow_info shadow_info;int r;/* Structure to initialize MQD for userqueue using generic MQD init function */
@@ -232,8 +231,6 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr, userq_props->doorbell_index = queue->doorbell_index; userq_props->fence_address = queue->fence_drv->gpu_addr; -if (adev->gfx.funcs->get_gfx_shadow_info) - adev->gfx.funcs->get_gfx_shadow_info (adev, &shadow_info, true);if (queue->queue_type ==AMDGPU_HW_IP_COMPUTE ) {struct drm_amdgpu_userq_mqd_compute_gfx11 *compute_mqd;
@@ -251,7 +248,7 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr, } r =amdgpu_userq_input_va_validate (queue, compute_mqd->eop_va, -max_t (u32,PAGE_SIZE ,AMDGPU_GPU_PAGE_SIZE )); +2048 );if (r) goto free_mqd;
@@ -264,6 +261,14 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr,kfree (compute_mqd); }else if (queue->queue_type ==AMDGPU_HW_IP_GFX ) {struct drm_amdgpu_userq_mqd_gfx11 *mqd_gfx_v11; +struct amdgpu_gfx_shadow_info shadow_info; + +if (adev->gfx.funcs->get_gfx_shadow_info) { + adev->gfx.funcs->get_gfx_shadow_info (adev, &shadow_info, true); + }else { + r = -EINVAL ; + goto free_mqd; + }if (mqd_user->mqd_size !=sizeof (*mqd_gfx_v11) || !mqd_user->mqd) {DRM_ERROR ("Invalid GFX MQD\n" );
@@ -287,6 +292,10 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr, shadow_info.shadow_size);if (r) goto free_mqd; + r =amdgpu_userq_input_va_validate (queue, mqd_gfx_v11->csa_va, + shadow_info.csa_size); +if (r) + goto free_mqd;kfree (mqd_gfx_v11); }else if (queue->queue_type ==AMDGPU_HW_IP_DMA ) {
@@ -305,7 +314,7 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr, goto free_mqd; } r =amdgpu_userq_input_va_validate (queue, mqd_sdma_v11->csa_va, - shadow_info.csa_size); +32 );if (r) goto free_mqd;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 112/507 wifi: iwlwifi: mld: add null check for kzalloc() in iwl_mld_send_proto_offload()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Qiang <[email protected]>
[ Upstream commit 3df28496673bd8009f1cd3a85a63650c96e369f4 ]
Add a missing NULL pointer check after kzalloc() in iwl_mld_send_proto_offload(). Without this check, a failed allocation could lead to a NULL dereference.
--- drivers/net/wireless/intel/iwlwifi/mld/d3.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/wireless/intel/iwlwifi/mld/d3.c +4 -0
@@ -1632,6 +1632,10 @@ iwl_mld_send_proto_offload(struct iwl_mld *mld,u32 enabled =0 ; cmd =kzalloc (hcmd.len[0 ],GFP_KERNEL ); +if (!cmd) { +IWL_DEBUG_WOWLAN (mld,"Failed to allocate proto offload cmd\n" ); +return -ENOMEM ; + }#if IS_ENABLED (CONFIG_IPV6 )struct iwl_mld_vif *mld_vif =iwl_mld_vif_from_mac80211 (vif);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 113/507 Revert "mtd: rawnand: marvell: fix layouts"
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aryan Srivastava <[email protected]>
[ Upstream commit fbd72cb463fdea3a0c900dd5d6e813cdebc3a73c ]
This reverts commit e6a30d0c48a1e8a68f1cc413bee65302ab03ddfb.
This change resulted in the 8bit ECC layouts having the incorrect amount of read/write chunks, the last spare bytes chunk would always be missed.
--- drivers/mtd/nand/raw/marvell_nand.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/mtd/nand/raw/marvell_nand.c +8 -5
@@ -290,13 +290,16 @@ static const struct marvell_hw_ecc_layout marvell_nfc_layouts[] = {MARVELL_LAYOUT (2048 ,512 ,4 ,1 ,1 ,2048 ,32 ,30 ,0 ,0 ,0 ),MARVELL_LAYOUT (2048 ,512 ,8 ,2 ,1 ,1024 ,0 ,30 ,1024 ,32 ,30 ),MARVELL_LAYOUT (2048 ,512 ,8 ,2 ,1 ,1024 ,0 ,30 ,1024 ,64 ,30 ), -MARVELL_LAYOUT (2048 ,512 ,16 ,4 ,4 ,512 ,0 ,30 ,0 ,32 ,30 ), +MARVELL_LAYOUT (2048 ,512 ,12 ,3 ,2 ,704 ,0 ,30 ,640 ,0 ,30 ), +MARVELL_LAYOUT (2048 ,512 ,16 ,5 ,4 ,512 ,0 ,30 ,0 ,32 ,30 ),MARVELL_LAYOUT (4096 ,512 ,4 ,2 ,2 ,2048 ,32 ,30 ,0 ,0 ,0 ), -MARVELL_LAYOUT (4096 ,512 ,8 ,4 ,4 ,1024 ,0 ,30 ,0 ,64 ,30 ), -MARVELL_LAYOUT (4096 ,512 ,16 ,8 ,8 ,512 ,0 ,30 ,0 ,32 ,30 ), +MARVELL_LAYOUT (4096 ,512 ,8 ,5 ,4 ,1024 ,0 ,30 ,0 ,64 ,30 ), +MARVELL_LAYOUT (4096 ,512 ,12 ,6 ,5 ,704 ,0 ,30 ,576 ,32 ,30 ), +MARVELL_LAYOUT (4096 ,512 ,16 ,9 ,8 ,512 ,0 ,30 ,0 ,32 ,30 ),MARVELL_LAYOUT (8192 ,512 ,4 ,4 ,4 ,2048 ,0 ,30 ,0 ,0 ,0 ), -MARVELL_LAYOUT (8192 ,512 ,8 ,8 ,8 ,1024 ,0 ,30 ,0 ,160 ,30 ), - MARVELL_LAYOUT( 8192, 512, 16, 16, 16, 512, 0, 30, 0, 32, 30), +MARVELL_LAYOUT (8192 ,512 ,8 ,9 ,8 ,1024 ,0 ,30 ,0 ,160 ,30 ), +MARVELL_LAYOUT (8192 ,512 ,12 ,12 ,11 ,704 ,0 ,30 ,448 ,64 ,30 ), + MARVELL_LAYOUT( 8192, 512, 16, 17, 16, 512, 0, 30, 0, 32, 30), };/**
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 114/507 mtd: nand: relax ECC parameter validation check
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aryan Srivastava <[email protected]>
[ Upstream commit 050553c683f21eebd7d1020df9b2ec852e2a9e4e ]
Due to the custom handling and layouts of certain nand controllers this validity check will always fail for certain layouts. The check inherently depends on even chunk sizing and this is not always the case.
Modify the check to only print a warning, instead of failing to init the attached NAND. This allows various 8 bit and 12 ECC strength layouts to be used.
--- drivers/mtd/nand/raw/nand_base.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/mtd/nand/raw/nand_base.c +8 -5
@@ -6469,11 +6469,14 @@ static int nand_scan_tail(struct nand_chip *chip) ecc->steps = mtd->writesize / ecc->size;if (!base->ecc.ctx.nsteps) base->ecc.ctx.nsteps = ecc->steps; -if (ecc->steps * ecc->size != mtd->writesize) { -WARN (1 ,"Invalid ECC parameters\n" ); - ret = -EINVAL ; - goto err_nand_manuf_cleanup; - } + +/* +* Validity check: Warn if ECC parameters are not compatible with page size. +* Due to the custom handling of ECC blocks in certain controllers the check +* may result in an expected failure. +*/ +if (ecc->steps * ecc->size != mtd->writesize) +pr_warn ("ECC parameters may be invalid in reference to underlying NAND chip\n" );if (!ecc->total) { ecc->total = ecc->steps * ecc->bytes;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 115/507 mtd: rawnand: lpc32xx_slc: fix GPIO descriptor leak on probe error and remove
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haotian Zhang <[email protected]>
[ Upstream commit cdf44f1add4ec9ee80569d5a43e6e9bba0d74c7a ]
The driver calls gpiod_get_optional() in the probe function but never calls gpiod_put() in the remove function or in the probe error path. This leads to a GPIO descriptor resource leak. The lpc32xx_mlc.c driver in the same directory handles this correctly by calling gpiod_put() on both paths.
Add gpiod_put() in the remove function and in the probe error path to fix the resource leak.
--- drivers/mtd/nand/raw/lpc32xx_slc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mtd/nand/raw/lpc32xx_slc.c +2 -0
@@ -937,6 +937,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)dma_release_channel (host->dma_chan); enable_wp:lpc32xx_wp_enable (host); +gpiod_put (host->wp_gpio);return res; }
@@ -962,6 +963,7 @@ static void lpc32xx_nand_remove(struct platform_device *pdev)writel (tmp,SLC_CTRL (host->io_base));lpc32xx_wp_enable (host); +gpiod_put (host->wp_gpio); }static int lpc32xx_nand_resume (struct platform_device *pdev)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 116/507 perf: Remove get_perf_callchain() init_nr argument
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit e649bcda25b5ae1a30a182cc450f928a0b282c93 ]
The 'init_nr' argument has double duty: it's used to initialize both the number of contexts and the number of stack entries. That's confusing and the callers always pass zero anyway. Hard code the zero.
Stable-dep-of: 23f852daa4ba ("bpf: Fix stackmap overflow check in __bpf_get_stackid()")
--- include/linux/perf_event.h | 2 +- kernel/bpf/stackmap.c | 4 ++-- kernel/events/callchain.c | 12 ++++++------ kernel/events/core.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)
include/linux/perf_event.h +1 -1
@@ -1719,7 +1719,7 @@ DECLARE_PER_CPU(struct perf_callchain_entry, perf_callchain_entry);extern void perf_callchain_user (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs);extern void perf_callchain_kernel (struct perf_callchain_entry_ctx *entry,struct pt_regs *regs);extern struct perf_callchain_entry * -get_perf_callchain (struct pt_regs *regs,u32 init_nr,bool kernel,bool user, +get_perf_callchain (struct pt_regs *regs,bool kernel,bool user,u32 max_stack,bool crosstask,bool add_mark);extern int get_callchain_buffers (int max_stack);extern void put_callchain_buffers (void );
kernel/bpf/stackmap.c +2 -2
@@ -314,7 +314,7 @@ BPF_CALL_3(bpf_get_stackid, struct pt_regs *, regs, struct bpf_map *, map,if (max_depth > sysctl_perf_event_max_stack) max_depth = sysctl_perf_event_max_stack; - trace =get_perf_callchain (regs,0 , kernel, user, max_depth, + trace =get_perf_callchain (regs, kernel, user, max_depth, false, false);if (unlikely (!trace))
@@ -451,7 +451,7 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task,else if (kernel && task) trace =get_callchain_entry_for_task (task, max_depth);else - trace =get_perf_callchain (regs,0 , kernel, user, max_depth, + trace =get_perf_callchain (regs, kernel, user, max_depth, crosstask, false);if (unlikely (!trace) || trace->nr < skip) {
kernel/events/callchain.c +6 -6
@@ -217,7 +217,7 @@ static void fixup_uretprobe_trampoline_entries(struct perf_callchain_entry *entr }struct perf_callchain_entry * -get_perf_callchain (struct pt_regs *regs,u32 init_nr,bool kernel,bool user, +get_perf_callchain (struct pt_regs *regs,bool kernel,bool user,u32 max_stack,bool crosstask,bool add_mark) {struct perf_callchain_entry *entry;
@@ -232,11 +232,11 @@ get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user,if (!entry)return NULL ; - ctx.entry = entry; - ctx.max_stack = max_stack; - ctx.nr = entry->nr = init_nr; - ctx.contexts =0 ; - ctx.contexts_maxed = false; + ctx.entry = entry; + ctx.max_stack = max_stack; + ctx.nr = entry->nr =0 ; + ctx.contexts =0 ; + ctx.contexts_maxed = false;if (kernel && !user_mode (regs)) {if (add_mark)
kernel/events/core.c +1 -1
@@ -8205,7 +8205,7 @@ perf_callchain(struct perf_event *event, struct pt_regs *regs)if (!kernel && !user)return &__empty_callchain; - callchain =get_perf_callchain (regs,0 , kernel, user, + callchain =get_perf_callchain (regs, kernel, user, max_stack, crosstask, true);return callchain ?: &__empty_callchain; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 117/507 bpf: Refactor stack map trace depth calculation into helper function
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaud Lecomte <[email protected]>
[ Upstream commit e17d62fedd10ae56e2426858bd0757da544dbc73 ]
Extract the duplicated maximum allowed depth computation for stack traces stored in BPF stacks from bpf_get_stackid() and __bpf_get_stack() into a dedicated stack_map_calculate_max_depth() helper function.
This unifies the logic for:
- The max depth computation
- Enforcing the sysctl_perf_event_max_stack limit
No functional changes for existing code paths.
Stable-dep-of: 23f852daa4ba ("bpf: Fix stackmap overflow check in __bpf_get_stackid()")
--- kernel/bpf/stackmap.c | 47 +++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 15 deletions(-)
kernel/bpf/stackmap.c +32 -15
@@ -42,6 +42,28 @@ static inline int stack_map_data_size(struct bpf_map *map) sizeof(struct bpf_stack_build_id) : sizeof(u64); } +/** +* stack_map_calculate_max_depth - Calculate maximum allowed stack trace depth +* @size: Size of the buffer/map value in bytes +* @elem_size: Size of each stack trace element +* @flags: BPF stack trace flags (BPF_F_USER_STACK, BPF_F_USER_BUILD_ID, ...) +* +* Return: Maximum number of stack trace entries that can be safely stored +*/ +static u32 stack_map_calculate_max_depth (u32 size,u32 elem_size,u64 flags) +{ +u32 skip = flags &BPF_F_SKIP_FIELD_MASK ; +u32 max_depth; +u32 curr_sysctl_max_stack =READ_ONCE (sysctl_perf_event_max_stack); + + max_depth = size / elem_size; + max_depth += skip; +if (max_depth > curr_sysctl_max_stack) +return curr_sysctl_max_stack; + +return max_depth; +} +static int prealloc_elems_and_freelist (struct bpf_stack_map *smap) { u64 elem_size = sizeof(struct stack_map_bucket) +
@@ -300,20 +322,17 @@ static long __bpf_get_stackid(struct bpf_map *map, BPF_CALL_3(bpf_get_stackid, struct pt_regs *, regs, struct bpf_map *, map, u64, flags) { -u32 max_depth = map->value_size /stack_map_data_size (map); -u32 skip = flags &BPF_F_SKIP_FIELD_MASK ; +u32 elem_size =stack_map_data_size (map);bool user = flags &BPF_F_USER_STACK ;struct perf_callchain_entry *trace;bool kernel = !user; +u32 max_depth;if (unlikely (flags & ~(BPF_F_SKIP_FIELD_MASK |BPF_F_USER_STACK |BPF_F_FAST_STACK_CMP |BPF_F_REUSE_STACKID )))return -EINVAL ; - max_depth += skip; -if (max_depth > sysctl_perf_event_max_stack) - max_depth = sysctl_perf_event_max_stack; - + max_depth =stack_map_calculate_max_depth (map->value_size, elem_size, flags); trace =get_perf_callchain (regs, kernel, user, max_depth, false, false);
@@ -406,7 +425,7 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task,struct perf_callchain_entry *trace_in, void *buf, u32 size, u64 flags, bool may_fault) { - u32 trace_nr, copy_len, elem_size, num_elem, max_depth; + u32 trace_nr, copy_len, elem_size, max_depth;bool user_build_id = flags &BPF_F_USER_BUILD_ID ;bool crosstask = task && task != current;u32 skip = flags &BPF_F_SKIP_FIELD_MASK ;
@@ -438,21 +457,20 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task, goto clear; } - num_elem = size / elem_size; - max_depth = num_elem + skip; -if (sysctl_perf_event_max_stack < max_depth) - max_depth = sysctl_perf_event_max_stack; + max_depth =stack_map_calculate_max_depth (size, elem_size, flags);if (may_fault)rcu_read_lock ();/* need RCU for perf's callchain below */ -if (trace_in) +if (trace_in) { trace = trace_in; -else if (kernel && task) + trace->nr =min_t (u32, trace->nr, max_depth); + }else if (kernel && task) { trace =get_callchain_entry_for_task (task, max_depth); -else + }else { trace =get_perf_callchain (regs, kernel, user, max_depth, crosstask, false); + }if (unlikely (!trace) || trace->nr < skip) {if (may_fault)
@@ -461,7 +479,6 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task, } trace_nr = trace->nr - skip; - trace_nr = (trace_nr <= num_elem) ? trace_nr : num_elem; copy_len = trace_nr * elem_size; ips = trace->ip + skip;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 118/507 bpf: Fix stackmap overflow check in __bpf_get_stackid()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaud Lecomte <[email protected]>
[ Upstream commit 23f852daa4bab4d579110e034e4d513f7d490846 ]
Syzkaller reported a KASAN slab-out-of-bounds write in __bpf_get_stackid() when copying stack trace data. The issue occurs when the perf trace
contains more stack entries than the stack map bucket can hold, leading to an out-of-bounds write in the bucket's data array.
--- kernel/bpf/stackmap.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
kernel/bpf/stackmap.c +8 -7
@@ -251,8 +251,8 @@ static long __bpf_get_stackid(struct bpf_map *map, { struct bpf_stack_map *smap = container_of(map, struct bpf_stack_map, map);struct stack_map_bucket *bucket, *new_bucket, *old_bucket; +u32 hash, id, trace_nr, trace_len, i, max_depth;u32 skip = flags &BPF_F_SKIP_FIELD_MASK ; -u32 hash, id, trace_nr, trace_len, i;bool user = flags &BPF_F_USER_STACK ;u64 *ips;bool hash_matches;
@@ -261,7 +261,8 @@ static long __bpf_get_stackid(struct bpf_map *map,/* skipping more than usable stack trace */ return -EFAULT ; - trace_nr = trace->nr - skip; + max_depth =stack_map_calculate_max_depth (map->value_size,stack_map_data_size (map), flags); + trace_nr =min_t (u32, trace->nr - skip, max_depth - skip); trace_len = trace_nr *sizeof (u64); ips = trace->ip + skip; hash =jhash2 ((u32 *)ips, trace_len /sizeof (u32),0 );
@@ -390,15 +391,11 @@ BPF_CALL_3(bpf_get_stackid_pe, struct bpf_perf_event_data_kern *, ctx,return -EFAULT ; nr_kernel =count_kernel_ip (trace); +__u64 nr = trace->nr;/* save original */ if (kernel) { -__u64 nr = trace->nr; - trace->nr = nr_kernel; ret =__bpf_get_stackid (map, trace, flags); - -/* restore nr */ - trace->nr = nr; }else {/* user */ u64 skip = flags &BPF_F_SKIP_FIELD_MASK ;
@@ -409,6 +406,10 @@ BPF_CALL_3(bpf_get_stackid_pe, struct bpf_perf_event_data_kern *, ctx, flags = (flags & ~BPF_F_SKIP_FIELD_MASK ) | skip; ret =__bpf_get_stackid (map, trace, flags); } + +/* restore nr */ + trace->nr = nr; +return ret; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 119/507 perf/x86/intel/cstate: Remove PC3 support from LunarLake
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Rui <[email protected]>
[ Upstream commit 4ba45f041abe60337fdeeb68553b9ee1217d544e ]
LunarLake doesn't support Package C3. Remove the PC3 residency counter support from LunarLake.
--- arch/x86/events/intel/cstate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/events/intel/cstate.c +1 -2
@@ -70,7 +70,7 @@* perf code: 0x01 * Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL,KNL, * GLM,CNL,KBL,CML,ICL,TGL,TNT,RKL, -* ADL,RPL,MTL,ARL,LNL +* ADL,RPL,MTL,ARL * Scope: Package (physical package) * MSR_PKG_C6_RESIDENCY: Package C6 Residency Counter. * perf code: 0x02
@@ -522,7 +522,6 @@ static const struct cstate_model lnl_cstates __initconst = { BIT(PERF_CSTATE_CORE_C7_RES), .pkg_events =BIT (PERF_CSTATE_PKG_C2_RES ) | -BIT (PERF_CSTATE_PKG_C3_RES ) |BIT (PERF_CSTATE_PKG_C6_RES ) | BIT(PERF_CSTATE_PKG_C10_RES), };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 120/507 task_work: Fix NMI race condition
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <[email protected]>
[ Upstream commit ef1ea98c8fffe227e5319215d84a53fa2a4bcebc ]
__schedule()
// disable irqs
<NMI>
task_work_add(current, work, TWA_NMI_CURRENT);
</NMI>
// current = next;
// enable irqs
<IRQ>
task_work_set_notify_irq()
test_and_set_tsk_thread_flag(current,
TIF_NOTIFY_RESUME); // wrong task!
</IRQ>
// original task skips task work on its next return to user (or exit!)--- kernel/task_work.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
kernel/task_work.c +7 -1
@@ -9,7 +9,12 @@ static struct callback_head work_exited; /* all we need is ->next == NULL */#ifdef CONFIG_IRQ_WORK static void task_work_set_notify_irq (struct irq_work *entry) { -test_and_set_tsk_thread_flag (current,TIF_NOTIFY_RESUME ); +/* +* no-op IPI +* +* TWA_NMI_CURRENT will already have set the TIF flag, all +* this interrupt does it tickle the return-to-user path. +*/ } static DEFINE_PER_CPU(struct irq_work, irq_work_NMI_resume) =IRQ_WORK_INIT_HARD (task_work_set_notify_irq);
@@ -86,6 +91,7 @@ int task_work_add(struct task_struct *task, struct callback_head *work,break ;#ifdef CONFIG_IRQ_WORK case TWA_NMI_CURRENT : +set_tsk_thread_flag (current,TIF_NOTIFY_RESUME );irq_work_queue (this_cpu_ptr (&irq_work_NMI_resume));break ;#endif
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 121/507 x86/dumpstack: Prevent KASAN false positive warnings in __show_regs()
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tengda Wu <[email protected]>
[ Upstream commit ced37e9ceae50e4cb6cd058963bd315ec9afa651 ]
When triggering a stack dump via sysrq (echo t > /proc/sysrq-trigger), KASAN may report false-positive out-of-bounds access:
BUG: KASAN: out-of-bounds in __show_regs+0x4b/0x340
Call Trace:
dump_stack_lvl
print_address_description.constprop.0
print_report
__show_regs
show_trace_log_lvl
sched_show_task
show_state_filter
sysrq_handle_showstate
__handle_sysrq
write_sysrq_trigger
proc_reg_write
vfs_write
ksys_write
do_syscall_64
entry_SYSCALL_64_after_hwframeThe issue occurs as follows:
Task A (walk other tasks' stacks) Task B (running)
1. echo t > /proc/sysrq-trigger
show_trace_log_lvl
regs = unwind_get_entry_regs()
show_regs_if_on_stack(regs)
2. The stack value pointed by regs keeps changing, and so are the tags in its KASAN shadow region.
__show_regs(regs)
regs->ax, regs->bx, ...
3. hit KASAN redzones, OOB
When task A walks task B's stack without suspending it, the continuous changes in task B's stack (and corresponding KASAN shadow tags) may cause task A to hit KASAN redzones when accessing obsolete values on the stack, resulting in false positive reports.
Simply stopping the task before unwinding is not a viable fix, as it would alter the state intended to inspect. This is especially true for diagnosing misbehaving tasks (e.g., in a hard lockup), where stopping might fail or hide the root cause by changing the call stack.
Therefore, fix this by disabling KASAN checks during asynchronous stack unwinding, which is identified when the unwinding task does not match the current task (task != current).
[ bp: Align arguments on function's opening brace. ]
--- arch/x86/kernel/dumpstack.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-)
arch/x86/kernel/dumpstack.c +21 -2
@@ -181,8 +181,8 @@ static void show_regs_if_on_stack(struct stack_info *info, struct pt_regs *regs,* in false positive reports. Disable instrumentation to avoid those. */ __no_kmsan_checks -static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, -unsigned long *stack,const char *log_lvl) +static void __show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, +unsigned long *stack,const char *log_lvl) {struct unwind_state state;struct stack_info stack_info = {0 };
@@ -303,6 +303,25 @@ static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, } } +static void show_trace_log_lvl (struct task_struct *task,struct pt_regs *regs, +unsigned long *stack,const char *log_lvl) +{ +/* +* Disable KASAN to avoid false positives during walking another +* task's stacks, as values on these stacks may change concurrently +* with task execution. +*/ +bool disable_kasan = task && task != current; + +if (disable_kasan) +kasan_disable_current (); + +__show_trace_log_lvl (task, regs, stack, log_lvl); + +if (disable_kasan) +kasan_enable_current (); +} +void show_stack (struct task_struct *task,unsigned long *sp,const char *loglvl) {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 122/507 accel/ivpu: Remove skip of dma unmap for imported buffers
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maciej Falkowski <[email protected]>
[ Upstream commit c063c1bbee67391f12956d2ffdd5da00eb87ff79 ]
Rework of imported buffers introduced in the commit e0c0891cd63b ("accel/ivpu: Rework bind/unbind of imported buffers") switched the logic of imported buffers by dma mapping/unmapping them just as the regular buffers.
The commit didn't include removal of skipping dma unmap of imported buffers which results in them being mapped without unmapping.
--- drivers/accel/ivpu/ivpu_gem.c | 3 --- 1 file changed, 3 deletions(-)
drivers/accel/ivpu/ivpu_gem.c +0 -3
@@ -157,9 +157,6 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo) bo->ctx =NULL ; } -if (drm_gem_is_imported (&bo->base.base)) -return ; -if (bo->base.sgt) {if (bo->base.base.import_attach) { dma_buf_unmap_attachment(bo->base.base.import_attach,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 123/507 media: ov02c10: Fix default vertical flip
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Reichel <[email protected]>
[ Upstream commit d5ebe3f7d13d4cee3ff7e718de23564915aaf163 ]
The driver right now defaults to setting the vertical flip bit. This conflicts with proper handling of the rotation property defined in ACPI or device tree, so drop the VFLIP bit. It should be handled via V4L2_CID_VFLIP instead.
--- drivers/media/i2c/ov02c10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ov02c10.c +1 -1
@@ -175,7 +175,7 @@ static const struct reg_sequence sensor_1928x1092_30fps_setting[] = { {0x3816, 0x01}, {0x3817, 0x01}, - {0x3820, 0xb0}, + {0x3820, 0xa0}, {0x3821, 0x00}, {0x3822, 0x80}, {0x3823, 0x08},
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 124/507 tools/nolibc/stdio: let perror work when NOLIBC_IGNORE_ERRNO is set
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Berg <[email protected]>
[ Upstream commit c485ca3aff2442adea4c08ceb5183e671ebed22a ]
There is no errno variable when NOLIBC_IGNORE_ERRNO is defined. As such, simply print the message with "unknown error" rather than the integer value of errno.
--- tools/include/nolibc/stdio.h | 4 ++++ 1 file changed, 4 insertions(+)
tools/include/nolibc/stdio.h +4 -0
@@ -600,7 +600,11 @@ int sscanf(const char *str, const char *format, ...)static __attribute__((unused))void perror (const char *msg) { +#ifdef NOLIBC_IGNORE_ERRNO +fprintf (stderr,"%s%sunknown error\n" , (msg && *msg) ? msg :"" , (msg && *msg) ?": " :"" ); +#else fprintf (stderr,"%s%serrno=%d\n" , (msg && *msg) ? msg :"" , (msg && *msg) ?": " :"" , errno); +#endif } static __attribute__((unused))
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 125/507 tools/nolibc/dirent: avoid errno in readdir_r
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Berg <[email protected]>
[ Upstream commit 4ada5679f18dbbe92d87c37a842c3368e6ab5e4a ]
Using errno is not possible when NOLIBC_IGNORE_ERRNO is set. Use sys_lseek instead of lseek as that avoids using errno.
--- tools/include/nolibc/dirent.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/include/nolibc/dirent.h +3 -3
@@ -86,9 +86,9 @@ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)* readdir() can only return one entry at a time. * Make sure the non-returned ones are not skipped. */ - ret =lseek (fd, ldir->d_off,SEEK_SET ); -if (ret ==-1 ) -return errno; + ret =sys_lseek (fd, ldir->d_off,SEEK_SET ); +if (ret <0 ) +return -ret; entry->d_ino = ldir->d_ino;/* the destination should always be big enough */
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 126/507 clk: qcom: gcc-qcs615: Update the SDCC clock to use shared_floor_ops
In reply to Greg Kroah-Hartman6.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Taniya Das <[email protected]>
[ Upstream commit 0820c9373369c83de5202871d02682d583a91a9c ]
Fix "gcc_sdcc2_apps_clk_src: rcg didn't update its configuration" during boot. This happens due to the floor_ops tries to update the rcg configuration even if the clock is not enabled.
The shared_floor_ops ensures that the RCG is safely parked and the new parent configuration is cached in the parked_cfg when the clock is off.
Ensure to use the ops for the other SDCC clock instances as well.
--- drivers/clk/qcom/gcc-qcs615.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/qcom/gcc-qcs615.c +3 -3
@@ -784,7 +784,7 @@ static struct clk_rcg2 gcc_sdcc1_apps_clk_src = { .name = "gcc_sdcc1_apps_clk_src", .parent_data = gcc_parent_data_1, .num_parents = ARRAY_SIZE(gcc_parent_data_1), - .ops = &clk_rcg2_floor_ops, + .ops = &clk_rcg2_shared_floor_ops, }, };
@@ -806,7 +806,7 @@ static struct clk_rcg2 gcc_sdcc1_ice_core_clk_src = { .name = "gcc_sdcc1_ice_core_clk_src", .parent_data = gcc_parent_data_0, .num_parents = ARRAY_SIZE(gcc_parent_data_0), - .ops = &clk_rcg2_floor_ops, + .ops = &clk_rcg2_shared_floor_ops, }, };
@@ -830,7 +830,7 @@ static struct clk_rcg2 gcc_sdcc2_apps_clk_src = { .name = "gcc_sdcc2_apps_clk_src", .parent_data = gcc_parent_data_8, .num_parents = ARRAY_SIZE(gcc_parent_data_8), - .ops = &clk_rcg2_floor_ops, + .ops = &clk_rcg2_shared_floor_ops, }, };
Signature · 1 line
2.51.0