6.12.63-rc1 review
Subsystems (6)
Greg Kroah-Hartman
maintainercover 6.12.63-rc1 review
This is the start of the stable review cycle for the 6.12.63 release. There are 354 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.12.63-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.12.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.12.63-rc1
Junrui Luo <[email protected]>
ALSA: wavefront: Fix integer overflow in sample size validation
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
Diogo Ivo <[email protected]>
usb: phy: Initialize struct usb_phy list_head
Haotien Hsu <[email protected]>
usb: gadget: tegra-xudc: Always reinitialize data toggle when clear halt
Eric Dumazet <[email protected]>
tcp_metrics: use dst_dev_net_rcu()
Eric Dumazet <[email protected]>
net: dst: introduce dst->dev_rcu
Thangaraj Samynathan <[email protected]>
net: lan743x: Allocate rings outside ZONE_DMA
Huacai Chen <[email protected]>
LoongArch: Add machine_kexec_mask_interrupts() implementation
Dmitry Antipov <[email protected]>
ocfs2: fix memory leak in ocfs2_merge_rec_left()
Dan Carpenter <[email protected]>
irqchip/mchp-eic: Fix error code in mchp_eic_domain_alloc()
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
Christoph Hellwig <[email protected]>
block: return unsigned int from queue_dma_alignment
Mohamed Khalfella <[email protected]>
block: Use RCU in blk_mq_[un]quiesce_tagset() instead of set->tag_list_lock
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
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
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
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
Shengjiu Wang <[email protected]>
ASoC: ak5558: Disable regulator when error happens
Shengjiu Wang <[email protected]>
ASoC: ak4458: Disable regulator when error happens
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]>
Expand the type of nfs_fattr->valid
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"
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
NeilBrown <[email protected]>
nfs/vfs: discard d_exact_alias()
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
Daeho Jeong <[email protected]>
f2fs: maintain one time GC mode is enabled during whole zoned GC cycle
Daeho Jeong <[email protected]>
f2fs: add gc_boost_gc_greedy sysfs node
Daeho Jeong <[email protected]>
f2fs: add gc_boost_gc_multiple sysfs node
Chao Yu <[email protected]>
f2fs: introduce reserved_pin_section sysfs entry
Chao Yu <[email protected]>
f2fs: sysfs: add encoding_flags entry
Daeho Jeong <[email protected]>
f2fs: add carve_out sysfs node
Chao Yu <[email protected]>
f2fs: fix to avoid running out of free segments
Jaegeuk Kim <[email protected]>
f2fs: add a sysfs entry to reclaim POSIX_FADV_NOREUSE pages
Jaegeuk Kim <[email protected]>
f2fs: keep POSIX_FADV_NOREUSE ranges
Xi Pardee <[email protected]>
platform/x86:intel/pmc: Update Arrow Lake telemetry GUID
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
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
MD Danish Anwar <[email protected]>
net: hsr: Create and export hsr_get_port_ndev()
Eric Dumazet <[email protected]>
net: hsr: remove synchronize_rcu() from hsr_add_port()
Eric Dumazet <[email protected]>
net: hsr: remove one synchronize_rcu() from hsr_del_port()
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
Ivan Stepchenko <[email protected]>
mtd: lpddr_cmds: fix signed shifts in lpddr_cmds
Hangbin Liu <[email protected]>
selftests: bonding: add delay before each xvlan_over_bond connectivity check
Etienne Champetier <[email protected]>
selftests: bonding: add ipvlan over bond testing
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()
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()"
Andy Shevchenko <[email protected]>
resource: introduce is_type_match() helper and use it
Andy Shevchenko <[email protected]>
resource: replace open coded resource_intersection()
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()
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
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
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
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
Christoph Hellwig <[email protected]>
iomap: factor out a iomap_dio_done helper
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()
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()
Shenghao Ding <[email protected]>
ASoC: tas2781: correct the wrong period
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
Fangyu Yu <[email protected]>
RISC-V: KVM: Fix guest page fault within HLV* instructions
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
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
Jisheng Zhang <[email protected]>
usb: dwc2: disable platform lowlevel hw resources during shutdown
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()
Chen Ridong <[email protected]>
cpuset: Treat cpusets in attaching as populated
Alexander Dahl <[email protected]>
net: phy: adin1100: Fix software power-down ready condition
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
Xiaolei Wang <[email protected]>
phy: freescale: Initialize priv->lock
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
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
Zilin Guan <[email protected]>
scsi: qla2xxx: Fix improper freeing of purex item
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
Leo Yan <[email protected]>
perf arm-spe: Extend branch operations
Fernando Fernandez Mancera <[email protected]>
ipv6: clear RA flags when adding a static route
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
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
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
Guenter Roeck <[email protected]>
block/blk-throttle: Fix throttle slice time for SSDs
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()
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
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
Rene Rebe <[email protected]>
ps3disk: use memcpy_{from,to}_bvec index
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: drop dpu_hw_dsc_destroy() prototype
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
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()
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
Leo Yan <[email protected]>
coresight: etm4x: Add context synchronization before enabling trace
Leo Yan <[email protected]>
coresight: etm4x: Extract the trace unit controlling
Leo Yan <[email protected]>
coresight: etm4x: Correct polling IDLE bit
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
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
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
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
Yun Zhou <[email protected]>
md: fix rcu protection in md_wakeup_thread
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
Zhang Yi <[email protected]>
ext4: correct the checking of quota files before moving extents
Haotian Zhang <[email protected]>
mfd: da9055: Fix missing regmap_del_irq_chip() in error path
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
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
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
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
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()
Kuan-Wei Chiu <[email protected]>
interconnect: debugfs: Fix incorrect error handling for NULL path
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
Abdun Nihaal <[email protected]>
wifi: ath12k: fix potential memory leak in ath12k_wow_arp_ns_offload()
Stanley Chu <[email protected]>
i3c: master: svc: Prevent incomplete IBI transaction
Frank Li <[email protected]>
i3c: fix refcount inconsistency in i3c_master_register
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
Benjamin Berg <[email protected]>
tools/nolibc/stdio: let perror work when NOLIBC_IGNORE_ERRNO is set
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"
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
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
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
Gergo Koteles <[email protected]>
arm64: dts: qcom: sdm845-oneplus: Correct gpio used for slider
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
Heiko Carstens <[email protected]>
s390/ap: Don't leak debug feature files if AP instructions are not available
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
Uwe Kleine-König <[email protected]>
soc: Switch back to struct platform_driver::remove()
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
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
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
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()
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
Stephan Gerhold <[email protected]>
dt-bindings: clock: qcom,x1e80100-gcc: Add missing video 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
Fernand Sieber <[email protected]>
sched/fair: Forfeit vruntime on yield
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
Jeff Johnson <[email protected]>
wifi: ath10k: Add missing include of export.h
Loic Poulain <[email protected]>
wifi: ath10k: Avoid vdev delete timeout when firmware is already down
Josh Poimboeuf <[email protected]>
objtool: Fix weak symbol detection
Dylan Hatch <[email protected]>
objtool: Fix standalone --hacks=jump_label
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
Thierry Bultel <[email protected]>
clk: renesas: Pass sub struct of cpg_mssr_priv to cpg_clk_register
Geert Uytterhoeven <[email protected]>
clk: renesas: Use str_on_off() helper
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
Seungjin Bae <[email protected]>
USB: Fix descriptor count when handling invalid MBIM extended descriptor
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
Guido Günther <[email protected]>
drm/panel: visionox-rm69299: Don't clear all mode flags
Karol Wachowski <[email protected]>
accel/ivpu: Ensure rpm_runtime_put in case of engine reset/resume fail
Andrzej Kacprowski <[email protected]>
accel/ivpu: Prevent runtime suspend during context abort work
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/ABI/testing/sysfs-fs-f2fs | 52 ++ 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/qcom/msm8996.dtsi | 3 + arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts | 5 + .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 +- arch/arm64/boot/dts/qcom/sm8650.dtsi | 2 + arch/arm64/boot/dts/qcom/x1e80100.dtsi | 12 +- 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/loongarch/kernel/machine_kexec.c | 22 + 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/intel/core.c | 4 +- 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/asymmetric_keys/asymmetric_type.c | 12 +- crypto/authenc.c | 75 ++- drivers/accel/ivpu/ivpu_fw.h | 2 +- drivers/accel/ivpu/ivpu_hw_btrs.c | 2 +- drivers/accel/ivpu/ivpu_hw_btrs.h | 2 +- drivers/accel/ivpu/ivpu_job.c | 14 +- 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/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/gcc-x1e80100.c | 698 ++++++++++++++++++++- drivers/clk/renesas/r7s9210-cpg-mssr.c | 7 +- drivers/clk/renesas/r8a77970-cpg-mssr.c | 8 +- drivers/clk/renesas/r9a06g032-clocks.c | 6 +- drivers/clk/renesas/rcar-gen2-cpg.c | 5 +- drivers/clk/renesas/rcar-gen2-cpg.h | 3 +- drivers/clk/renesas/rcar-gen3-cpg.c | 6 +- drivers/clk/renesas/rcar-gen3-cpg.h | 3 +- drivers/clk/renesas/rcar-gen4-cpg.c | 6 +- drivers/clk/renesas/rcar-gen4-cpg.h | 3 +- drivers/clk/renesas/renesas-cpg-mssr.c | 150 ++--- drivers/clk/renesas/renesas-cpg-mssr.h | 20 +- drivers/clk/renesas/rzg2l-cpg.c | 3 +- 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/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/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/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/nouveau/nouveau_fence.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 2 +- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 2 +- 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 | 6 +- drivers/gpu/drm/vgem/vgem_fence.c | 2 +- drivers/gpu/host1x/syncpt.c | 4 +- drivers/greybus/gb-beagleplay.c | 12 +- drivers/hid/hid-logitech-hidpp.c | 9 +- drivers/hwmon/sy7636a-hwmon.c | 7 +- drivers/hwtracing/coresight/coresight-etm4x-core.c | 130 ++-- drivers/i3c/master.c | 8 +- drivers/i3c/master/svc-i3c-master.c | 22 +- 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/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-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/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 | 14 +- drivers/md/md.h | 8 +- drivers/md/raid5.c | 6 +- drivers/mfd/da9055-core.c | 1 + drivers/mfd/mt6358-irq.c | 1 + drivers/mfd/mt6397-irq.c | 1 + 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/xrs700x/xrs700x.c | 11 + drivers/net/ethernet/microchip/lan743x_main.c | 3 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/net/phy/adin1100.c | 2 +- drivers/net/phy/aquantia/aquantia_firmware.c | 2 +- drivers/net/phy/mscc/mscc_main.c | 6 +- drivers/net/wireless/ath/ath10k/bmi.c | 2 + drivers/net/wireless/ath/ath10k/ce.c | 2 + drivers/net/wireless/ath/ath10k/core.c | 22 +- drivers/net/wireless/ath/ath10k/core.h | 2 +- drivers/net/wireless/ath/ath10k/coredump.c | 2 + drivers/net/wireless/ath/ath10k/debug.c | 2 + drivers/net/wireless/ath/ath10k/htc.c | 3 + drivers/net/wireless/ath/ath10k/htt_rx.c | 3 + drivers/net/wireless/ath/ath10k/htt_tx.c | 2 + drivers/net/wireless/ath/ath10k/mac.c | 36 +- drivers/net/wireless/ath/ath10k/trace.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/wow.c | 1 + drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 +- drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 9 +- drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 27 +- drivers/net/wireless/st/cw1200/bh.c | 6 +- drivers/nvme/host/auth.c | 2 +- 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/phy/freescale/phy-fsl-imx8qm-hsio.c | 5 +- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 20 +- drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 13 +- 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/remoteproc/qcom_q6v5_wcss.c | 8 +- drivers/rtc/rtc-gamecube.c | 4 + 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/aspeed/aspeed-lpc-ctrl.c | 2 +- drivers/soc/aspeed/aspeed-lpc-snoop.c | 2 +- drivers/soc/aspeed/aspeed-p2a-ctrl.c | 2 +- drivers/soc/aspeed/aspeed-uart-routing.c | 2 +- drivers/soc/fsl/dpaa2-console.c | 2 +- drivers/soc/fsl/qe/qmc.c | 2 +- drivers/soc/fsl/qe/tsa.c | 2 +- drivers/soc/fujitsu/a64fx-diag.c | 2 +- drivers/soc/hisilicon/kunpeng_hccs.c | 2 +- drivers/soc/ixp4xx/ixp4xx-npe.c | 2 +- drivers/soc/ixp4xx/ixp4xx-qmgr.c | 2 +- drivers/soc/litex/litex_soc_ctrl.c | 2 +- drivers/soc/loongson/loongson2_guts.c | 2 +- drivers/soc/mediatek/mtk-devapc.c | 2 +- drivers/soc/mediatek/mtk-mmsys.c | 2 +- drivers/soc/mediatek/mtk-socinfo.c | 2 +- drivers/soc/microchip/mpfs-sys-controller.c | 2 +- drivers/soc/pxa/ssp.c | 2 +- drivers/soc/qcom/icc-bwmon.c | 2 +- drivers/soc/qcom/llcc-qcom.c | 2 +- drivers/soc/qcom/ocmem.c | 2 +- drivers/soc/qcom/pmic_glink.c | 2 +- drivers/soc/qcom/qcom_aoss.c | 2 +- drivers/soc/qcom/qcom_gsbi.c | 8 - drivers/soc/qcom/qcom_stats.c | 2 +- drivers/soc/qcom/ramp_controller.c | 4 +- drivers/soc/qcom/rmtfs_mem.c | 2 +- drivers/soc/qcom/rpm-proc.c | 2 +- drivers/soc/qcom/rpm_master_stats.c | 2 +- drivers/soc/qcom/smem.c | 5 +- drivers/soc/qcom/smp2p.c | 2 +- drivers/soc/qcom/smsm.c | 6 +- drivers/soc/qcom/socinfo.c | 2 +- drivers/soc/rockchip/io-domain.c | 8 +- drivers/soc/samsung/exynos-chipid.c | 4 +- drivers/soc/tegra/cbb/tegra194-cbb.c | 2 +- drivers/soc/ti/k3-ringacc.c | 2 +- drivers/soc/ti/knav_dma.c | 4 +- drivers/soc/ti/knav_qmss_queue.c | 2 +- drivers/soc/ti/pm33xx.c | 2 +- drivers/soc/ti/pruss.c | 4 +- drivers/soc/ti/smartreflex.c | 2 +- drivers/soc/ti/wkup_m3_ipc.c | 2 +- drivers/soc/xilinx/xlnx_event_manager.c | 2 +- drivers/soc/xilinx/zynqmp_power.c | 2 +- drivers/spi/spi-airoha-snfi.c | 25 +- drivers/spi/spi-ch341.c | 2 +- drivers/spi/spi-tegra210-quad.c | 22 +- drivers/staging/fbtft/fbtft-core.c | 4 +- drivers/target/target_core_configfs.c | 1 - drivers/ufs/core/ufshcd.c | 2 +- drivers/uio/uio_fsl_elbc_gpcm.c | 7 + drivers/usb/core/message.c | 2 +- drivers/usb/dwc2/platform.c | 16 +- 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/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/vhost.c | 4 +- drivers/video/backlight/led_bl.c | 13 + drivers/video/fbdev/ssd1307fb.c | 4 +- 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/ctree.c | 2 +- fs/dcache.c | 46 -- fs/erofs/super.c | 16 + fs/ext4/mballoc.c | 49 +- fs/ext4/move_extent.c | 2 +- fs/f2fs/debug.c | 3 + fs/f2fs/f2fs.h | 20 +- fs/f2fs/file.c | 77 ++- fs/f2fs/gc.c | 21 +- fs/f2fs/gc.h | 2 + fs/f2fs/inode.c | 14 + fs/f2fs/shrinker.c | 90 +++ fs/f2fs/super.c | 8 +- fs/f2fs/sysfs.c | 101 +++ 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 | 79 ++- fs/kernfs/dir.c | 5 +- fs/nfs/client.c | 21 +- fs/nfs/dir.c | 27 +- fs/nfs/inode.c | 2 +- fs/nfs/internal.h | 3 +- fs/nfs/namespace.c | 11 +- fs/nfs/nfs4client.c | 18 +- fs/nfs/nfs4proc.c | 29 +- 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/move_extents.c | 8 +- fs/smb/client/smb2pdu.c | 2 +- fs/tracefs/event_inode.c | 3 +- include/dt-bindings/clock/qcom,x1e80100-gcc.h | 63 ++ include/linux/blk_types.h | 5 +- include/linux/blkdev.h | 2 +- include/linux/coresight.h | 25 +- include/linux/cper.h | 12 +- include/linux/dcache.h | 1 - include/linux/filter.h | 12 +- include/linux/firmware/qcom/qcom_tzmem.h | 15 +- include/linux/ieee80211.h | 4 +- include/linux/if_hsr.h | 26 + include/linux/nfs_fs_sb.h | 7 +- include/linux/nfs_xdr.h | 54 +- include/linux/perf_event.h | 2 +- include/linux/platform_data/lp855x.h | 4 +- include/linux/ras.h | 16 +- include/linux/rculist_nulls.h | 59 ++ include/linux/vfio_pci_core.h | 10 +- include/linux/virtio_config.h | 8 +- include/net/dst.h | 16 +- include/net/netfilter/nf_conntrack_count.h | 15 +- include/net/sock.h | 13 + include/ras/ras_event.h | 49 +- include/uapi/sound/asound.h | 2 +- kernel/bpf/hashtab.c | 10 +- kernel/bpf/stackmap.c | 66 +- kernel/bpf/syscall.c | 3 + kernel/bpf/trampoline.c | 4 +- kernel/cgroup/cpuset.c | 35 +- kernel/dma/pool.c | 2 +- kernel/events/callchain.c | 12 +- kernel/events/core.c | 2 +- kernel/locking/locktorture.c | 8 +- kernel/resource.c | 46 +- kernel/sched/fair.c | 17 +- kernel/task_work.c | 8 +- lib/vsprintf.c | 6 +- net/core/dst.c | 2 +- net/core/filter.c | 9 +- net/hsr/hsr_device.c | 33 + net/hsr/hsr_main.h | 10 +- net/hsr/hsr_slave.c | 12 +- net/ipv4/inet_hashtables.c | 8 +- net/ipv4/inet_timewait_sock.c | 35 +- net/ipv4/route.c | 4 +- net/ipv4/tcp_metrics.c | 6 +- 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 +- 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/isa/wavefront/wavefront_synth.c | 4 +- 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 +- tools/include/nolibc/stdio.h | 4 + tools/lib/bpf/btf.c | 4 +- tools/objtool/check.c | 3 +- tools/objtool/elf.c | 8 +- tools/perf/builtin-record.c | 2 +- tools/perf/util/annotate.c | 2 +- .../util/arm-spe-decoder/arm-spe-pkt-decoder.c | 37 +- .../util/arm-spe-decoder/arm-spe-pkt-decoder.h | 26 +- tools/perf/util/bpf_lock_contention.c | 6 +- tools/perf/util/hist.c | 6 +- tools/perf/util/symbol.c | 5 +- .../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 + .../testing/selftests/drivers/net/bonding/Makefile | 2 +- .../selftests/drivers/net/bonding/bond_macvlan.sh | 99 --- .../drivers/net/bonding/bond_macvlan_ipvlan.sh | 97 +++ tools/testing/selftests/drivers/net/bonding/config | 1 + 412 files changed, 4306 insertions(+), 1929 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/354 smack: deduplicate "does access rule request transmutation"
6.12-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
@@ -979,6 +979,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
@@ -994,23 +1012,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,
@@ -1018,9 +1032,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;/*
@@ -1029,8 +1041,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,
@@ -1050,11 +1062,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 ; }
@@ -4904,7 +4918,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
@@ -4918,18 +4931,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/354 smack: fix bug: SMACK64TRANSMUTE set on non-directory
In reply to Greg Kroah-Hartman6.12-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
@@ -1044,18 +1044,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/354 smack: deduplicate xattr setting in smack_inode_init_security()
In reply to Greg Kroah-Hartman6.12-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
@@ -997,6 +997,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
@@ -1014,7 +1032,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;
@@ -1033,8 +1050,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
@@ -1046,35 +1061,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/354 smack: always "instantiate" inode in smack_inode_init_security()
In reply to Greg Kroah-Hartman6.12-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
@@ -1032,6 +1032,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;
@@ -1060,18 +1062,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/354 smack: fix bug: invalid label of unix socket file
In reply to Greg Kroah-Hartman6.12-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/354 smack: fix bug: unprivileged task can create labels
In reply to Greg Kroah-Hartman6.12-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
@@ -3786,8 +3786,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 ;
@@ -3798,28 +3798,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/354 smack: fix bug: setting task label silently ignores input garbage
In reply to Greg Kroah-Hartman6.12-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
@@ -285,9 +285,12 @@ int smk_tskacc(struct task_smack *, struct smack_known *, u32, struct smk_audit_info *);int smk_curacc (struct smack_known *,u32 ,struct smk_audit_info *);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/354 gpu: host1x: Fix race in syncpt alloc/free
In reply to Greg Kroah-Hartman6.12-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/354 accel/ivpu: Prevent runtime suspend during context abort work
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrzej Kacprowski <[email protected]>
[ Upstream commit 7806bad76ac397a767f0c369534133c71c73b157 ]
Increment the runtime PM counter when entering ivpu_context_abort_work_fn() to prevent the device from suspending while the function is executing.
Stable-dep-of: 9f6c63285737 ("accel/ivpu: Ensure rpm_runtime_put in case of engine reset/resume fail")
--- drivers/accel/ivpu/ivpu_job.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/accel/ivpu/ivpu_job.c +9 -1
@@ -8,6 +8,7 @@#include <linux/bitfield.h> #include <linux/highmem.h> #include <linux/pci.h> +#include <linux/pm_runtime.h> #include <linux/module.h> #include <uapi/drm/ivpu_accel.h>
@@ -848,6 +849,9 @@ void ivpu_context_abort_thread_handler(struct work_struct *work)struct ivpu_job *job;unsigned long id; +if (drm_WARN_ON (&vdev->drm,pm_runtime_get_if_active (vdev->drm.dev) <=0 )) +return ; +if (vdev->fw->sched_mode ==VPU_SCHEDULING_MODE_HW )if (ivpu_jsm_reset_engine (vdev,0 ))return ;
@@ -864,7 +868,7 @@ void ivpu_context_abort_thread_handler(struct work_struct *work)mutex_unlock (&vdev->context_list_lock);if (vdev->fw->sched_mode !=VPU_SCHEDULING_MODE_HW ) -return ; + goto runtime_put;if (ivpu_jsm_hws_resume_engine (vdev,0 ))return ;
@@ -878,4 +882,8 @@ void ivpu_context_abort_thread_handler(struct work_struct *work)if (job->file_priv->aborted)ivpu_job_signal_and_destroy (vdev, job->job_id,DRM_IVPU_JOB_STATUS_ABORTED );mutex_unlock (&vdev->submitted_jobs_lock); + +runtime_put: +pm_runtime_mark_last_busy (vdev->drm.dev); +pm_runtime_put_autosuspend (vdev->drm.dev); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 10/354 accel/ivpu: Ensure rpm_runtime_put in case of engine reset/resume fail
In reply to Greg Kroah-Hartman6.12-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
@@ -854,7 +854,7 @@ void ivpu_context_abort_thread_handler(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) {
@@ -871,7 +871,7 @@ void ivpu_context_abort_thread_handler(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 11/354 drm/panel: visionox-rm69299: Dont clear all mode flags
In reply to Greg Kroah-Hartman6.12-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
@@ -62,7 +62,7 @@ static int visionox_rm69299_unprepare(struct drm_panel *panel)struct visionox_rm69299 *ctx =panel_to_ctx (panel);int ret; - ctx->dsi->mode_flags =0 ; + ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM ; ret =mipi_dsi_dcs_write (ctx->dsi,MIPI_DCS_SET_DISPLAY_OFF ,NULL ,0 );if (ret <0 )
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 12/354 accel/ivpu: Make function parameter names consistent
In reply to Greg Kroah-Hartman6.12-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
@@ -44,7 +44,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
@@ -35,7 +35,7 @@ u32 ivpu_hw_btrs_dpu_max_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 13/354 accel/ivpu: Fix DCT active percent format
In reply to Greg Kroah-Hartman6.12-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
@@ -759,7 +759,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
@@ -35,7 +35,7 @@ u32 ivpu_hw_btrs_dpu_max_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
@@ -466,6 +466,11 @@ void ivpu_pm_dct_irq_thread_handler(struct ivpu_device *vdev)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 14/354 drm/vgem-fence: Fix potential deadlock on release
In reply to Greg Kroah-Hartman6.12-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
@@ -94,7 +94,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 15/354 USB: Fix descriptor count when handling invalid MBIM extended descriptor
In reply to Greg Kroah-Hartman6.12-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 16/354 pinctrl: renesas: rzg2l: Fix PMC restore
In reply to Greg Kroah-Hartman6.12-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
@@ -2807,7 +2807,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 17/354 clk: renesas: cpg-mssr: Add missing 1ms delay into reset toggle callback
In reply to Greg Kroah-Hartman6.12-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
@@ -630,8 +630,15 @@ static int cpg_mssr_reset(struct reset_controller_dev *rcdev,/* Reset module */ writel (bitmask, priv->base + 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->base + priv->reset_clear_regs[reg]);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 18/354 clk: renesas: Use str_on_off() helper
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit aff664cc8cbc5c28e5aa57dc4201c34497f3c871 ]
Use the str_on_off() helper instead of open-coding the same operation. Note that this does change the case of the flags, which doesn't matter much for debug messages.
Stable-dep-of: b91401af6c00 ("clk: renesas: cpg-mssr: Read back reset registers to assure values latched")
--- drivers/clk/renesas/renesas-cpg-mssr.c | 3 ++- drivers/clk/renesas/rzg2l-cpg.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/clk/renesas/renesas-cpg-mssr.c +2 -1
@@ -27,6 +27,7 @@#include <linux/psci.h> #include <linux/reset-controller.h> #include <linux/slab.h> +#include <linux/string_choices.h> #include <dt-bindings/clock/renesas-cpg-mssr.h>
@@ -205,7 +206,7 @@ static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable)int error;dev_dbg (dev,"MSTP %u%02u/%pC %s\n" , reg, bit, hw->clk, - enable ?"ON" :"OFF" ); +str_on_off (enable));spin_lock_irqsave (&priv->rmw_lock, flags);if (priv->reg_layout ==CLK_REG_LAYOUT_RZ_A ) {
drivers/clk/renesas/rzg2l-cpg.c +2 -1
@@ -27,6 +27,7 @@#include <linux/pm_domain.h> #include <linux/reset-controller.h> #include <linux/slab.h> +#include <linux/string_choices.h> #include <linux/units.h> #include <dt-bindings/clock/renesas-cpg-mssr.h>
@@ -1222,7 +1223,7 @@ static int rzg2l_mod_clock_endisable(struct clk_hw *hw, bool enable) }dev_dbg (dev,"CLK_ON 0x%x/%pC %s\n" ,CLK_ON_R (reg), hw->clk, - enable ?"ON" :"OFF" ); +str_on_off (enable)); value = bitmask <<16 ;if (enable)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 19/354 clk: renesas: Pass sub struct of cpg_mssr_priv to cpg_clk_register
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thierry Bultel <[email protected]>
[ Upstream commit 3d37ca1482c36975255f29911a529f84f1bc34a9 ]
In a subsequent patch, the registration callback will need more parameters from cpg_mssr_priv (like another base address with clock controllers with double register block, and also, notifiers and rmw_lock). Instead of adding more parameters, move the needed parameters to a public sub-struct.
Instead moving clks to this structure, which would have implied to add an allocation (and cleanup) for it, keep the way the allocation is done and just have a copy of the pointer in the public structure.
Stable-dep-of: b91401af6c00 ("clk: renesas: cpg-mssr: Read back reset registers to assure values latched")
--- drivers/clk/renesas/r7s9210-cpg-mssr.c | 7 +- drivers/clk/renesas/r8a77970-cpg-mssr.c | 8 +- drivers/clk/renesas/rcar-gen2-cpg.c | 5 +- drivers/clk/renesas/rcar-gen2-cpg.h | 3 +- drivers/clk/renesas/rcar-gen3-cpg.c | 6 +- drivers/clk/renesas/rcar-gen3-cpg.h | 3 +- drivers/clk/renesas/rcar-gen4-cpg.c | 6 +- drivers/clk/renesas/rcar-gen4-cpg.h | 3 +- drivers/clk/renesas/renesas-cpg-mssr.c | 98 ++++++++++++------------- drivers/clk/renesas/renesas-cpg-mssr.h | 20 ++++- 10 files changed, 88 insertions(+), 71 deletions(-)
drivers/clk/renesas/r7s9210-cpg-mssr.c +4 -3
@@ -159,12 +159,13 @@ static void __init r7s9210_update_clk_table(struct clk *extal_clk,static struct clk *__init rza2_cpg_clk_register (struct device *dev,const struct cpg_core_clk *core,const struct cpg_mssr_info *info, -struct clk **clks,void __iomem *base, -struct raw_notifier_head *notifiers) +struct cpg_mssr_pub *pub) { -struct clk *parent; +void __iomem *base = pub->base0; +struct clk **clks = pub->clks;unsigned int mult =1 ;unsigned int div =1 ; +struct clk *parent; parent = clks[core->parent];if (IS_ERR (parent))
drivers/clk/renesas/r8a77970-cpg-mssr.c +4 -4
@@ -219,10 +219,11 @@ static int __init r8a77970_cpg_mssr_init(struct device *dev)static struct clk *__init r8a77970_cpg_clk_register (struct device *dev,const struct cpg_core_clk *core,const struct cpg_mssr_info *info, -struct clk **clks,void __iomem *base, -struct raw_notifier_head *notifiers) +struct cpg_mssr_pub *pub) {const struct clk_div_table *table; +void __iomem *base = pub->base0; +struct clk **clks = pub->clks;const struct clk *parent;unsigned int shift;
@@ -236,8 +237,7 @@ static struct clk * __init r8a77970_cpg_clk_register(struct device *dev, shift =4 ;break ;default : -return rcar_gen3_cpg_clk_register (dev, core, info, clks, base, - notifiers); +return rcar_gen3_cpg_clk_register (dev, core, info, pub); } parent = clks[core->parent];
drivers/clk/renesas/rcar-gen2-cpg.c +3 -2
@@ -274,10 +274,11 @@ static const struct soc_device_attribute cpg_quirks_match[] __initconst = {struct clk *__init rcar_gen2_cpg_clk_register (struct device *dev,const struct cpg_core_clk *core,const struct cpg_mssr_info *info, -struct clk **clks,void __iomem *base, -struct raw_notifier_head *notifiers) +struct cpg_mssr_pub *pub) {const struct clk_div_table *table =NULL ; +void __iomem *base = pub->base0; +struct clk **clks = pub->clks;const struct clk *parent;const char *parent_name;unsigned int mult =1 ;
drivers/clk/renesas/rcar-gen2-cpg.h +1 -2
@@ -32,8 +32,7 @@ struct rcar_gen2_cpg_pll_config {struct clk *rcar_gen2_cpg_clk_register (struct device *dev,const struct cpg_core_clk *core,const struct cpg_mssr_info *info, -struct clk **clks,void __iomem *base, -struct raw_notifier_head *notifiers); +struct cpg_mssr_pub *pub);int rcar_gen2_cpg_init (const struct rcar_gen2_cpg_pll_config *config,unsigned int pll0_div,u32 mode);
drivers/clk/renesas/rcar-gen3-cpg.c +4 -2
@@ -346,9 +346,11 @@ static const struct soc_device_attribute cpg_quirks_match[] __initconst = {struct clk *__init rcar_gen3_cpg_clk_register (struct device *dev,const struct cpg_core_clk *core,const struct cpg_mssr_info *info, -struct clk **clks,void __iomem *base, -struct raw_notifier_head *notifiers) +struct cpg_mssr_pub *pub) { +struct raw_notifier_head *notifiers = &pub->notifiers; +void __iomem *base = pub->base0; +struct clk **clks = pub->clks;const struct clk *parent;unsigned int mult =1 ;unsigned int div =1 ;
drivers/clk/renesas/rcar-gen3-cpg.h +1 -2
@@ -81,8 +81,7 @@ struct rcar_gen3_cpg_pll_config {struct clk *rcar_gen3_cpg_clk_register (struct device *dev,const struct cpg_core_clk *core,const struct cpg_mssr_info *info, -struct clk **clks,void __iomem *base, -struct raw_notifier_head *notifiers); +struct cpg_mssr_pub *pub);int rcar_gen3_cpg_init (const struct rcar_gen3_cpg_pll_config *config,unsigned int clk_extalr,u32 mode);
drivers/clk/renesas/rcar-gen4-cpg.c +4 -2
@@ -418,9 +418,11 @@ static const struct clk_div_table cpg_rpcsrc_div_table[] = {struct clk *__init rcar_gen4_cpg_clk_register (struct device *dev,const struct cpg_core_clk *core,const struct cpg_mssr_info *info, -struct clk **clks,void __iomem *base, -struct raw_notifier_head *notifiers) +struct cpg_mssr_pub *pub) { +struct raw_notifier_head *notifiers = &pub->notifiers; +void __iomem *base = pub->base0; +struct clk **clks = pub->clks;const struct clk *parent;unsigned int mult =1 ;unsigned int div =1 ;
drivers/clk/renesas/rcar-gen4-cpg.h +1 -2
@@ -78,8 +78,7 @@ struct rcar_gen4_cpg_pll_config {struct clk *rcar_gen4_cpg_clk_register (struct device *dev,const struct cpg_core_clk *core,const struct cpg_mssr_info *info, -struct clk **clks,void __iomem *base, -struct raw_notifier_head *notifiers); +struct cpg_mssr_pub *pub);int rcar_gen4_cpg_init (const struct rcar_gen4_cpg_pll_config *config,unsigned int clk_extalr,u32 mode);
drivers/clk/renesas/renesas-cpg-mssr.c +48 -50
299 lines not on this page · raw message
drivers/clk/renesas/renesas-cpg-mssr.h +18 -2
@@ -8,6 +8,8 @@#ifndef __CLK_RENESAS_CPG_MSSR_H__#define __CLK_RENESAS_CPG_MSSR_H__ +#include <linux/notifier.h> +/* * Definitions of CPG Core Clocks *
@@ -29,6 +31,21 @@ struct cpg_core_clk {unsigned int offset; }; +/** +* struct cpg_mssr_pub - data shared with device-specific clk registration code +* +* @base0: CPG/MSSR register block base0 address +* @notifiers: Notifier chain to save/restore clock state for system resume +* @rmw_lock: protects RMW register accesses +* @clks: pointer to clocks +*/ +struct cpg_mssr_pub { +void __iomem *base0; +struct raw_notifier_head notifiers; +spinlock_t rmw_lock; +struct clk **clks; +}; +enum clk_types {/* Generic */ CLK_TYPE_IN ,/* External Clock Input */
@@ -153,8 +170,7 @@ struct cpg_mssr_info {struct clk *(*cpg_clk_register)(struct device *dev,const struct cpg_core_clk *core,const struct cpg_mssr_info *info, -struct clk **clks,void __iomem *base, -struct raw_notifier_head *notifiers); +struct cpg_mssr_pub *pub); };extern const struct cpg_mssr_info r7s9210_cpg_mssr_info;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 20/354 clk: renesas: cpg-mssr: Read back reset registers to assure values latched
In reply to Greg Kroah-Hartman6.12-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
@@ -615,18 +615,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.
@@ -639,36 +653,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 21/354 drm: atmel-hlcdc: fix atmel_xlcdc_plane_setup_scaler()
In reply to Greg Kroah-Hartman6.12-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 22/354 HID: logitech-hidpp: Do not assume FAP in hidpp_send_message_sync()
In reply to Greg Kroah-Hartman6.12-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 23/354 objtool: Fix standalone --hacks=jump_label
In reply to Greg Kroah-Hartman6.12-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
@@ -2671,7 +2671,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 24/354 objtool: Fix weak symbol detection
In reply to Greg Kroah-Hartman6.12-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 ; }
@@ -408,7 +407,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 25/354 wifi: ath10k: Avoid vdev delete timeout when firmware is already down
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Loic Poulain <[email protected]>
[ Upstream commit dc9c4252fe0d7a7f1ee904405ea91534277305bf ]
In some scenarios, the firmware may be stopped before the interface is removed, either due to a crash or because the remoteproc (e.g., MPSS) is shut down early during system reboot or shutdown.
This leads to a delay during interface teardown, as the driver waits for a vdev delete response that never arrives, eventually timing out.
Example (SNOC):
$ echo stop > /sys/class/remoteproc/remoteproc0/state [ 71.64] remoteproc remoteproc0: stopped remote processor modem $ reboot [ 74.84] ath10k_snoc c800000.wifi: failed to transmit packet, dropping: -108 [ 74.84] ath10k_snoc c800000.wifi: failed to submit frame: -108 [...] [ 82.39] ath10k_snoc c800000.wifi: Timeout in receiving vdev delete response
To avoid this, skip waiting for the vdev delete response if the firmware is already marked as unreachable (ATH10K_FLAG_CRASH_FLUSH), similar to how ath10k_mac_wait_tx_complete() and ath10k_vdev_setup_sync() handle this case.
Stable-dep-of: f35a07a4842a ("wifi: ath10k: move recovery check logic into a new work")
--- drivers/net/wireless/ath/ath10k/mac.c | 33 ++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ath10k/mac.c +25 -8
@@ -4,6 +4,7 @@* 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. */ #include "mac.h"
@@ -1030,6 +1031,26 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar)return ar->last_wmi_vdev_start_status; } +static inline int ath10k_vdev_delete_sync (struct ath10k *ar) +{ +unsigned long time_left; + +lockdep_assert_held (&ar->conf_mutex); + +if (!test_bit (WMI_SERVICE_SYNC_DELETE_CMDS , ar->wmi.svc_map)) +return 0 ; + +if (test_bit (ATH10K_FLAG_CRASH_FLUSH , &ar->dev_flags)) +return -ESHUTDOWN ; + + time_left =wait_for_completion_timeout (&ar->vdev_delete_done, +ATH10K_VDEV_DELETE_TIMEOUT_HZ ); +if (time_left ==0 ) +return -ETIMEDOUT ; + +return 0 ; +} +static int ath10k_monitor_vdev_start (struct ath10k *ar,int vdev_id) {struct cfg80211_chan_def *chandef =NULL ;
@@ -5908,7 +5929,6 @@ static void ath10k_remove_interface(struct ieee80211_hw *hw,struct ath10k *ar = hw->priv;struct ath10k_vif *arvif = (void *)vif->drv_priv;struct ath10k_peer *peer; -unsigned long time_left;int ret;int i;
@@ -5948,13 +5968,10 @@ static void ath10k_remove_interface(struct ieee80211_hw *hw,ath10k_warn (ar,"failed to delete WMI vdev %i: %d\n" , arvif->vdev_id, ret); -if (test_bit (WMI_SERVICE_SYNC_DELETE_CMDS , ar->wmi.svc_map)) { - time_left =wait_for_completion_timeout (&ar->vdev_delete_done, -ATH10K_VDEV_DELETE_TIMEOUT_HZ ); -if (time_left ==0 ) { -ath10k_warn (ar,"Timeout in receiving vdev delete response\n" ); - goto out; - } + ret =ath10k_vdev_delete_sync (ar); +if (ret) { +ath10k_warn (ar,"Error in receiving vdev delete response: %d\n" , ret); + goto out; }/* Some firmware revisions don't notify host about self-peer removal
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 26/354 wifi: ath10k: Add missing include of export.h
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Johnson <[email protected]>
[ Upstream commit 32c3a0f8894311c743b2a6a15b50b13d01411ce1 ]
Commit a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1") introduced a new check that is producing the following warnings:
drivers/net/wireless/ath/ath10k/bmi.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/net/wireless/ath/ath10k/ce.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/net/wireless/ath/ath10k/core.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/net/wireless/ath/ath10k/coredump.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/net/wireless/ath/ath10k/debug.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/net/wireless/ath/ath10k/htc.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/net/wireless/ath/ath10k/htt_rx.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/net/wireless/ath/ath10k/htt_tx.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/net/wireless/ath/ath10k/mac.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/net/wireless/ath/ath10k/trace.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing
Add the missing #include to satisfy the check.
Stable-dep-of: f35a07a4842a ("wifi: ath10k: move recovery check logic into a new work")
--- drivers/net/wireless/ath/ath10k/bmi.c | 2 ++ drivers/net/wireless/ath/ath10k/ce.c | 2 ++ drivers/net/wireless/ath/ath10k/core.c | 2 ++ drivers/net/wireless/ath/ath10k/coredump.c | 2 ++ drivers/net/wireless/ath/ath10k/debug.c | 2 ++ drivers/net/wireless/ath/ath10k/htc.c | 3 +++ drivers/net/wireless/ath/ath10k/htt_rx.c | 3 +++ drivers/net/wireless/ath/ath10k/htt_tx.c | 2 ++ drivers/net/wireless/ath/ath10k/mac.c | 1 + drivers/net/wireless/ath/ath10k/trace.c | 2 ++ 10 files changed, 21 insertions(+)
drivers/net/wireless/ath/ath10k/bmi.c +2 -0
@@ -3,8 +3,10 @@* Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2014,2016-2017 Qualcomm Atheros, Inc. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ +#include <linux/export.h> #include "bmi.h" #include "hif.h" #include "debug.h"
drivers/net/wireless/ath/ath10k/ce.c +2 -0
@@ -4,8 +4,10 @@* Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018 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. */ +#include <linux/export.h> #include "hif.h" #include "ce.h" #include "debug.h"
drivers/net/wireless/ath/ath10k/core.c +2 -0
@@ -4,8 +4,10 @@* 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. */ +#include <linux/export.h> #include <linux/module.h> #include <linux/firmware.h> #include <linux/of.h>
drivers/net/wireless/ath/ath10k/coredump.c +2 -0
@@ -3,11 +3,13 @@* Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018, 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. */ #include "coredump.h" #include <linux/devcoredump.h> +#include <linux/export.h> #include <linux/kernel.h> #include <linux/types.h> #include <linux/utsname.h>
drivers/net/wireless/ath/ath10k/debug.c +2 -0
@@ -4,10 +4,12 @@* Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018, The Linux Foundation. All rights reserved. * Copyright (c) 2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/module.h> #include <linux/debugfs.h> +#include <linux/export.h> #include <linux/vmalloc.h> #include <linux/crc32.h> #include <linux/firmware.h>
drivers/net/wireless/ath/ath10k/htc.c +3 -0
@@ -3,8 +3,11 @@* Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ +#include <linux/export.h> +#include "core.h" #include "hif.h" #include "debug.h"
drivers/net/wireless/ath/ath10k/htt_rx.c +3 -0
@@ -4,8 +4,11 @@* Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018, 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. */ +#include <linux/export.h> +#include "core.h" #include "htc.h" #include "htt.h"
drivers/net/wireless/ath/ath10k/htt_tx.c +2 -0
@@ -3,8 +3,10 @@* Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ +#include <linux/export.h> #include <linux/etherdevice.h> #include "htt.h" #include "mac.h"
drivers/net/wireless/ath/ath10k/mac.c +1 -0
@@ -9,6 +9,7 @@#include "mac.h" +#include <linux/export.h> #include <net/cfg80211.h> #include <net/mac80211.h> #include <linux/etherdevice.h>
drivers/net/wireless/ath/ath10k/trace.c +2 -0
@@ -1,8 +1,10 @@// SPDX-License-Identifier: ISC /* * Copyright (c) 2012 Qualcomm Atheros, Inc. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ +#include <linux/export.h> #include <linux/module.h> #define CREATE_TRACE_POINTS
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 27/354 wifi: ath10k: move recovery check logic into a new work
In reply to Greg Kroah-Hartman6.12-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. */
@@ -2486,8 +2485,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,
@@ -2497,7 +2497,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);
@@ -2511,27 +2511,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);
@@ -3727,6 +3724,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. */
@@ -5426,6 +5425,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 28/354 wifi: ath11k: restore register window after global reset
In reply to Greg Kroah-Hartman6.12-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>
@@ -175,6 +175,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;
@@ -199,6 +212,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 29/354 sched/fair: Forfeit vruntime on yield
In reply to Greg Kroah-Hartman6.12-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
@@ -9151,7 +9151,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 30/354 irqchip/irq-bcm7038-l1: Fix section mismatch
In reply to Greg Kroah-Hartman6.12-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 31/354 irqchip/irq-bcm7120-l2: Fix section mismatch
In reply to Greg Kroah-Hartman6.12-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
@@ -147,8 +147,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;
@@ -181,8 +180,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;
@@ -212,10 +210,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 ;
@@ -343,15 +340,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 32/354 irqchip/irq-brcmstb-l2: Fix section mismatch
In reply to Greg Kroah-Hartman6.12-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
@@ -168,10 +168,8 @@ static void brcmstb_l2_intc_resume(struct irq_data *d)irq_gc_unlock_irqrestore (gc, flags); } -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 ;
@@ -287,14 +285,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 33/354 irqchip/imx-mu-msi: Fix section mismatch
In reply to Greg Kroah-Hartman6.12-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
@@ -295,9 +295,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;
@@ -415,20 +414,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 34/354 irqchip/renesas-rzg2l: Fix section mismatch
In reply to Greg Kroah-Hartman6.12-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
@@ -613,14 +613,12 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node *return ret; } -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 35/354 irqchip/starfive-jh8100: Fix section mismatch
In reply to Greg Kroah-Hartman6.12-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 36/354 irqchip/qcom-irq-combiner: Fix section mismatch
In reply to Greg Kroah-Hartman6.12-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 37/354 crypto: authenc - Correctly pass EINPROGRESS back up to the caller
In reply to Greg Kroah-Hartman6.12-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
@@ -39,7 +39,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); }
@@ -109,27 +109,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);
@@ -138,6 +153,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;
@@ -145,7 +161,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)
@@ -161,12 +178,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); }
@@ -219,11 +235,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);
@@ -234,6 +257,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;
@@ -250,7 +274,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);
@@ -261,12 +287,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); }
@@ -293,7 +318,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 38/354 ntfs3: fix uninit memory after failed mi_read in mi_format_new
In reply to Greg Kroah-Hartman6.12-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
@@ -1373,7 +1373,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 39/354 ntfs3: Fix uninit buffer allocated by __getname()
In reply to Greg Kroah-Hartman6.12-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
@@ -1736,6 +1736,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 40/354 dt-bindings: clock: qcom,x1e80100-gcc: Add missing video resets
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephan Gerhold <[email protected]>
[ Upstream commit d0b706509fb04449add5446e51a494bfeadcac10 ]
Add the missing video resets that are needed for the iris video codec.
Stable-dep-of: 8abe970efea5 ("clk: qcom: gcc-x1e80100: Add missing USB4 clocks/resets")
--- include/dt-bindings/clock/qcom,x1e80100-gcc.h | 2 ++ 1 file changed, 2 insertions(+)
include/dt-bindings/clock/qcom,x1e80100-gcc.h +2 -0
@@ -482,4 +482,6 @@#define GCC_USB_1_PHY_BCR 85#define GCC_USB_2_PHY_BCR 86#define GCC_VIDEO_BCR 87 +#define GCC_VIDEO_AXI0_CLK_ARES 88 +#define GCC_VIDEO_AXI1_CLK_ARES 89#endif
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 41/354 dt-bindings: clock: qcom,x1e80100-gcc: Add missing USB4 clocks/resets
In reply to Greg Kroah-Hartman6.12-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
@@ -28,9 +28,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:
@@ -63,7 +90,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 42/354 clk: qcom: gcc-x1e80100: Add missing USB4 clocks/resets
In reply to Greg Kroah-Hartman6.12-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 43/354 rculist: Add hlist_nulls_replace_rcu() and hlist_nulls_replace_init_rcu()
In reply to Greg Kroah-Hartman6.12-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 44/354 inet: Avoid ehash lookup race in inet_ehash_insert()
In reply to Greg Kroah-Hartman6.12-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
@@ -829,6 +829,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
@@ -671,8 +671,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;
@@ -681,6 +684,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 45/354 inet: Avoid ehash lookup race in inet_twsk_hashdance_schedule()
In reply to Greg Kroah-Hartman6.12-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 46/354 iio: imu: st_lsm6dsx: Fix measurement unit for odr struct member
In reply to Greg Kroah-Hartman6.12-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 47/354 firmware: qcom: tzmem: fix qcom_tzmem_policy kernel-doc
In reply to Greg Kroah-Hartman6.12-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 48/354 block/mq-deadline: Introduce dd_start_request()
In reply to Greg Kroah-Hartman6.12-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 49/354 block/mq-deadline: Switch back to a single dispatch list
In reply to Greg Kroah-Hartman6.12-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;
@@ -577,10 +574,10 @@ static int dd_init_sched(struct request_queue *q, struct elevator_type *e) 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 ;
@@ -687,7 +684,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 {struct list_head *insert_before;
@@ -757,8 +754,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 ]); }
@@ -767,6 +763,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;
@@ -975,49 +974,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, \
@@ -1040,9 +1029,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 50/354 arm64: dts: freescale: imx8mp-venice-gw7905-2x: remove duplicate usdhc1 props
In reply to Greg Kroah-Hartman6.12-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
@@ -421,9 +421,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 51/354 arm64: dts: imx8mm-venice-gw72xx: remove unused sdhc1 pinctrl
In reply to Greg Kroah-Hartman6.12-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 52/354 arm64: dts: imx8mp-venice-gw702x: remove off-board uart
In reply to Greg Kroah-Hartman6.12-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
@@ -393,13 +393,6 @@ &i2c3 { status = "okay"; }; -/* off-board header */ -&uart1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart1>; - status = "okay"; -}; - /* console */ &uart2 { pinctrl-names = "default";
@@ -407,13 +400,6 @@ &uart2 { status = "okay"; }; -/* off-board header */ -&uart3 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart3>; - status = "okay"; -}; - /* off-board */ &usdhc1 { pinctrl-names = "default";
@@ -516,13 +502,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
@@ -530,13 +509,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 53/354 arm64: dts: imx8mp-venice-gw702x: remove off-board sdhc1
In reply to Greg Kroah-Hartman6.12-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
@@ -400,15 +400,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";
@@ -509,17 +500,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 54/354 perf annotate: Check return value of evsel__get_arch() properly
In reply to Greg Kroah-Hartman6.12-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
@@ -974,7 +974,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 55/354 arm64: dts: exynos: gs101: fix sysreg_apm reg property
In reply to Greg Kroah-Hartman6.12-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
@@ -1390,9 +1390,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 56/354 PCI: rcar-gen2: Drop ARM dependency from PCI_RCAR_GEN2
In reply to Greg Kroah-Hartman6.12-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
@@ -249,12 +249,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 57/354 uio: uio_fsl_elbc_gpcm:: Add null pointer check to uio_fsl_elbc_gpcm_probe
In reply to Greg Kroah-Hartman6.12-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 58/354 clk: qcom: camcc-sm8550: Specify Titan GDSC power domain as a parent to other
In reply to Greg Kroah-Hartman6.12-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
@@ -3192,6 +3192,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 ,
@@ -3201,6 +3203,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, };
@@ -3213,6 +3216,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, };
@@ -3225,6 +3229,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, };
@@ -3237,6 +3242,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, };
@@ -3249,6 +3255,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, };
@@ -3261,6 +3268,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, };
@@ -3273,6 +3281,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, };
@@ -3285,6 +3294,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 59/354 clk: qcom: camcc-sm6350: Specify Titan GDSC power domain as a parent to other
In reply to Greg Kroah-Hartman6.12-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
@@ -1692,6 +1692,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 ,
@@ -1701,6 +1703,7 @@ static struct gdsc bps_gdsc = { .name = "bps_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, .flags = VOTABLE, };
@@ -1713,6 +1716,7 @@ static struct gdsc ipe_0_gdsc = { .name = "ipe_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, .flags = VOTABLE, };
@@ -1725,6 +1729,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 = {
@@ -1736,6 +1741,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 = {
@@ -1747,6 +1753,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 60/354 clk: qcom: camcc-sm6350: Fix PLL config of PLL2
In reply to Greg Kroah-Hartman6.12-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
@@ -144,15 +144,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 61/354 clk: qcom: camcc-sm7150: Fix PLL config of PLL2
In reply to Greg Kroah-Hartman6.12-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
@@ -140,13 +140,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 62/354 soc: Switch back to struct platform_driver::remove()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König <[email protected]>
[ Upstream commit 511c06e3903563dba4472430e1b586745b6ae238 ]
After commit 0edb555a65d1 ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers.
Convert all platform drivers below drivers/soc to use .remove(), with the eventual goal to drop struct platform_driver::remove_new(). As .remove() and .remove_new() have the same prototypes, conversion is done by just changing the structure member name in the driver initializer.
On the way do a few whitespace changes to make indention consistent.
Stable-dep-of: 2286e18e3937 ("soc: qcom: gsbi: fix double disable caused by devm")
--- drivers/soc/aspeed/aspeed-lpc-ctrl.c | 2 +- drivers/soc/aspeed/aspeed-lpc-snoop.c | 2 +- drivers/soc/aspeed/aspeed-p2a-ctrl.c | 2 +- drivers/soc/aspeed/aspeed-uart-routing.c | 2 +- drivers/soc/fsl/dpaa2-console.c | 2 +- drivers/soc/fsl/qe/qmc.c | 2 +- drivers/soc/fsl/qe/tsa.c | 2 +- drivers/soc/fujitsu/a64fx-diag.c | 2 +- drivers/soc/hisilicon/kunpeng_hccs.c | 2 +- drivers/soc/ixp4xx/ixp4xx-npe.c | 2 +- drivers/soc/ixp4xx/ixp4xx-qmgr.c | 2 +- drivers/soc/litex/litex_soc_ctrl.c | 2 +- drivers/soc/loongson/loongson2_guts.c | 2 +- drivers/soc/mediatek/mtk-devapc.c | 2 +- drivers/soc/mediatek/mtk-mmsys.c | 2 +- drivers/soc/mediatek/mtk-socinfo.c | 2 +- drivers/soc/microchip/mpfs-sys-controller.c | 2 +- drivers/soc/pxa/ssp.c | 2 +- drivers/soc/qcom/icc-bwmon.c | 2 +- drivers/soc/qcom/llcc-qcom.c | 2 +- drivers/soc/qcom/ocmem.c | 2 +- drivers/soc/qcom/pmic_glink.c | 2 +- drivers/soc/qcom/qcom_aoss.c | 2 +- drivers/soc/qcom/qcom_gsbi.c | 2 +- drivers/soc/qcom/qcom_stats.c | 2 +- drivers/soc/qcom/ramp_controller.c | 4 ++-- drivers/soc/qcom/rmtfs_mem.c | 2 +- drivers/soc/qcom/rpm-proc.c | 2 +- drivers/soc/qcom/rpm_master_stats.c | 2 +- drivers/soc/qcom/smem.c | 2 +- drivers/soc/qcom/smp2p.c | 2 +- drivers/soc/qcom/smsm.c | 6 +++--- drivers/soc/qcom/socinfo.c | 2 +- drivers/soc/rockchip/io-domain.c | 8 ++++---- drivers/soc/samsung/exynos-chipid.c | 4 ++-- drivers/soc/tegra/cbb/tegra194-cbb.c | 2 +- drivers/soc/ti/k3-ringacc.c | 2 +- drivers/soc/ti/knav_dma.c | 4 ++-- drivers/soc/ti/knav_qmss_queue.c | 2 +- drivers/soc/ti/pm33xx.c | 2 +- drivers/soc/ti/pruss.c | 4 ++-- drivers/soc/ti/smartreflex.c | 2 +- drivers/soc/ti/wkup_m3_ipc.c | 2 +- drivers/soc/xilinx/xlnx_event_manager.c | 2 +- drivers/soc/xilinx/zynqmp_power.c | 2 +- 45 files changed, 54 insertions(+), 54 deletions(-)
drivers/soc/aspeed/aspeed-lpc-ctrl.c +1 -1
@@ -353,7 +353,7 @@ static struct platform_driver aspeed_lpc_ctrl_driver = { .of_match_table = aspeed_lpc_ctrl_match, }, .probe = aspeed_lpc_ctrl_probe, - .remove_new = aspeed_lpc_ctrl_remove, + .remove = aspeed_lpc_ctrl_remove, };module_platform_driver (aspeed_lpc_ctrl_driver);
drivers/soc/aspeed/aspeed-lpc-snoop.c +1 -1
@@ -388,7 +388,7 @@ static struct platform_driver aspeed_lpc_snoop_driver = { .of_match_table = aspeed_lpc_snoop_match, }, .probe = aspeed_lpc_snoop_probe, - .remove_new = aspeed_lpc_snoop_remove, + .remove = aspeed_lpc_snoop_remove, };module_platform_driver (aspeed_lpc_snoop_driver);
drivers/soc/aspeed/aspeed-p2a-ctrl.c +1 -1
@@ -431,7 +431,7 @@ static struct platform_driver aspeed_p2a_ctrl_driver = { .of_match_table = aspeed_p2a_ctrl_match, }, .probe = aspeed_p2a_ctrl_probe, - .remove_new = aspeed_p2a_ctrl_remove, + .remove = aspeed_p2a_ctrl_remove, };module_platform_driver (aspeed_p2a_ctrl_driver);
drivers/soc/aspeed/aspeed-uart-routing.c +1 -1
@@ -589,7 +589,7 @@ static struct platform_driver aspeed_uart_routing_driver = { .of_match_table = aspeed_uart_routing_table, }, .probe = aspeed_uart_routing_probe, - .remove_new = aspeed_uart_routing_remove, + .remove = aspeed_uart_routing_remove, };module_platform_driver (aspeed_uart_routing_driver);
drivers/soc/fsl/dpaa2-console.c +1 -1
@@ -320,7 +320,7 @@ static struct platform_driver dpaa2_console_driver = { .of_match_table = dpaa2_console_match_table, }, .probe = dpaa2_console_probe, - .remove_new = dpaa2_console_remove, + .remove = dpaa2_console_remove, };module_platform_driver (dpaa2_console_driver);
drivers/soc/fsl/qe/qmc.c +1 -1
@@ -2094,7 +2094,7 @@ static struct platform_driver qmc_driver = { .of_match_table = of_match_ptr(qmc_id_table), }, .probe = qmc_probe, - .remove_new = qmc_remove, + .remove = qmc_remove, };module_platform_driver (qmc_driver);
drivers/soc/fsl/qe/tsa.c +1 -1
@@ -1086,7 +1086,7 @@ static struct platform_driver tsa_driver = { .of_match_table = of_match_ptr(tsa_id_table), }, .probe = tsa_probe, - .remove_new = tsa_remove, + .remove = tsa_remove, };module_platform_driver (tsa_driver);
drivers/soc/fujitsu/a64fx-diag.c +1 -1
@@ -142,7 +142,7 @@ static struct platform_driver a64fx_diag_driver = { .acpi_match_table = ACPI_PTR(a64fx_diag_acpi_match), }, .probe = a64fx_diag_probe, - .remove_new = a64fx_diag_remove, + .remove = a64fx_diag_remove, };module_platform_driver (a64fx_diag_driver);
drivers/soc/hisilicon/kunpeng_hccs.c +1 -1
@@ -1348,7 +1348,7 @@ MODULE_DEVICE_TABLE(acpi, hccs_acpi_match);static struct platform_driver hccs_driver = { .probe = hccs_probe, - .remove_new = hccs_remove, + .remove = hccs_remove, .driver = { .name ="kunpeng_hccs" , .acpi_match_table = hccs_acpi_match,
drivers/soc/ixp4xx/ixp4xx-npe.c +1 -1
@@ -759,7 +759,7 @@ static struct platform_driver ixp4xx_npe_driver = { .of_match_table = ixp4xx_npe_of_match, }, .probe = ixp4xx_npe_probe, - .remove_new = ixp4xx_npe_remove, + .remove = ixp4xx_npe_remove, };module_platform_driver (ixp4xx_npe_driver);
drivers/soc/ixp4xx/ixp4xx-qmgr.c +1 -1
@@ -461,7 +461,7 @@ static struct platform_driver ixp4xx_qmgr_driver = { .of_match_table = ixp4xx_qmgr_of_match, }, .probe = ixp4xx_qmgr_probe, - .remove_new = ixp4xx_qmgr_remove, + .remove = ixp4xx_qmgr_remove, };module_platform_driver (ixp4xx_qmgr_driver);
drivers/soc/litex/litex_soc_ctrl.c +1 -1
@@ -131,7 +131,7 @@ static struct platform_driver litex_soc_ctrl_driver = { .of_match_table = litex_soc_ctrl_of_match, }, .probe = litex_soc_ctrl_probe, - .remove_new = litex_soc_ctrl_remove, + .remove = litex_soc_ctrl_remove, };module_platform_driver (litex_soc_ctrl_driver);
drivers/soc/loongson/loongson2_guts.c +1 -1
@@ -172,7 +172,7 @@ static struct platform_driver loongson2_guts_driver = { .of_match_table = loongson2_guts_of_match, }, .probe = loongson2_guts_probe, - .remove_new = loongson2_guts_remove, + .remove = loongson2_guts_remove, };static int __init loongson2_guts_init (void )
drivers/soc/mediatek/mtk-devapc.c +1 -1
@@ -310,7 +310,7 @@ static void mtk_devapc_remove(struct platform_device *pdev)static struct platform_driver mtk_devapc_driver = { .probe = mtk_devapc_probe, - .remove_new = mtk_devapc_remove, + .remove = mtk_devapc_remove, .driver = { .name ="mtk-devapc" , .of_match_table = mtk_devapc_dt_match,
drivers/soc/mediatek/mtk-mmsys.c +1 -1
@@ -487,7 +487,7 @@ static struct platform_driver mtk_mmsys_drv = { .of_match_table = of_match_mtk_mmsys, }, .probe = mtk_mmsys_probe, - .remove_new = mtk_mmsys_remove, + .remove = mtk_mmsys_remove, };module_platform_driver (mtk_mmsys_drv);
drivers/soc/mediatek/mtk-socinfo.c +1 -1
@@ -187,7 +187,7 @@ static void mtk_socinfo_remove(struct platform_device *pdev)static struct platform_driver mtk_socinfo = { .probe = mtk_socinfo_probe, - .remove_new = mtk_socinfo_remove, + .remove = mtk_socinfo_remove, .driver = { .name ="mtk-socinfo" , },
drivers/soc/microchip/mpfs-sys-controller.c +1 -1
@@ -232,7 +232,7 @@ static struct platform_driver mpfs_sys_controller_driver = { .of_match_table = mpfs_sys_controller_of_match, }, .probe = mpfs_sys_controller_probe, - .remove_new = mpfs_sys_controller_remove, + .remove = mpfs_sys_controller_remove, };module_platform_driver (mpfs_sys_controller_driver);
drivers/soc/pxa/ssp.c +1 -1
@@ -197,7 +197,7 @@ static const struct platform_device_id ssp_id_table[] = {static struct platform_driver pxa_ssp_driver = { .probe = pxa_ssp_probe, - .remove_new = pxa_ssp_remove, + .remove = pxa_ssp_remove, .driver = { .name ="pxa2xx-ssp" , .of_match_table =of_match_ptr (pxa_ssp_of_ids),
drivers/soc/qcom/icc-bwmon.c +1 -1
@@ -872,7 +872,7 @@ MODULE_DEVICE_TABLE(of, bwmon_of_match);static struct platform_driver bwmon_driver = { .probe = bwmon_probe, - .remove_new = bwmon_remove, + .remove = bwmon_remove, .driver = { .name ="qcom-bwmon" , .of_match_table = bwmon_of_match,
drivers/soc/qcom/llcc-qcom.c +1 -1
@@ -3511,7 +3511,7 @@ static struct platform_driver qcom_llcc_driver = { .of_match_table = qcom_llcc_of_match, }, .probe = qcom_llcc_probe, - .remove_new = qcom_llcc_remove, + .remove = qcom_llcc_remove, };module_platform_driver (qcom_llcc_driver);
drivers/soc/qcom/ocmem.c +1 -1
@@ -439,7 +439,7 @@ MODULE_DEVICE_TABLE(of, ocmem_of_match);static struct platform_driver ocmem_driver = { .probe = ocmem_dev_probe, - .remove_new = ocmem_dev_remove, + .remove = ocmem_dev_remove, .driver = { .name ="ocmem" , .of_match_table = ocmem_of_match,
drivers/soc/qcom/pmic_glink.c +1 -1
@@ -404,7 +404,7 @@ MODULE_DEVICE_TABLE(of, pmic_glink_of_match);static struct platform_driver pmic_glink_driver = { .probe = pmic_glink_probe, - .remove_new = pmic_glink_remove, + .remove = pmic_glink_remove, .driver = { .name ="qcom_pmic_glink" , .of_match_table = pmic_glink_of_match,
drivers/soc/qcom/qcom_aoss.c +1 -1
@@ -664,7 +664,7 @@ static struct platform_driver qmp_driver = { .suppress_bind_attrs = true, }, .probe = qmp_probe, - .remove_new = qmp_remove, + .remove = qmp_remove, };module_platform_driver (qmp_driver);
drivers/soc/qcom/qcom_gsbi.c +1 -1
@@ -232,7 +232,7 @@ static struct platform_driver gsbi_driver = { .of_match_table = gsbi_dt_match, }, .probe = gsbi_probe, - .remove_new = gsbi_remove, + .remove = gsbi_remove, };module_platform_driver (gsbi_driver);
drivers/soc/qcom/qcom_stats.c +1 -1
@@ -274,7 +274,7 @@ MODULE_DEVICE_TABLE(of, qcom_stats_table);static struct platform_driver qcom_stats = { .probe = qcom_stats_probe, - .remove_new = qcom_stats_remove, + .remove = qcom_stats_remove, .driver = { .name ="qcom_stats" , .of_match_table = qcom_stats_table,
drivers/soc/qcom/ramp_controller.c +2 -2
@@ -331,8 +331,8 @@ static struct platform_driver qcom_ramp_controller_driver = { .of_match_table = qcom_ramp_controller_match_table, .suppress_bind_attrs = true, }, - .probe = qcom_ramp_controller_probe, - .remove_new = qcom_ramp_controller_remove, + .probe = qcom_ramp_controller_probe, + .remove = qcom_ramp_controller_remove, };static int __init qcom_ramp_controller_init (void )
drivers/soc/qcom/rmtfs_mem.c +1 -1
@@ -315,7 +315,7 @@ MODULE_DEVICE_TABLE(of, qcom_rmtfs_mem_of_match);static struct platform_driver qcom_rmtfs_mem_driver = { .probe = qcom_rmtfs_mem_probe, - .remove_new = qcom_rmtfs_mem_remove, + .remove = qcom_rmtfs_mem_remove, .driver = { .name ="qcom_rmtfs_mem" , .of_match_table = qcom_rmtfs_mem_of_match,
drivers/soc/qcom/rpm-proc.c +1 -1
@@ -53,7 +53,7 @@ MODULE_DEVICE_TABLE(of, rpm_proc_of_match);static struct platform_driver rpm_proc_driver = { .probe = rpm_proc_probe, - .remove_new = rpm_proc_remove, + .remove = rpm_proc_remove, .driver = { .name ="qcom-rpm-proc" , .of_match_table = rpm_proc_of_match,
drivers/soc/qcom/rpm_master_stats.c +1 -1
@@ -155,7 +155,7 @@ static const struct of_device_id rpm_master_table[] = {static struct platform_driver master_stats_driver = { .probe = master_stats_probe, - .remove_new = master_stats_remove, + .remove = master_stats_remove, .driver = { .name ="qcom_rpm_master_stats" , .of_match_table = rpm_master_table,
drivers/soc/qcom/smem.c +1 -1
@@ -1251,7 +1251,7 @@ MODULE_DEVICE_TABLE(of, qcom_smem_of_match);static struct platform_driver qcom_smem_driver = { .probe = qcom_smem_probe, - .remove_new = qcom_smem_remove, + .remove = qcom_smem_remove, .driver = { .name ="qcom-smem" , .of_match_table = qcom_smem_of_match,
drivers/soc/qcom/smp2p.c +1 -1
@@ -698,7 +698,7 @@ MODULE_DEVICE_TABLE(of, qcom_smp2p_of_match);static struct platform_driver qcom_smp2p_driver = { .probe = qcom_smp2p_probe, - .remove_new = qcom_smp2p_remove, + .remove = qcom_smp2p_remove, .driver = { .name ="qcom_smp2p" , .of_match_table = qcom_smp2p_of_match,
drivers/soc/qcom/smsm.c +3 -3
@@ -682,9 +682,9 @@ MODULE_DEVICE_TABLE(of, qcom_smsm_of_match);static struct platform_driver qcom_smsm_driver = { .probe = qcom_smsm_probe, - .remove_new = qcom_smsm_remove, - .driver = { - .name ="qcom-smsm" , + .remove = qcom_smsm_remove, + .driver = { + .name ="qcom-smsm" , .of_match_table = qcom_smsm_of_match, }, };
drivers/soc/qcom/socinfo.c +1 -1
@@ -822,7 +822,7 @@ static void qcom_socinfo_remove(struct platform_device *pdev)static struct platform_driver qcom_socinfo_driver = { .probe = qcom_socinfo_probe, - .remove_new = qcom_socinfo_remove, + .remove = qcom_socinfo_remove, .driver = { .name ="qcom-socinfo" , },
drivers/soc/rockchip/io-domain.c +4 -4
@@ -742,10 +742,10 @@ static void rockchip_iodomain_remove(struct platform_device *pdev) }static struct platform_driver rockchip_iodomain_driver = { - .probe = rockchip_iodomain_probe, - .remove_new = rockchip_iodomain_remove, - .driver = { - .name ="rockchip-iodomain" , + .probe = rockchip_iodomain_probe, + .remove = rockchip_iodomain_remove, + .driver = { + .name ="rockchip-iodomain" , .of_match_table = rockchip_iodomain_match, }, };
drivers/soc/samsung/exynos-chipid.c +2 -2
@@ -198,8 +198,8 @@ static struct platform_driver exynos_chipid_driver = { .name = "exynos-chipid", .of_match_table = exynos_chipid_of_device_ids, }, - .probe = exynos_chipid_probe, - .remove_new = exynos_chipid_remove, + .probe = exynos_chipid_probe, + .remove = exynos_chipid_remove, };module_platform_driver (exynos_chipid_driver);
drivers/soc/tegra/cbb/tegra194-cbb.c +1 -1
@@ -2330,7 +2330,7 @@ static const struct dev_pm_ops tegra194_cbb_pm = {static struct platform_driver tegra194_cbb_driver = { .probe = tegra194_cbb_probe, - .remove_new = tegra194_cbb_remove, + .remove = tegra194_cbb_remove, .driver = { .name ="tegra194-cbb" , .of_match_table =of_match_ptr (tegra194_cbb_match),
drivers/soc/ti/k3-ringacc.c +1 -1
@@ -1562,7 +1562,7 @@ static void k3_ringacc_remove(struct platform_device *pdev)static struct platform_driver k3_ringacc_driver = { .probe = k3_ringacc_probe, - .remove_new = k3_ringacc_remove, + .remove = k3_ringacc_remove, .driver = { .name ="k3-ringacc" , .of_match_table = k3_ringacc_of_match,
drivers/soc/ti/knav_dma.c +2 -2
@@ -783,8 +783,8 @@ MODULE_DEVICE_TABLE(of, of_match);static struct platform_driver knav_dma_driver = { .probe = knav_dma_probe, - .remove_new = knav_dma_remove, - .driver = { + .remove = knav_dma_remove, + .driver = { .name ="keystone-navigator-dma" , .of_match_table = of_match, },
drivers/soc/ti/knav_qmss_queue.c +1 -1
@@ -1894,7 +1894,7 @@ static void knav_queue_remove(struct platform_device *pdev)static struct platform_driver keystone_qmss_driver = { .probe = knav_queue_probe, - .remove_new = knav_queue_remove, + .remove = knav_queue_remove, .driver = { .name ="keystone-navigator-qmss" , .of_match_table = keystone_qmss_of_match,
drivers/soc/ti/pm33xx.c +1 -1
@@ -591,7 +591,7 @@ static struct platform_driver am33xx_pm_driver = { .name = "pm33xx", }, .probe = am33xx_pm_probe, - .remove_new = am33xx_pm_remove, + .remove = am33xx_pm_remove, };module_platform_driver (am33xx_pm_driver);
drivers/soc/ti/pruss.c +2 -2
@@ -593,8 +593,8 @@ static struct platform_driver pruss_driver = { .name = "pruss", .of_match_table = pruss_of_match, }, - .probe = pruss_probe, - .remove_new = pruss_remove, + .probe = pruss_probe, + .remove = pruss_remove, };module_platform_driver (pruss_driver);
drivers/soc/ti/smartreflex.c +1 -1
@@ -969,7 +969,7 @@ MODULE_DEVICE_TABLE(of, omap_sr_match);static struct platform_driver smartreflex_driver = { .probe = omap_sr_probe, - .remove_new = omap_sr_remove, + .remove = omap_sr_remove, .shutdown = omap_sr_shutdown, .driver = { .name =DRIVER_NAME ,
drivers/soc/ti/wkup_m3_ipc.c +1 -1
@@ -755,7 +755,7 @@ MODULE_DEVICE_TABLE(of, wkup_m3_ipc_of_match);static struct platform_driver wkup_m3_ipc_driver = { .probe = wkup_m3_ipc_probe, - .remove_new = wkup_m3_ipc_remove, + .remove = wkup_m3_ipc_remove, .driver = { .name ="wkup_m3_ipc" , .of_match_table = wkup_m3_ipc_of_match,
drivers/soc/xilinx/xlnx_event_manager.c +1 -1
@@ -711,7 +711,7 @@ static void xlnx_event_manager_remove(struct platform_device *pdev)static struct platform_driver xlnx_event_manager_driver = { .probe = xlnx_event_manager_probe, - .remove_new = xlnx_event_manager_remove, + .remove = xlnx_event_manager_remove, .driver = { .name ="xlnx_event_manager" , },
drivers/soc/xilinx/zynqmp_power.c +1 -1
@@ -408,7 +408,7 @@ MODULE_DEVICE_TABLE(of, pm_of_match);static struct platform_driver zynqmp_pm_platform_driver = { .probe = zynqmp_pm_probe, - .remove_new = zynqmp_pm_remove, + .remove = zynqmp_pm_remove, .driver = { .name ="zynqmp_power" , .of_match_table = pm_of_match,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 63/354 soc: qcom: gsbi: fix double disable caused by devm
In reply to Greg Kroah-Hartman6.12-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 64/354 crypto: asymmetric_keys - prevent overflow in asymmetric_key_generate_id
In reply to Greg Kroah-Hartman6.12-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>
@@ -151,12 +152,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 65/354 crypto: hisilicon/qm - restore original qos values
In reply to Greg Kroah-Hartman6.12-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
@@ -3493,6 +3493,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;
@@ -3500,6 +3501,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]);
@@ -3513,11 +3515,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 66/354 wifi: ath11k: fix VHT MCS assignment
In reply to Greg Kroah-Hartman6.12-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
@@ -2225,9 +2225,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 suppoerted 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 67/354 wifi: ath11k: fix peer HE MCS assignment
In reply to Greg Kroah-Hartman6.12-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
@@ -2512,10 +2512,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++;
@@ -2525,10 +2525,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 68/354 s390/smp: Fix fallback CPU detection
In reply to Greg Kroah-Hartman6.12-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
@@ -710,6 +710,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 69/354 s390/ap: Dont leak debug feature files if AP instructions are not available
In reply to Greg Kroah-Hartman6.12-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
@@ -2419,15 +2419,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 70/354 arm64: dts: ti: k3-am62p: Fix memory ranges for GPU
In reply to Greg Kroah-Hartman6.12-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 71/354 firmware: imx: scu-irq: fix OF node leak in
In reply to Greg Kroah-Hartman6.12-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 72/354 arm64: dts: qcom: x1e80100: Fix compile warnings for USB HS controller
In reply to Greg Kroah-Hartman6.12-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
@@ -4287,15 +4287,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 73/354 arm64: dts: qcom: x1e80100: Add missing quirk for HS only USB controller
In reply to Greg Kroah-Hartman6.12-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
@@ -4272,6 +4272,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 74/354 arm64: dts: qcom: sdm845-oneplus: Correct gpio used for slider
In reply to Greg Kroah-Hartman6.12-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
@@ -803,8 +803,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 75/354 arm64: dts: qcom: sm8650: set ufs as dma coherent
In reply to Greg Kroah-Hartman6.12-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
@@ -2590,6 +2590,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 76/354 arm64: dts: qcom: qcm6490-shift-otter: Add missing reserved-memory
In reply to Greg Kroah-Hartman6.12-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 77/354 phy: mscc: Fix PTP for VSC8574 and VSC8572
In reply to Greg Kroah-Hartman6.12-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
@@ -2595,7 +2595,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,
@@ -2616,12 +2616,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 78/354 sctp: Defer SCTP_DBG_OBJCNT_DEC() to sctp_destroy_sock().
In reply to Greg Kroah-Hartman6.12-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 79/354 RDMA/rxe: Fix null deref on srq->rq.queue after resize failure
In reply to Greg Kroah-Hartman6.12-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 80/354 ARM: dts: renesas: gose: Remove superfluous port property
In reply to Greg Kroah-Hartman6.12-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 81/354 ARM: dts: renesas: r9a06g032-rzn1d400-db: Drop invalid #cells properties
In reply to Greg Kroah-Hartman6.12-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
@@ -126,8 +126,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 82/354 Revert "mtd: rawnand: marvell: fix layouts"
In reply to Greg Kroah-Hartman6.12-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 83/354 mtd: nand: relax ECC parameter validation check
In reply to Greg Kroah-Hartman6.12-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 84/354 mtd: rawnand: lpc32xx_slc: fix GPIO descriptor leak on probe error and remove
In reply to Greg Kroah-Hartman6.12-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 85/354 perf: Remove get_perf_callchain() init_nr argument
In reply to Greg Kroah-Hartman6.12-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
@@ -1602,7 +1602,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
@@ -216,7 +216,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;
@@ -231,11 +231,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
@@ -7860,7 +7860,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 86/354 bpf: Refactor stack map trace depth calculation into helper function
In reply to Greg Kroah-Hartman6.12-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 87/354 bpf: Fix stackmap overflow check in __bpf_get_stackid()
In reply to Greg Kroah-Hartman6.12-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 88/354 perf/x86/intel/cstate: Remove PC3 support from LunarLake
In reply to Greg Kroah-Hartman6.12-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
@@ -521,7 +521,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 89/354 task_work: Fix NMI race condition
In reply to Greg Kroah-Hartman6.12-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);
@@ -98,6 +103,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 90/354 x86/dumpstack: Prevent KASAN false positive warnings in __show_regs()
In reply to Greg Kroah-Hartman6.12-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
@@ -183,8 +183,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 };
@@ -305,6 +305,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 91/354 tools/nolibc/stdio: let perror work when NOLIBC_IGNORE_ERRNO is set
In reply to Greg Kroah-Hartman6.12-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
@@ -351,7 +351,11 @@ int printf(const char *fmt, ...)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 92/354 soc: qcom: smem: fix hwspinlock resource leak in probe error paths
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haotian Zhang <[email protected]>
[ Upstream commit dc5db35073a19f6d3c30bea367b551c1a784ef8f ]
The hwspinlock acquired via hwspin_lock_request_specific() is not released on several error paths. This results in resource leakage when probe fails.
Switch to devm_hwspin_lock_request_specific() to automatically handle cleanup on probe failure. Remove the manual hwspin_lock_free() in qcom_smem_remove() as devm handles it automatically.
--- drivers/soc/qcom/smem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/soc/qcom/smem.c +1 -2
@@ -1186,7 +1186,7 @@ static int qcom_smem_probe(struct platform_device *pdev)return hwlock_id; } - smem->hwlock =hwspin_lock_request_specific (hwlock_id); + smem->hwlock =devm_hwspin_lock_request_specific (&pdev->dev, hwlock_id);if (!smem->hwlock)return -ENXIO ;
@@ -1239,7 +1239,6 @@ static void qcom_smem_remove(struct platform_device *pdev) {platform_device_unregister (__smem->socinfo); -hwspin_lock_free (__smem->hwlock); __smem =NULL ; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 93/354 pinctrl: stm32: fix hwspinlock resource leak in probe function
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haotian Zhang <[email protected]>
[ Upstream commit 002679f79ed605e543fbace465557317cd307c9a ]
In stm32_pctl_probe(), hwspin_lock_request_specific() is called to request a hwspinlock, but the acquired lock is not freed on multiple error paths after this call. This causes resource leakage when the function fails to initialize properly.
Use devm_hwspin_lock_request_specific() instead of hwspin_lock_request_specific() to automatically manage the hwspinlock resource lifecycle.
--- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/stm32/pinctrl-stm32.c +1 -1
@@ -1537,7 +1537,7 @@ int stm32_pctl_probe(struct platform_device *pdev)if (hwlock_id == -EPROBE_DEFER )return hwlock_id; }else { - pctl->hwlock =hwspin_lock_request_specific (hwlock_id); + pctl->hwlock =devm_hwspin_lock_request_specific (dev, hwlock_id); }spin_lock_init (&pctl->irqmux_lock);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 94/354 i3c: fix refcount inconsistency in i3c_master_register
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frank Li <[email protected]>
[ Upstream commit 9d4f219807d5ac11fb1d596e4ddb09336b040067 ]
In i3c_master_register, a possible refcount inconsistency has been identified, causing possible resource leak.
Function of_node_get increases the refcount of parent->of_node. If function i3c_bus_init fails, the function returns immediately without a corresponding decrease, resulting in an inconsistent refcounter.
Move call i3c_bus_init() after device_initialize() to let callback i3c_masterdev_release() release of_node.
--- drivers/i3c/master.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/i3c/master.c +4 -4
@@ -2809,10 +2809,6 @@ int i3c_master_register(struct i3c_master_controller *master,INIT_LIST_HEAD (&master->boardinfo.i2c);INIT_LIST_HEAD (&master->boardinfo.i3c); - ret =i3c_bus_init (i3cbus, master->dev.of_node); -if (ret) -return ret; -device_initialize (&master->dev);dev_set_name (&master->dev,"i3c-%d" , i3cbus->id);
@@ -2820,6 +2816,10 @@ int i3c_master_register(struct i3c_master_controller *master, master->dev.coherent_dma_mask = parent->coherent_dma_mask; master->dev.dma_parms = parent->dma_parms; + ret =i3c_bus_init (i3cbus, master->dev.of_node); +if (ret) + goto err_put_dev; + ret =of_populate_i3c_bus (master);if (ret) goto err_put_dev;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 95/354 i3c: master: svc: Prevent incomplete IBI transaction
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stanley Chu <[email protected]>
[ Upstream commit 3a36273e5a07dda0ccec193800f3b78c3c0380af ]
If no free IBI slot is available, svc_i3c_master_handle_ibi returns immediately. This causes the STOP condition to be missed because the EmitStop request is sent when the transfer is not complete. To resolve this, svc_i3c_master_handle_ibi must wait for the transfer to complete before returning.
--- drivers/i3c/master/svc-i3c-master.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
drivers/i3c/master/svc-i3c-master.c +14 -8
@@ -366,21 +366,27 @@ static int svc_i3c_master_handle_ibi(struct svc_i3c_master *master,int ret, val;u8 *buf; - slot =i3c_generic_ibi_get_free_slot (data->ibi_pool); -if (!slot) -return -ENOSPC ; - - slot->len =0 ; - buf = slot->data; - +/* +* Wait for transfer to complete before returning. Otherwise, the EmitStop +* request might be sent when the transfer is not complete. +*/ ret =readl_relaxed_poll_timeout (master->regs +SVC_I3C_MSTATUS , val,SVC_I3C_MSTATUS_COMPLETE (val),0 ,1000 );if (ret) {dev_err (master->dev,"Timeout when polling for COMPLETE\n" ); -i3c_generic_ibi_recycle_slot (data->ibi_pool, slot);return ret; } + slot =i3c_generic_ibi_get_free_slot (data->ibi_pool); +if (!slot) { +dev_dbg (master->dev,"No free ibi slot, drop the data\n" ); +writel (SVC_I3C_MDATACTRL_FLUSHRB , master->regs +SVC_I3C_MDATACTRL ); +return -ENOSPC ; + } + + slot->len =0 ; + buf = slot->data; +while (SVC_I3C_MSTATUS_RXPEND (readl (master->regs +SVC_I3C_MSTATUS )) && slot->len <SVC_I3C_FIFO_SIZE ) { mdatactrl =readl (master->regs +SVC_I3C_MDATACTRL );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 96/354 wifi: ath12k: fix potential memory leak in ath12k_wow_arp_ns_offload()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abdun Nihaal <[email protected]>
[ Upstream commit be5febd51c478bc8e24ad3480435f2754a403b14 ]
When the call to ath12k_wmi_arp_ns_offload() fails, the temporary memory allocation for offload is not freed before returning. Fix that by freeing offload in the error path.
--- drivers/net/wireless/ath/ath12k/wow.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath12k/wow.c +1 -0
@@ -755,6 +755,7 @@ static int ath12k_wow_arp_ns_offload(struct ath12k *ar, bool enable)if (ret) {ath12k_warn (ar->ab,"failed to set arp ns offload vdev %i: enable %d, ret %d\n" , arvif->vdev_id, enable, ret); +kfree (offload);return ret; } }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 97/354 interconnect: qcom: msm8996: add missing link to SLAVE_USB_HS
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 8cf9b43f6b4d90e19a9341edefdd46842d4adb55 ]
Quoted 1 line
From the initial submission the interconnect driver missed the link from
SNOC_PNOC to the USB 2 configuration space. Add missing link in order to let the platform configure and utilize this path.
--- drivers/interconnect/qcom/msm8996.c | 1 + 1 file changed, 1 insertion(+)
drivers/interconnect/qcom/msm8996.c +1 -0
@@ -552,6 +552,7 @@ static struct qcom_icc_node mas_venus_vmem = {static const u16 mas_snoc_pnoc_links[] = {MSM8996_SLAVE_BLSP_1 ,MSM8996_SLAVE_BLSP_2 , +MSM8996_SLAVE_USB_HS ,MSM8996_SLAVE_SDCC_1 ,MSM8996_SLAVE_SDCC_2 ,MSM8996_SLAVE_SDCC_4 ,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 98/354 arm64: dts: qcom: msm8996: add interconnect paths to USB2 controller
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 242f7558e7bf54cb63c06506f7b0630dd67d45a4 ]
Add the missing interconnects to the USB2 host. The Fixes tag points to the commit which broke probing of the USB host on that platform.
--- arch/arm64/boot/dts/qcom/msm8996.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/qcom/msm8996.dtsi +3 -0
@@ -3449,6 +3449,9 @@ usb2: usb@76f8800 { <&gcc GCC_USB20_MASTER_CLK>; assigned-clock-rates = <19200000>, <60000000>; + interconnects = <&pnoc MASTER_USB_HS &bimc SLAVE_EBI_CH0>, + <&bimc MASTER_AMPSS_M0 &pnoc SLAVE_USB_HS>; + interconnect-names = "usb-ddr", "apps-usb"; power-domains = <&gcc USB30_GDSC>; qcom,select-utmi-as-pipe-clk; status = "disabled";
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 99/354 interconnect: debugfs: Fix incorrect error handling for NULL path
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuan-Wei Chiu <[email protected]>
[ Upstream commit 6bfe104fd0f94d0248af22c256ce725ee087157b ]
The icc_commit_set() function, used by the debugfs interface, checks the validity of the global cur_path pointer using IS_ERR_OR_NULL(). However, in the specific case where cur_path is NULL, while IS_ERR_OR_NULL(NULL) correctly evaluates to true, the subsequent call to PTR_ERR(NULL) returns 0.
This causes the function to return a success code (0) instead of an error, misleading the user into believing their bandwidth request was successfully committed when, in fact, no operation was performed.
Fix this by adding an explicit check to return -EINVAL if cur_path is NULL. This prevents silent failures and ensures that an invalid operational sequence is immediately and clearly reported as an error.
--- drivers/interconnect/debugfs-client.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/interconnect/debugfs-client.c +6 -1
@@ -117,7 +117,12 @@ static int icc_commit_set(void *data, u64 val)mutex_lock (&debugfs_lock); -if (IS_ERR_OR_NULL (cur_path)) { +if (!cur_path) { + ret = -EINVAL ; + goto out; + } + +if (IS_ERR (cur_path)) { ret =PTR_ERR (cur_path); goto out; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 100/354 drm/imagination: Fix reference to devm_platform_get_and_ioremap_resource()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit f1aa93005d0d6fb3293ca9c3eb08d1d1557117bf ]
The call to devm_platform_ioremap_resource() was replaced by a call to devm_platform_get_and_ioremap_resource(), but the comment referring to the function's possible returned error codes was not updated.
--- drivers/gpu/drm/imagination/pvr_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/imagination/pvr_device.c +1 -1
@@ -46,7 +46,7 @@* * Return: * * 0 on success, or -* * Any error returned by devm_platform_ioremap_resource(). +* * Any error returned by devm_platform_get_and_ioremap_resource(). */ static int pvr_device_reg_init (struct pvr_device *pvr_dev)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 101/354 perf lock contention: Load kernel map before lookup
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namhyung Kim <[email protected]>
[ Upstream commit 553d18c98a896094b99a01765b9698b204183d49 ]
On some machines, it caused troubles when it tried to find kernel symbols. I think it's because kernel modules and kallsyms are messed up during load and split.
Basically we want to make sure the kernel map is loaded and the code has it in the lock_contention_read(). But recently we added more lookups in the lock_contention_prepare() which is called before _read().
Also the kernel map (kallsyms) may not be the first one in the group like on ARM. Let's use machine__kernel_map() rather than just loading the first map.
--- tools/perf/util/bpf_lock_contention.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/perf/util/bpf_lock_contention.c +3 -3
@@ -26,6 +26,9 @@ int lock_contention_prepare(struct lock_contention *con)struct evlist *evlist = con->evlist;struct target *target = con->target; +/* make sure it loads the kernel map before lookup */ +map__load (machine__kernel_map (con->machine)); + skel =lock_contention_bpf__open ();if (!skel) {pr_err ("Failed to open lock-contention BPF skeleton\n" );
@@ -443,9 +446,6 @@ int lock_contention_read(struct lock_contention *con)bpf_prog_test_run_opts (prog_fd, &opts); } -/* make sure it loads the kernel map */ -maps__load_first (machine->kmaps); - prev_key =NULL ;while (!bpf_map_get_next_key (fd, prev_key, &key)) {s64 ls_key;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 102/354 perf record: skip synthesize event when open evsel failed
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shuai Xue <[email protected]>
[ Upstream commit 163e5f2b96632b7fb2eaa965562aca0dbdf9f996 ]
When using perf record with the --overwrite option, a segmentation fault occurs if an event fails to open. For example:
perf record -e cycles-ct -F 1000 -a --overwrite
Error:
cycles-ct:H: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'
perf: Segmentation fault
#0 0x6466b6 in dump_stack debug.c:366
#1 0x646729 in sighandler_dump_stack debug.c:378
#2 0x453fd1 in sigsegv_handler builtin-record.c:722
#3 0x7f8454e65090 in __restore_rt libc-2.32.so[54090]
#4 0x6c5671 in __perf_event__synthesize_id_index synthetic-events.c:1862
#5 0x6c5ac0 in perf_event__synthesize_id_index synthetic-events.c:1943
#6 0x458090 in record__synthesize builtin-record.c:2075
#7 0x45a85a in __cmd_record builtin-record.c:2888
#8 0x45deb6 in cmd_record builtin-record.c:4374
#9 0x4e5e33 in run_builtin perf.c:349
#10 0x4e60bf in handle_internal_command perf.c:401
#11 0x4e6215 in run_argv perf.c:448
#12 0x4e653a in main perf.c:555
#13 0x7f8454e4fa72 in __libc_start_main libc-2.32.so[3ea72]
#14 0x43a3ee in _start ??:0The --overwrite option implies --tail-synthesize, which collects non-sample events reflecting the system status when recording finishes. However, when evsel opening fails (e.g., unsupported event 'cycles-ct'), session->evlist is not initialized and remains NULL. The code unconditionally calls record__synthesize() in the error path, which iterates through the NULL evlist pointer and causes a segfault.
To fix it, move the record__synthesize() call inside the error check block, so it's only called when there was no error during recording, ensuring that evlist is properly initialized.
--- tools/perf/builtin-record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-record.c +1 -1
@@ -2832,11 +2832,11 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) rec->bytes_written +=off_cpu_write (rec->session);record__read_lost_samples (rec); -record__synthesize (rec, true);/* this will be recalculated during process_buildids() */ rec->samples =0 ;if (!err) { +record__synthesize (rec, true);if (!rec->timestamp_filename) {record__finish_output (rec); }else {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 103/354 power: supply: rt5033_charger: Fix device node reference leaks
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haotian Zhang <[email protected]>
[ Upstream commit 6cdc4d488c2f3a61174bfba4e8cc4ac92c219258 ]
The device node pointers np_conn and np_edev, obtained from of_parse_phandle() and of_get_parent() respectively, are not released. This results in a reference count leak.
Add of_node_put() calls after the last use of these device nodes to properly release their references and fix the leaks.
--- drivers/power/supply/rt5033_charger.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/power/supply/rt5033_charger.c +2 -0
@@ -700,6 +700,8 @@ static int rt5033_charger_probe(struct platform_device *pdev) np_conn =of_parse_phandle (pdev->dev.of_node,"richtek,usb-connector" ,0 ); np_edev =of_get_parent (np_conn); charger->edev =extcon_find_edev_by_node (np_edev); +of_node_put (np_edev); +of_node_put (np_conn);if (IS_ERR (charger->edev)) {dev_warn (charger->dev,"no extcon device found in device-tree\n" ); goto out;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 104/354 power: supply: cw2015: Check devm_delayed_work_autocancel() return code
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ivan Abramov <[email protected]>
[ Upstream commit 92ec7e7b86ec0aff9cd7db64d9dce50a0ea7c542 ]
Since devm_delayed_work_autocancel() may fail, add return code check and exit cw_bat_probe() on error.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/power/supply/cw2015_battery.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/power/supply/cw2015_battery.c +7 -1
@@ -702,7 +702,13 @@ static int cw_bat_probe(struct i2c_client *client)if (!cw_bat->battery_workqueue)return -ENOMEM ; -devm_delayed_work_autocancel (&client->dev, &cw_bat->battery_delay_work, cw_bat_work); + ret =devm_delayed_work_autocancel (&client->dev, &cw_bat->battery_delay_work, cw_bat_work); +if (ret) { +dev_err_probe (&client->dev, ret, +"Failed to register delayed work\n" ); +return ret; + } +queue_delayed_work (cw_bat->battery_workqueue, &cw_bat->battery_delay_work,msecs_to_jiffies (10 ));return 0 ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 105/354 power: supply: max17040: Check iio_read_channel_processed() return code
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ivan Abramov <[email protected]>
[ Upstream commit 2c68ac48c52ad146523f32b01d70009622bf81aa ]
Since iio_read_channel_processed() may fail, return its exit code on error.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/power/supply/max17040_battery.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/power/supply/max17040_battery.c +5 -1
@@ -388,6 +388,7 @@ static int max17040_get_property(struct power_supply *psy, union power_supply_propval *val) {struct max17040_chip *chip =power_supply_get_drvdata (psy); +int ret;switch (psp) {case POWER_SUPPLY_PROP_ONLINE :
@@ -410,7 +411,10 @@ static int max17040_get_property(struct power_supply *psy,if (!chip->channel_temp)return -ENODATA ; -iio_read_channel_processed (chip->channel_temp, &val->intval); + ret =iio_read_channel_processed (chip->channel_temp, &val->intval); +if (ret) +return ret; + val->intval /=100 ;/* Convert from milli- to deci-degree */ break ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 106/354 power: supply: rt9467: Return error on failure in rt9467_set_value_from_ranges()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ivan Abramov <[email protected]>
[ Upstream commit 8b27fe2d8d2380118c343629175385ff587e2fe4 ]
The return value of rt9467_set_value_from_ranges() when setting AICL VTH is not checked, even though it may fail.
Log error and return from rt9467_run_aicl() on fail.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/power/supply/rt9467-charger.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/power/supply/rt9467-charger.c +4 -0
@@ -588,6 +588,10 @@ static int rt9467_run_aicl(struct rt9467_chg_data *data) aicl_vth = mivr_vth + RT9467_AICLVTH_GAP_uV; ret =rt9467_set_value_from_ranges (data,F_AICL_VTH ,RT9467_RANGE_AICL_VTH , aicl_vth); +if (ret) { +dev_err (data->dev,"Failed to set AICL VTH\n" ); +return ret; + }/* Trigger AICL function */ ret =regmap_field_write (data->rm_field[F_AICL_MEAS ],1 );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 107/354 power: supply: rt9467: Prevent using uninitialized local variable in rt9467_set_value_from_ranges()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Murad Masimov <[email protected]>
[ Upstream commit 15aca30cc6c69806054b896a2ccf7577239cb878 ]
There is a typo in rt9467_set_value_from_ranges() that can cause leaving local variable sel with an undefined value which is then used in regmap_field_write().
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/power/supply/rt9467-charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/rt9467-charger.c +1 -1
@@ -376,7 +376,7 @@ static int rt9467_set_value_from_ranges(struct rt9467_chg_data *data,if (rsel ==RT9467_RANGE_VMIVR ) { ret =linear_range_get_selector_high (range, value, &sel, &found);if (ret) - value = range->max_sel; + sel = range->max_sel; }else {linear_range_get_selector_within (range, value, &sel); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 108/354 power: supply: wm831x: Check wm831x_set_bits() return value
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ivan Abramov <[email protected]>
[ Upstream commit ea14bae6df18942bccb467fcf5ff33ca677b8253 ]
Since wm831x_set_bits() may return error, log failure and exit from wm831x_usb_limit_change() in such case.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/power/supply/wm831x_power.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/power/supply/wm831x_power.c +8 -2
@@ -144,6 +144,7 @@ static int wm831x_usb_limit_change(struct notifier_block *nb, struct wm831x_power, usb_notify);unsigned int i, best; +int ret;/* Find the highest supported limit */ best =0 ;
@@ -156,8 +157,13 @@ static int wm831x_usb_limit_change(struct notifier_block *nb,dev_dbg (wm831x_power->wm831x->dev,"Limiting USB current to %umA" , wm831x_usb_limits[best]); -wm831x_set_bits (wm831x_power->wm831x,WM831X_POWER_STATE , -WM831X_USB_ILIM_MASK , best); + ret =wm831x_set_bits (wm831x_power->wm831x,WM831X_POWER_STATE , +WM831X_USB_ILIM_MASK , best); +if (ret <0 ) { +dev_err (wm831x_power->wm831x->dev, +"Failed to set USB current limit: %d\n" , ret); +return ret; + }return 0 ; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 109/354 power: supply: apm_power: only unset own apm_get_power_status
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahelenia Ziemiańska <[email protected]>
[ Upstream commit bd44ea12919ac4e83c9f3997240fe58266aa8799 ]
Mirroring drivers/macintosh/apm_emu.c, this means that
modprobe apm_power && modprobe $anotherdriver && modprobe -r apm_power
leaves $anotherdriver's apm_get_power_status instead of deleting it.
--- drivers/power/supply/apm_power.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/power/supply/apm_power.c +2 -1
@@ -364,7 +364,8 @@ static int __init apm_battery_init(void) static void __exit apm_battery_exit(void) { - apm_get_power_status =NULL ; +if (apm_get_power_status == apm_battery_apm_get_power_status) + apm_get_power_status =NULL ; }module_init (apm_battery_init);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 110/354 scsi: target: Do not write NUL characters into ASCII configfs output
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit c03b55f235e283cae49c88b9602fd11096b92eba ]
NUL characters are not allowed in ASCII configfs output. Hence this patch.
--- drivers/target/target_core_configfs.c | 1 - 1 file changed, 1 deletion(-)
drivers/target/target_core_configfs.c +0 -1
@@ -2774,7 +2774,6 @@ static ssize_t target_lu_gp_members_show(struct config_item *item, char *page) cur_len =snprintf (buf,LU_GROUP_NAME_BUF ,"%s/%s\n" ,config_item_name (&hba->hba_group.cg_item),config_item_name (&dev->dev_group.cg_item)); - cur_len++;/* Extra byte for NULL terminator */ if ((cur_len + len) >PAGE_SIZE || cur_len >LU_GROUP_NAME_BUF ) { pr_warn("Ran out of lu_gp_show_attr"
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 111/354 fs/9p: Dont open remote file with APPEND mode when writeback cache is used
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tingmao Wang <[email protected]>
[ Upstream commit a63dd8fd137933551bfd9aeeeaa942f04c7aad65 ]
When page cache is used, writebacks are done on a page granularity, and it is expected that the underlying filesystem (such as v9fs) should respect the write position. However, currently v9fs will passthrough O_APPEND to the server even on cached mode. This causes data corruption if a sync or fstat gets between two writes to the same file.
This patch removes the APPEND flag from the open request we send to the server when writeback caching is involved. I believe keeping server-side APPEND is probably fine for uncached mode (even if two fds are opened, one without O_APPEND and one with it, this should still be fine since they would use separate fid for the writes).
Message-ID: <[email protected]>
--- fs/9p/vfs_file.c | 11 ++++++++--- fs/9p/vfs_inode.c | 3 +-- fs/9p/vfs_inode_dotl.c | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-)
fs/9p/vfs_file.c +8 -3
@@ -43,14 +43,18 @@ int v9fs_file_open(struct inode *inode, struct file *file)struct v9fs_session_info *v9ses;struct p9_fid *fid;int omode; +int o_append;p9_debug (P9_DEBUG_VFS ,"inode: %p file: %p\n" , inode, file); v9ses =v9fs_inode2v9ses (inode); -if (v9fs_proto_dotl (v9ses)) +if (v9fs_proto_dotl (v9ses)) { omode =v9fs_open_to_dotl_flags (file->f_flags); -else + o_append =P9_DOTL_APPEND ; + }else { omode =v9fs_uflags2omode (file->f_flags,v9fs_proto_dotu (v9ses)); + o_append =P9_OAPPEND ; + } fid = file->private_data;if (!fid) { fid =v9fs_fid_clone (file_dentry (file));
@@ -58,9 +62,10 @@ int v9fs_file_open(struct inode *inode, struct file *file)return PTR_ERR (fid);if ((v9ses->cache &CACHE_WRITEBACK ) && (omode &P9_OWRITE )) { -int writeback_omode = (omode & ~P9_OWRITE ) |P9_ORDWR ; +int writeback_omode = (omode & ~(P9_OWRITE | o_append)) |P9_ORDWR ;p9_debug (P9_DEBUG_CACHE ,"write-only file with writeback enabled, try opening O_RDWR\n" ); + err =p9_client_open (fid, writeback_omode);if (err <0 ) {p9_debug (P9_DEBUG_CACHE ,"could not open O_RDWR, disabling caches\n" );
fs/9p/vfs_inode.c +1 -2
@@ -791,7 +791,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry, p9_omode =v9fs_uflags2omode (flags,v9fs_proto_dotu (v9ses));if ((v9ses->cache &CACHE_WRITEBACK ) && (p9_omode &P9_OWRITE )) { - p9_omode = (p9_omode & ~P9_OWRITE ) |P9_ORDWR ; + p9_omode = (p9_omode & ~(P9_OWRITE |P9_OAPPEND )) |P9_ORDWR ;p9_debug (P9_DEBUG_CACHE ,"write-only file with writeback enabled, creating w/ O_RDWR\n" ); }
@@ -1404,4 +1404,3 @@ static const struct inode_operations v9fs_symlink_inode_operations = { .getattr = v9fs_vfs_getattr, .setattr = v9fs_vfs_setattr, }; -
fs/9p/vfs_inode_dotl.c +1 -1
@@ -286,7 +286,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry, }if ((v9ses->cache &CACHE_WRITEBACK ) && (p9_omode &P9_OWRITE )) { - p9_omode = (p9_omode & ~P9_OWRITE ) |P9_ORDWR ; + p9_omode = (p9_omode & ~(P9_OWRITE |P9_DOTL_APPEND )) |P9_ORDWR ;p9_debug (P9_DEBUG_CACHE ,"write-only file with writeback enabled, creating w/ O_RDWR\n" ); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 112/354 drm/panthor: Handle errors returned by drm_sched_entity_init()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boris Brezillon <[email protected]>
[ Upstream commit bb7939e332c64c4ef33974a0eae4f3841acfa8eb ]
In practice it's not going to fail because we're passing the current sanity checks done by drm_sched_entity_init(), and that's the only reason it would return an error, but better safe than sorry.
--- drivers/gpu/drm/panthor/panthor_sched.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/panthor/panthor_sched.c +2 -0
@@ -3307,6 +3307,8 @@ group_create_queue(struct panthor_group *group, drm_sched = &queue->scheduler; ret =drm_sched_entity_init (&queue->entity,0 , &drm_sched,1 ,NULL ); +if (ret) + goto err_free_queue;return queue;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 113/354 drm/panthor: Fix group_free_queue() for partially initialized queues
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boris Brezillon <[email protected]>
[ Upstream commit 94a6d20feadbbe24e8a7b1c56394789ea5358fcc ]
group_free_queue() can be called on a partially initialized queue object if something fails in group_create_queue(). Make sure we don't call drm_sched_entity_destroy() on an entity that hasn't been initialized.
--- drivers/gpu/drm/panthor/panthor_sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/panthor/panthor_sched.c +2 -1
@@ -865,7 +865,8 @@ static void group_free_queue(struct panthor_group *group, struct panthor_queue *if (IS_ERR_OR_NULL (queue))return ; -drm_sched_entity_destroy (&queue->entity); +if (queue->entity.fence_context) +drm_sched_entity_destroy (&queue->entity);if (queue->scheduler.ops)drm_sched_fini (&queue->scheduler);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 114/354 drm/panthor: Fix UAF race between device unplug and FW event processing
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ketil Johnsen <[email protected]>
[ Upstream commit 7051f6ba968fa69918d72cc26de4d6cf7ea05b90 ]
The function panthor_fw_unplug() will free the FW memory sections. The problem is that there could still be pending FW events which are yet not handled at this point. process_fw_events_work() can in this case try to access said freed memory.
Simply call disable_work_sync() to both drain and prevent future invocation of process_fw_events_work().
--- drivers/gpu/drm/panthor/panthor_sched.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/panthor/panthor_sched.c +1 -0
@@ -3696,6 +3696,7 @@ void panthor_sched_unplug(struct panthor_device *ptdev)struct panthor_scheduler *sched = ptdev->scheduler;cancel_delayed_work_sync (&sched->tick_work); +disable_work_sync (&sched->fw_events_work);mutex_lock (&sched->lock);if (sched->pm.has_ref) {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 115/354 drm/panthor: Fix race with suspend during unplug
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ketil Johnsen <[email protected]>
[ Upstream commit 08be57e6e8aa20ea5a6dd2552e38ac168d6a9b11 ]
There is a race between panthor_device_unplug() and panthor_device_suspend() which can lead to IRQ handlers running on a powered down GPU. This is how it can happen:
- unplug routine calls drm_dev_unplug()
- panthor_device_suspend() can now execute, and will skip a lot of important work because the device is currently marked as unplugged.
- IRQs will remain active in this case and IRQ handlers can therefore try to access a powered down GPU.
The fix is simply to take the PM ref in panthor_device_unplug() a little bit earlier, before drm_dev_unplug().
--- drivers/gpu/drm/panthor/panthor_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panthor/panthor_device.c +2 -2
@@ -64,6 +64,8 @@ void panthor_device_unplug(struct panthor_device *ptdev)return ; } +drm_WARN_ON (&ptdev->base,pm_runtime_get_sync (ptdev->base.dev) <0 ); +/* Call drm_dev_unplug() so any access to HW blocks happening after * that point get rejected. */
@@ -74,8 +76,6 @@ void panthor_device_unplug(struct panthor_device *ptdev)*/ mutex_unlock (&ptdev->unplug.lock); -drm_WARN_ON (&ptdev->base,pm_runtime_get_sync (ptdev->base.dev) <0 ); -/* Now, try to cleanly shutdown the GPU before the device resources * get reclaimed. */
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 116/354 drm/panthor: Fix UAF on kernel BO VA nodes
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boris Brezillon <[email protected]>
[ Upstream commit 98dd5143447af0ee33551776d8b2560c35d0bc4a ]
If the MMU is down, panthor_vm_unmap_range() might return an error. We expect the page table to be updated still, and if the MMU is blocked, the rest of the GPU should be blocked too, so no risk of accessing physical memory returned to the system (which the current code doesn't cover for anyway).
Proceed with the rest of the cleanup instead of bailing out and leaving the va_node inserted in the drm_mm, which leads to UAF when other adjacent nodes are removed from the drm_mm tree.
--- drivers/gpu/drm/panthor/panthor_gem.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)
drivers/gpu/drm/panthor/panthor_gem.c +3 -11
@@ -32,7 +32,6 @@ static void panthor_gem_free_object(struct drm_gem_object *obj)void panthor_kernel_bo_destroy (struct panthor_kernel_bo *bo) {struct panthor_vm *vm; -int ret;if (IS_ERR_OR_NULL (bo))return ;
@@ -40,18 +39,11 @@ void panthor_kernel_bo_destroy(struct panthor_kernel_bo *bo) vm = bo->vm;panthor_kernel_bo_vunmap (bo); -if (drm_WARN_ON (bo->obj->dev, -to_panthor_bo (bo->obj)->exclusive_vm_root_gem !=panthor_vm_root_gem (vm))) - goto out_free_bo; - - ret =panthor_vm_unmap_range (vm, bo->va_node.start, bo->va_node.size); -if (ret) - goto out_free_bo; - +drm_WARN_ON (bo->obj->dev, +to_panthor_bo (bo->obj)->exclusive_vm_root_gem !=panthor_vm_root_gem (vm)); +panthor_vm_unmap_range (vm, bo->va_node.start, bo->va_node.size);panthor_vm_free_va (vm, &bo->va_node);drm_gem_object_put (bo->obj); - -out_free_bo:panthor_vm_put (vm);kfree (bo); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 117/354 spi: tegra210-quad: Fix timeout handling
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vishwaroop A <[email protected]>
[ Upstream commit b4e002d8a7cee3b1d70efad0e222567f92a73000 ]
When the CPU that the QSPI interrupt handler runs on (typically CPU 0) is excessively busy, it can lead to rare cases of the IRQ thread not running before the transfer timeout is reached.
While handling the timeouts, any pending transfers are cleaned up and the message that they correspond to is marked as failed, which leaves the curr_xfer field pointing at stale memory.
To avoid this, clear curr_xfer to NULL upon timeout and check for this condition when the IRQ thread is finally run.
While at it, also make sure to clear interrupts on failure so that new interrupts can be run.
A better, more involved, fix would move the interrupt clearing into a hard IRQ handler. Ideally we would also want to signal that the IRQ thread no longer needs to be run after the timeout is hit to avoid the extra check for a valid transfer.
--- drivers/spi/spi-tegra210-quad.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
drivers/spi/spi-tegra210-quad.c +20 -2
@@ -999,8 +999,10 @@ static void tegra_qspi_handle_error(struct tegra_qspi *tqspi)dev_err (tqspi->dev,"error in transfer, fifo status 0x%08x\n" , tqspi->status_reg);tegra_qspi_dump_regs (tqspi);tegra_qspi_flush_fifos (tqspi, true); -if (device_reset (tqspi->dev) <0 ) +if (device_reset (tqspi->dev) <0 ) {dev_warn_once (tqspi->dev,"device reset failed\n" ); +tegra_qspi_mask_clear_irq (tqspi); + } }static void tegra_qspi_transfer_end (struct spi_device *spi)
@@ -1145,9 +1147,11 @@ static int tegra_qspi_combined_seq_xfer(struct tegra_qspi *tqspi, }/* Reset controller if timeout happens */ -if (device_reset (tqspi->dev) <0 ) +if (device_reset (tqspi->dev) <0 ) {dev_warn_once (tqspi->dev,"device reset failed\n" ); +tegra_qspi_mask_clear_irq (tqspi); + } ret = -EIO ; goto exit; }
@@ -1169,11 +1173,13 @@ static int tegra_qspi_combined_seq_xfer(struct tegra_qspi *tqspi,tegra_qspi_transfer_end (spi);spi_transfer_delay_exec (xfer); } + tqspi->curr_xfer =NULL ; transfer_phase++; } ret =0 ; exit: + tqspi->curr_xfer =NULL ; msg->status = ret;return ret;
@@ -1257,6 +1263,8 @@ static int tegra_qspi_non_combined_seq_xfer(struct tegra_qspi *tqspi, msg->actual_length += xfer->len + dummy_bytes; complete_xfer: + tqspi->curr_xfer =NULL ; +if (ret <0 ) {tegra_qspi_transfer_end (spi);spi_transfer_delay_exec (xfer);
@@ -1353,6 +1361,7 @@ static irqreturn_t handle_cpu_based_xfer(struct tegra_qspi *tqspi)tegra_qspi_calculate_curr_xfer_param (tqspi, t);tegra_qspi_start_cpu_based_transfer (tqspi, t); exit: + tqspi->curr_xfer =NULL ;spin_unlock_irqrestore (&tqspi->lock, flags);return IRQ_HANDLED ; }
@@ -1436,6 +1445,15 @@ static irqreturn_t tegra_qspi_isr_thread(int irq, void *context_data) {struct tegra_qspi *tqspi = context_data; +/* +* Occasionally the IRQ thread takes a long time to wake up (usually +* when the CPU that it's running on is excessively busy) and we have +* already reached the timeout before and cleaned up the timed out +* transfer. Avoid any processing in that case and bail out early. +*/ +if (!tqspi->curr_xfer) +return IRQ_NONE ; + tqspi->status_reg =tegra_qspi_readl (tqspi,QSPI_FIFO_STATUS );if (tqspi->cur_direction &DATA_DIR_TX )
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 118/354 libbpf: Fix parsing of multi-split BTF
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Maguire <[email protected]>
[ Upstream commit 4f596acc260e691a2e348f64230392f3472feea3 ]
When creating multi-split BTF we correctly set the start string offset to be the size of the base string section plus the base BTF start string offset; the latter is needed for multi-split BTF since the offset is non-zero there.
Unfortunately the BTF parsing case needed that logic and it was missed.
--- tools/lib/bpf/btf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/bpf/btf.c +2 -2
@@ -1046,7 +1046,7 @@ static struct btf *btf_new(const void *data, __u32 size, struct btf *base_btf)if (base_btf) { btf->base_btf = base_btf; btf->start_id =btf__type_cnt (base_btf); - btf->start_str_off = base_btf->hdr->str_len; + btf->start_str_off = base_btf->hdr->str_len + base_btf->start_str_off; } btf->raw_data =malloc (size);
@@ -5504,7 +5504,7 @@ void btf_set_base_btf(struct btf *btf, const struct btf *base_btf) { btf->base_btf = (struct btf *)base_btf; btf->start_id =btf__type_cnt (base_btf); - btf->start_str_off = base_btf->hdr->str_len; + btf->start_str_off = base_btf->hdr->str_len + base_btf->start_str_off; }int btf__relocate (struct btf *btf,const struct btf *base_btf)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 119/354 ARM: dts: am335x-netcom-plus-2xx: add missing GPIO labels
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yegor Yefremov <[email protected]>
[ Upstream commit d0c4b1723c419a18cb434903c7754954ecb51d35 ]
--- arch/arm/boot/dts/ti/omap/am335x-netcom-plus-2xx.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/ti/omap/am335x-netcom-plus-2xx.dts +4 -4
@@ -222,10 +222,10 @@ &gpio3 { "ModeA1", "ModeA2", "ModeA3", - "NC", - "NC", - "NC", - "NC", + "ModeB0", + "ModeB1", + "ModeB2", + "ModeB3", "NC", "NC", "NC",
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 120/354 ARM: dts: omap3: beagle-xm: Correct obsolete TWL4030 power compatible
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jihed Chaibi <[email protected]>
[ Upstream commit f7f3bc18300a230e0f1bfb17fc8889435c1e47f5 ]
The "ti,twl4030-power-beagleboard-xm" compatible string is obsolete and is not supported by any in-kernel driver. Currently, the kernel falls back to the second entry, "ti,twl4030-power-idle-osc-off", to bind a driver to this node.
Make this fallback explicit by removing the obsolete board-specific compatible. This preserves the existing functionality while making the DTS compliant with the new, stricter 'ti,twl.yaml' binding.
--- arch/arm/boot/dts/ti/omap/omap3-beagle-xm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ti/omap/omap3-beagle-xm.dts +1 -1
@@ -291,7 +291,7 @@ codec { }; twl_power: power { - compatible = "ti,twl4030-power-beagleboard-xm", "ti,twl4030-power-idle-osc-off"; + compatible = "ti,twl4030-power-idle-osc-off"; ti,use_poweroff; }; };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 121/354 ARM: dts: omap3: n900: Correct obsolete TWL4030 power compatible
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jihed Chaibi <[email protected]>
[ Upstream commit 3862123e9b56663c7a3e4a308e6e65bffe44f646 ]
The "ti,twl4030-power-n900" compatible string is obsolete and is not supported by any in-kernel driver. Currently, the kernel falls back to the second entry, "ti,twl4030-power-idle-osc-off", to bind a driver to this node.
Make this fallback explicit by removing the obsolete board-specific compatible. This preserves the existing functionality while making the DTS compliant with the new, stricter 'ti,twl.yaml' binding.
--- arch/arm/boot/dts/ti/omap/omap3-n900.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ti/omap/omap3-n900.dts +1 -1
@@ -508,7 +508,7 @@ twl_audio: audio { }; twl_power: power { - compatible = "ti,twl4030-power-n900", "ti,twl4030-power-idle-osc-off"; + compatible = "ti,twl4030-power-idle-osc-off"; ti,use_poweroff; }; };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 122/354 x86/boot: Fix page table access in 5-level to 4-level paging transition
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Usama Arif <[email protected]>
[ Upstream commit eb2266312507d7b757859e2227aa5c4ba6280ebe ]
When transitioning from 5-level to 4-level paging, the existing code incorrectly accesses page table entries by directly dereferencing CR3 and applying PAGE_MASK. This approach has several issues:
- __native_read_cr3() returns the raw CR3 register value, which on x86_64 includes not just the physical address but also flags. Bits above the physical address width of the system i.e. above __PHYSICAL_MASK_SHIFT) are also not masked.
- The PGD entry is masked by PAGE_SIZE which doesn't take into account the higher bits such as _PAGE_BIT_NOPTISHADOW.
Replace this with proper accessor functions:
- native_read_cr3_pa(): Uses CR3_ADDR_MASK to additionally mask metadata out of CR3 (like SME or LAM bits). All remaining bits are real address bits or reserved and must be 0.
- mask pgd value with PTE_PFN_MASK instead of PAGE_MASK, accounting for flags above bit 51 (_PAGE_BIT_NOPTISHADOW in particular). Bits below 51, but above the max physical address are reserved and must be 0.
--- arch/x86/boot/compressed/pgtable_64.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
arch/x86/boot/compressed/pgtable_64.c +7 -4
@@ -3,6 +3,7 @@#include <asm/bootparam.h> #include <asm/bootparam_utils.h> #include <asm/e820/types.h> +#include <asm/pgtable.h> #include <asm/processor.h> #include "pgtable.h" #include "../string.h"
@@ -176,9 +177,10 @@ asmlinkage void configure_5level_paging(struct boot_params *bp, void *pgtable)* For 4- to 5-level paging transition, set up current CR3 as * the first and the only entry in a new top-level page table. */ - *trampoline_32bit =__native_read_cr3 () | _PAGE_TABLE_NOENC; + *trampoline_32bit =native_read_cr3_pa () | _PAGE_TABLE_NOENC; }else { -unsigned long src; +u64 *new_cr3; +pgd_t *pgdp;/* * For 5- to 4-level paging transition, copy page table pointed
@@ -188,8 +190,9 @@ asmlinkage void configure_5level_paging(struct boot_params *bp, void *pgtable)* We cannot just point to the page table from trampoline as it * may be above 4G. */ - src = *(unsigned long *)__native_read_cr3 () &PAGE_MASK ; -memcpy (trampoline_32bit, (void *)src,PAGE_SIZE ); + pgdp = (pgd_t *)native_read_cr3_pa (); + new_cr3 = (u64 *)(native_pgd_val (pgdp[0 ]) &PTE_PFN_MASK ); +memcpy (trampoline_32bit, new_cr3,PAGE_SIZE ); }toggle_la57 (trampoline_32bit);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 123/354 efi/libstub: Fix page table access in 5-level to 4-level paging transition
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Usama Arif <[email protected]>
[ Upstream commit 84361123413efc84b06f3441c6c827b95d902732 ]
When transitioning from 5-level to 4-level paging, the existing code incorrectly accesses page table entries by directly dereferencing CR3 and applying PAGE_MASK. This approach has several issues:
- __native_read_cr3() returns the raw CR3 register value, which on x86_64 includes not just the physical address but also flags Bits above the physical address width of the system (i.e. above __PHYSICAL_MASK_SHIFT) are also not masked.
- The pgd value is masked by PAGE_SIZE which doesn't take into account the higher bits such as _PAGE_BIT_NOPTISHADOW.
Replace this with proper accessor functions:
- native_read_cr3_pa(): Uses CR3_ADDR_MASK to additionally mask metadata out of CR3 (like SME or LAM bits). All remaining bits are real address bits or reserved and must be 0.
- mask pgd value with PTE_PFN_MASK instead of PAGE_MASK, accounting for flags above bit 51 (_PAGE_BIT_NOPTISHADOW in particular). Bits below 51, but above the max physical address are reserved and must be 0.
--- drivers/firmware/efi/libstub/x86-5lvl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/efi/libstub/x86-5lvl.c +2 -2
@@ -66,7 +66,7 @@ void efi_5level_switch(void)bool have_la57 =native_read_cr4 () &X86_CR4_LA57 ;bool need_toggle = want_la57 ^ have_la57;u64 *pgt = (void *)la57_toggle +PAGE_SIZE ; -u64 *cr3 = (u64 *)__native_read_cr3 (); +pgd_t *cr3 = (pgd_t *)native_read_cr3_pa ();u64 *new_cr3;if (!la57_toggle || !need_toggle)
@@ -82,7 +82,7 @@ void efi_5level_switch(void) new_cr3[0 ] = (u64 )cr3 | _PAGE_TABLE_NOENC; }else {/* take the new root table pointer from the current entry #0 */ - new_cr3 = (u64 *)(cr3[0 ] &PAGE_MASK ); + new_cr3 = (u64 *)(native_pgd_val (cr3[0 ]) &PTE_PFN_MASK );/* copy the new root table if it is not 32-bit addressable */ if ((u64 )new_cr3 >U32_MAX )
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 124/354 locktorture: Fix memory leak in param_set_cpumask()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang Liang <[email protected]>
[ Upstream commit e52b43883d084a9af263c573f2a1bd1ca5088389 ]
With CONFIG_CPUMASK_OFFSTACK=y, the 'bind_writers' buffer is allocated via alloc_cpumask_var() in param_set_cpumask(). But it is not freed, when setting the module parameter multiple times by sysfs interface or removing module.
Below kmemleak trace is seen for this issue:
unreferenced object 0xffff888100aabff8 (size 8):
comm "bash", pid 323, jiffies 4295059233
hex dump (first 8 bytes):
07 00 00 00 00 00 00 00 ........
backtrace (crc ac50919):
__kmalloc_node_noprof+0x2e5/0x420
alloc_cpumask_var_node+0x1f/0x30
param_set_cpumask+0x26/0xb0 [locktorture]
param_attr_store+0x93/0x100
module_attr_store+0x1b/0x30
kernfs_fop_write_iter+0x114/0x1b0
vfs_write+0x300/0x410
ksys_write+0x60/0xd0
do_syscall_64+0xa4/0x260
entry_SYSCALL_64_after_hwframe+0x77/0x7fThis issue can be reproduced by:
insmod locktorture.ko bind_writers=1
rmmod locktorture
or:
insmod locktorture.ko bind_writers=1
echo 2 > /sys/module/locktorture/parameters/bind_writers
Considering that setting the module parameter 'bind_writers' or 'bind_readers' by sysfs interface has no real effect, set the parameter permissions to 0444. To fix the memory leak when removing module, free 'bind_writers' and 'bind_readers' memory in lock_torture_cleanup().
--- kernel/locking/locktorture.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
kernel/locking/locktorture.c +6 -2
@@ -103,8 +103,8 @@ static const struct kernel_param_ops lt_bind_ops = { .get = param_get_cpumask, }; -module_param_cb (bind_readers, <_bind_ops, &bind_readers,0644 ); -module_param_cb (bind_writers, <_bind_ops, &bind_writers,0644 ); +module_param_cb (bind_readers, <_bind_ops, &bind_readers,0444 ); +module_param_cb (bind_writers, <_bind_ops, &bind_writers,0444 );long torture_sched_setaffinity (pid_t pid,const struct cpumask *in_mask);
@@ -1157,6 +1157,10 @@ static void lock_torture_cleanup(void) cxt.cur_ops->exit (); cxt.init_called = false; } + +free_cpumask_var (bind_readers); +free_cpumask_var (bind_writers); +torture_cleanup_end (); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 125/354 mfd: da9055: Fix missing regmap_del_irq_chip() in error path
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haotian Zhang <[email protected]>
[ Upstream commit 1b58acfd067ca16116b9234cd6b2d30cc8ab7502 ]
When da9055_device_init() fails after regmap_add_irq_chip() succeeds but mfd_add_devices() fails, the error handling path only calls mfd_remove_devices() but forgets to call regmap_del_irq_chip(). This results in a resource leak.
Fix this by adding regmap_del_irq_chip() to the error path so that resources are released properly.
--- drivers/mfd/da9055-core.c | 1 + 1 file changed, 1 insertion(+)
drivers/mfd/da9055-core.c +1 -0
@@ -388,6 +388,7 @@ int da9055_device_init(struct da9055 *da9055) err:mfd_remove_devices (da9055->dev); +regmap_del_irq_chip (da9055->chip_irq, da9055->irq_data);return ret; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 126/354 ext4: correct the checking of quota files before moving extents
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Yi <[email protected]>
[ Upstream commit a2e5a3cea4b18f6e2575acc444a5e8cce1fc8260 ]
The move extent operation should return -EOPNOTSUPP if any of the inodes is a quota inode, rather than requiring both to be quota inodes.
Message-ID: <[email protected]>
--- fs/ext4/move_extent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/move_extent.c +1 -1
@@ -487,7 +487,7 @@ mext_check_arguments(struct inode *orig_inode,return -ETXTBSY ; } -if (ext4_is_quota_file (orig_inode) &&ext4_is_quota_file (donor_inode)) { +if (ext4_is_quota_file (orig_inode) ||ext4_is_quota_file (donor_inode)) {ext4_debug ("ext4 move extent: The argument files should not be quota files [ino:orig %lu, donor %lu]\n" , orig_inode->i_ino, donor_inode->i_ino);return -EOPNOTSUPP ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 127/354 perf/x86/intel: Correct large PEBS flag check
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dapeng Mi <[email protected]>
[ Upstream commit 5e4e355ae7cdeb0fef5dbe908866e1f895abfacc ]
current large PEBS flag check only checks if sample_regs_user contains unsupported GPRs but doesn't check if sample_regs_intr contains unsupported GPRs.
Of course, currently PEBS HW supports to sample all perf supported GPRs, the missed check doesn't cause real issue. But it won't be true any more after the subsequent patches support to sample SSP register. SSP sampling is not supported by adaptive PEBS HW and it would be supported until arch-PEBS HW. So correct this issue.
--- arch/x86/events/intel/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/events/intel/core.c +3 -1
@@ -3872,7 +3872,9 @@ static unsigned long intel_pmu_large_pebs_flags(struct perf_event *event)if (!event->attr.exclude_kernel) flags &= ~PERF_SAMPLE_REGS_USER ;if (event->attr.sample_regs_user & ~PEBS_GP_REGS ) - flags &= ~(PERF_SAMPLE_REGS_USER |PERF_SAMPLE_REGS_INTR ); + flags &= ~PERF_SAMPLE_REGS_USER ; +if (event->attr.sample_regs_intr & ~PEBS_GP_REGS ) + flags &= ~PERF_SAMPLE_REGS_INTR ;return flags; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 128/354 regulator: core: disable supply if enabling main regulator fails
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gabor Juhos <[email protected]>
[ Upstream commit fb1ebb10468da414d57153ddebaab29c38ef1a78 ]
For 'always-on' and 'boot-on' regulators, the set_machine_constraints() may enable supply before enabling the main regulator, however if the latter fails, the function returns with an error but the supply remains enabled.
When this happens, the regulator_register() function continues on the error path where it puts the supply regulator. Since enabling the supply is not balanced with a disable call, a warning similar to the following gets issued from _regulator_put():
[ 1.603889] WARNING: CPU: 2 PID: 44 at _regulator_put+0x8c/0xa0
[ 1.603908] Modules linked in:
[ 1.603926] CPU: 2 UID: 0 PID: 44 Comm: kworker/u16:3 Not tainted 6.18.0-rc4 #0 NONE
[ 1.603938] Hardware name: Qualcomm Technologies, Inc. IPQ9574/AP-AL02-C7 (DT)
[ 1.603945] Workqueue: async async_run_entry_fn
[ 1.603958] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 1.603967] pc : _regulator_put+0x8c/0xa0
[ 1.603976] lr : _regulator_put+0x7c/0xa0
...
[ 1.604140] Call trace:
[ 1.604145] _regulator_put+0x8c/0xa0 (P)
[ 1.604156] regulator_register+0x2ec/0xbf0
[ 1.604166] devm_regulator_register+0x60/0xb0
[ 1.604178] rpm_reg_probe+0x120/0x208
[ 1.604187] platform_probe+0x64/0xa8
...In order to avoid this, change the set_machine_constraints() function to disable the supply if enabling the main regulator fails.
--- drivers/regulator/core.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/regulator/core.c +5 -0
@@ -1593,6 +1593,8 @@ static int set_machine_constraints(struct regulator_dev *rdev)* and we have control then make sure it is enabled. */ if (rdev->constraints->always_on || rdev->constraints->boot_on) { +bool supply_enabled = false; +/* If we want to enable this regulator, make sure that we know * the supplying regulator. */
@@ -1612,11 +1614,14 @@ static int set_machine_constraints(struct regulator_dev *rdev) rdev->supply =NULL ;return ret; } + supply_enabled = true; } ret =_regulator_do_enable (rdev);if (ret <0 && ret != -EINVAL ) {rdev_err (rdev,"failed to enable: %pe\n" ,ERR_PTR (ret)); +if (supply_enabled) +regulator_disable (rdev->supply);return ret; }
Signature · 1 line
2.51.0