Commit Graph

654 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
69f799168c Merge 6.12.31 into android16-6.12-lts
GKI (arm64) relevant 137 out of 624 changes, affecting 192 files +1647/-1035
  a4f865ecdb nvmem: core: fix bit offsets of more than one byte [1 file, +17/-7]
  4327479e55 nvmem: core: verify cell's raw_len [1 file, +12/-0]
  410f8b72e0 nvmem: core: update raw_len if the bit reading is required [1 file, +3/-1]
  7aea1517fb scsi: ufs: Introduce quirk to extend PA_HIBERN8TIME for UFS devices [2 files, +35/-0]
  b730cb1096 virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN [1 file, +1/-1]
  2998813177 dma/mapping.c: dev_dbg support for dma_addressing_limited [1 file, +10/-1]
  3eec42a17a dma-mapping: avoid potential unused data compilation warning [1 file, +8/-4]
  97edaa0ec6 cgroup: Fix compilation issue due to cgroup_mutex not being exported [1 file, +1/-1]
  f93675793b vhost_task: fix vhost_task_create() documentation [1 file, +1/-1]
  e22034cbee dma-mapping: Fix warning reported for missing prototype [1 file, +8/-8]
  4f5553a08f fs/buffer: split locking for pagecache lookups [1 file, +25/-16]
  e138fc2316 fs/buffer: introduce sleeping flavors for pagecache lookups [2 files, +17/-0]
  a49a4a87ce fs/buffer: use sleeping version of __find_get_block() [1 file, +9/-2]
  f1c5aa614b fs/jbd2: use sleeping version of __find_get_block() [1 file, +9/-6]
  9ece099e95 fs/ext4: use sleeping version of sb_find_get_block() [1 file, +2/-1]
  64f505b08e block: fix race between set_blocksize and read paths [4 files, +43/-1]
  218c838d03 io_uring: don't duplicate flushing in io_req_post_cqe [1 file, +8/-3]
  8014d3e56e bpf: fix possible endless loop in BPF map iteration [1 file, +1/-1]
  d40ca27602 fuse: Return EPERM rather than ENOSYS from link() [1 file, +2/-0]
  bab0bd1389 exfat: call bh_read in get_block only when necessary [1 file, +77/-82]
  01677e7ee1 io_uring/msg: initialise msg request opcode [1 file, +1/-0]
  e506751b7d arm64: Add support for HIP09 Spectre-BHB mitigation [2 files, +3/-0]
  4f427ca9ed tracing: Mark binary printing functions with __printf() attribute [4 files, +18/-21]
  15787ab82a mailbox: use error ret code of of_parse_phandle_with_args() [1 file, +4/-3]
  f48ee562c0 Bluetooth: Disable SCO support if READ_VOICE_SETTING is unsupported/broken [1 file, +3/-0]
  44b79041c4 dql: Fix dql->limit value when reset. [1 file, +1/-1]
  ac30595154 lockdep: Fix wait context check on softirq for PREEMPT_RT [1 file, +18/-0]
  e63b634806 PCI: dwc: ep: Ensure proper iteration over outbound map windows [1 file, +1/-1]
  37ac2434aa ext4: on a remount, only log the ro or r/w state when it has changed [1 file, +4/-3]
  1d1e1efad1 libnvdimm/labels: Fix divide error in nd_label_data_init() [1 file, +2/-1]
  123bcd8f42 pidfs: improve multi-threaded exec and premature thread-group leader exit polling [3 files, +9/-9]
  8f82cf305e cgroup/rstat: avoid disabling irqs for O(num_cpu) [1 file, +5/-7]
  a5a507fa5f blk-cgroup: improve policy registration error handling [1 file, +12/-10]
  94c3cbc69a ext4: reorder capability check last [1 file, +2/-2]
  e658f2d94a bpf: Return prog btf_id without capable check [1 file, +2/-2]
  e2520cc19b PCI: dwc: Use resource start as ioremap() input in dw_pcie_pme_turn_off() [1 file, +1/-1]
  50452704ec jbd2: do not try to recover wiped journal [1 file, +6/-5]
  dab35f4921 tcp: reorganize tcp_in_ack_event() and tcp_count_delivered() [1 file, +32/-24]
  555c0b713c bpf: Allow pre-ordering for bpf cgroup progs [5 files, +30/-9]
  572ed3fb99 kconfig: do not clear SYMBOL_VALID when reading include/config/auto.conf [1 file, +12/-7]
  174dedce64 dm: restrict dm device size to 2^63-512 bytes [1 file, +4/-0]
  2f5f326214 ext4: reject the 'data_err=abort' option in nojournal mode [1 file, +12/-0]
  d0dc233fe2 posix-timers: Add cond_resched() to posix_timer_add() search loop [1 file, +1/-0]
  ae22452d15 posix-timers: Ensure that timer initialization is fully visible [1 file, +14/-7]
  3fb9ee05ec timer_list: Don't use %pK through printk() [1 file, +2/-2]
  21153e0974 netfilter: conntrack: Bound nf_conntrack sysctl writes [1 file, +9/-3]
  236a87e9d2 PNP: Expand length of fixup id string [1 file, +1/-1]
  6215143ad3 arm64/mm: Check pmd_table() in pmd_trans_huge() [1 file, +12/-12]
  8ad58a7eba arm64/mm: Check PUD_TYPE_TABLE in pud_bad() [1 file, +2/-1]
  28306c58da mmc: sdhci: Disable SD card clock before changing parameters [1 file, +7/-2]
  3a75fe58a1 usb: xhci: Don't change the status of stalled TDs on failed Stop EP [1 file, +11/-1]
  101a3b9920 printk: Check CON_SUSPEND when unblanking a console [1 file, +12/-2]
  faba68a86a wifi: cfg80211: allow IR in 20 MHz configurations [5 files, +46/-25]
  c1502fc84d ipv6: save dontfrag in cork [2 files, +6/-4]
  75ae2a3553 badblocks: Fix a nonsense WARN_ON() which checks whether a u64 variable < 0 [1 file, +3/-2]
  7caad075ac crypto: lzo - Fix compression buffer overrun [6 files, +106/-28]
  73d01bcbf2 tcp: bring back NUMA dispersion in inet_ehash_locks_alloc() [1 file, +26/-11]
  1c17190880 usb: xhci: set page size to the xHCI-supported size [2 files, +22/-20]
  93f581d763 drm/gem: Test for imported GEM buffers with helper [2 files, +16/-2]
  c4525b513d net: phylink: use pl->link_interface in phylink_expects_phy() [1 file, +1/-1]
  f29c876d72 perf/core: Clean up perf_try_init_event() [1 file, +38/-27]
  af73c8fd73 ublk: enforce ublks_max only for unprivileged devices [1 file, +27/-15]
  592ba27580 perf/hw_breakpoint: Return EOPNOTSUPP for unsupported breakpoint type [1 file, +3/-2]
  3de322a98b scsi: logging: Fix scsi_logging_level bounds [1 file, +3/-1]
  f33b310eac ipv4: fib: Move fib_valid_key_len() to rtm_to_fib_config(). [2 files, +16/-24]
  564f03a797 block: mark bounce buffering as incompatible with integrity [2 files, +5/-2]
  82209faa87 ublk: complete command synchronously on error [1 file, +6/-5]
  b98aad5e5e media: uvcvideo: Add sanity check to uvc_ioctl_xu_ctrl_map [1 file, +6/-0]
  2d6231d5ce media: uvcvideo: Handle uvc menu translation inside uvc_get_le_value [1 file, +32/-45]
  e359d62886 perf: arm_pmuv3: Call kvm_vcpu_pmu_resync_el0() before enabling counters [1 file, +2/-2]
  673dde8d3c bpf: Search and add kfuncs in struct_ops prologue and epilogue [1 file, +24/-1]
  083383aba0 cpuidle: menu: Avoid discarding useful information [1 file, +12/-1]
  20a53c3689 loop: check in LO_FLAGS_DIRECT_IO in loop_default_blocksize [1 file, +1/-1]
  b55a97d1bd dm: fix unconditional IO throttle caused by REQ_PREFLUSH [1 file, +6/-2]
  9f27b38771 crypto: ahash - Set default reqsize from ahash_alg [2 files, +7/-0]
  897c98fb32 crypto: skcipher - Zap type in crypto_alloc_sync_skcipher [1 file, +1/-0]
  4d9fa2ebc0 net: ipv6: Init tunnel link-netns before registering dev [4 files, +9/-7]
  53f42776e4 genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie [2 files, +25/-36]
  2b129e89b8 bpf: don't do clean_live_states when state->loop_entry->branches > 0 [1 file, +4/-0]
  46ba5757a7 bpf: copy_verifier_state() should copy 'loop_entry' field [1 file, +3/-0]
  82b54455b6 PCI: Fix old_size lower bound in calculate_iosize() too [1 file, +2/-4]
  dc5f5c9d2b hrtimers: Replace hrtimer_clock_to_base_table with switch-case [1 file, +12/-17]
  000dd6e344 ASoC: ops: Enforce platform maximum on initial value [1 file, +28/-1]
  c4260bf83b ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot() [1 file, +5/-3]
  5b1b4cb46d pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map [1 file, +8/-2]
  69689d1138 media: v4l: Memset argument to 0 before calling get_mbus_config pad op [2 files, +5/-1]
  e6e31b0182 sched: Reduce the default slice to avoid tasks getting an extra tick [1 file, +3/-3]
  ef31dc41cf phy: core: don't require set_mode() callback for phy_get_mode() to work [1 file, +4/-3]
  06daedb443 xfrm: prevent high SEQ input in non-ESN mode [1 file, +12/-0]
  9f2911868a ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure(). [2 files, +4/-4]
  7fea5a9140 r8152: add vendor/device ID pair for Dell Alienware AW1022z [2 files, +2/-0]
  16ddd67bb5 pstore: Change kmsg_bytes storage size to u32 [3 files, +9/-8]
  73733c2fdb ext4: don't write back data before punch hole in nojournal mode [1 file, +5/-13]
  1d15319323 f2fs: introduce f2fs_base_attr for global sysfs entries [1 file, +52/-22]
  ded26f9e4c ipv4: ip_gre: Fix set but not used warning in ipgre_err() if IPv4-only [1 file, +10/-6]
  76e56dbe50 net: flush_backlog() small changes [1 file, +8/-4]
  58cdd1ee65 bridge: mdb: Allow replace of a host-joined group [2 files, +2/-2]
  fcabb69674 rcu: handle unstable rdp in rcu_read_unlock_strict() [2 files, +11/-2]
  d402437cde rcu: fix header guard for rcu_all_qs() [1 file, +1/-1]
  887e39ac47 perf: Avoid the read if the count is already updated [3 files, +24/-18]
  c80b2d159c bpf: Use kallsyms to find the function name of a struct_ops's stub function [1 file, +44/-54]
  46f1c2b508 firmware: arm_scmi: Relax duplicate name constraint across protocol ids [1 file, +6/-13]
  1351052877 drm/atomic: clarify the rules around drm_atomic_state->allow_modeset [1 file, +21/-2]
  9fddd1f154 drm: Add valid clones check [1 file, +28/-0]
  ff214b079d nvme-pci: add quirks for device 126f:1001 [1 file, +3/-0]
  6d196cae4b nvme-pci: add quirks for WDC Blue SN550 15b7:5009 [1 file, +3/-0]
  6a09b6bad0 ALSA: usb-audio: Fix duplicated name in MIDI substream names [1 file, +12/-4]
  ad3e83a6c8 io_uring/fdinfo: annotate racy sq/cq head/tail reads [1 file, +2/-2]
  7f7c8c03fe btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref [1 file, +1/-1]
  8cafd7266f __legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock [1 file, +1/-5]
  28756f22de espintcp: fix skb leaks [3 files, +9/-3]
  9cbca30102 espintcp: remove encap socket caching to avoid reference leak [4 files, +8/-94]
  b1a687eb15 xfrm: Fix UDP GRO handling for some corner cases [2 files, +20/-16]
  447c8f0c06 kernel/fork: only call untrack_pfn_clear() on VMAs duplicated for fork() [1 file, +5/-4]
  252f78a931 xfrm: Sanitize marks before insert [2 files, +6/-0]
  7207effe47 driver core: Split devres APIs to device/devres.h [2 files, +125/-118]
  1e8b7e96f7 Bluetooth: L2CAP: Fix not checking l2cap_chan security level [1 file, +8/-7]
  cd7f022296 loop: don't require ->write_iter for writable files in loop_configure [1 file, +0/-3]
  873ebaf3c1 io_uring: fix overflow resched cqe reordering [1 file, +1/-0]
  689a205cd9 net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done [1 file, +5/-0]
  adb05149a9 can: slcan: allow reception of short error messages [1 file, +20/-6]
  cc55dd28c2 can: bcm: add locking for bcm_op runtime updates [1 file, +45/-21]
  63567ecd99 can: bcm: add missing rcu read protection for procfs content [1 file, +9/-4]
  bf85e49aaf ALSA: pcm: Fix race of buffer access at PCM OSS layer [3 files, +14/-2]
  e78908caf1 pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id() [1 file, +1/-1]
  dc9bdfb9b0 drm/edid: fixed the bug that hdr metadata was not reset [1 file, +1/-0]
  cb9a1019a6 Input: xpad - add more controllers [1 file, +3/-0]
  9b8263cae6 highmem: add folio_test_partial_kmap() [2 files, +12/-5]
  314bf771cb memcg: always call cond_resched() after fn() [1 file, +2/-4]
  9da33ce114 mm/page_alloc.c: avoid infinite retries caused by cpuset race [1 file, +8/-0]
  9f9517f156 mm: mmap: map MAP_STACK to VM_NOHUGEPAGE only if THP is enabled [1 file, +2/-0]
  94efb0d656 mm: vmalloc: actually use the in-place vrealloc region [1 file, +1/-0]
  483ac74183 mm: vmalloc: only zero-init on vrealloc shrink [1 file, +7/-5]
  1d45e0170c spi: use container_of_cont() for to_spi_device() [1 file, +1/-4]
  d28b0305f7 err.h: move IOMEM_ERR_PTR() to err.h [2 files, +3/-2]
  80eb73778d bpf: abort verification if env->cur_state->loop_entry != NULL [1 file, +4/-2]
  85fb1edd05 drm/gem: Internally test import_attach for imported objects [1 file, +1/-2]

Changes in 6.12.31
	drm/amd/display: Configure DTBCLK_P with OPTC only for dcn401
	drm/amd/display: Do not enable replay when vtotal update is pending.
	drm/amd/display: Correct timing_adjust_pending flag setting.
	drm/amd/display: Defer BW-optimization-blocked DRR adjustments
	i2c: designware: Use temporary variable for struct device
	i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
	phy: renesas: rcar-gen3-usb2: Move IRQ request in probe
	phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data
	phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off
	cpufreq: Add SM8650 to cpufreq-dt-platdev blocklist
	nvmem: rockchip-otp: Move read-offset into variant-data
	nvmem: rockchip-otp: add rk3576 variant data
	nvmem: core: fix bit offsets of more than one byte
	nvmem: core: verify cell's raw_len
	nvmem: core: update raw_len if the bit reading is required
	nvmem: qfprom: switch to 4-byte aligned reads
	scsi: target: iscsi: Fix timeout on deleted connection
	scsi: ufs: Introduce quirk to extend PA_HIBERN8TIME for UFS devices
	virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN
	dma/mapping.c: dev_dbg support for dma_addressing_limited
	intel_th: avoid using deprecated page->mapping, index fields
	mei: vsc: Use struct vsc_tp_packet as vsc-tp tx_buf and rx_buf type
	dma-mapping: avoid potential unused data compilation warning
	cgroup: Fix compilation issue due to cgroup_mutex not being exported
	vhost_task: fix vhost_task_create() documentation
	vhost-scsi: protect vq->log_used with vq->mutex
	scsi: mpi3mr: Add level check to control event logging
	net: enetc: refactor bulk flipping of RX buffers to separate function
	dma-mapping: Fix warning reported for missing prototype
	ima: process_measurement() needlessly takes inode_lock() on MAY_READ
	fs/buffer: split locking for pagecache lookups
	fs/buffer: introduce sleeping flavors for pagecache lookups
	fs/buffer: use sleeping version of __find_get_block()
	fs/ocfs2: use sleeping version of __find_get_block()
	fs/jbd2: use sleeping version of __find_get_block()
	fs/ext4: use sleeping version of sb_find_get_block()
	drm/amd/display: Enable urgent latency adjustment on DCN35
	drm/amdgpu: Allow P2P access through XGMI
	selftests/bpf: Mitigate sockmap_ktls disconnect_after_delete failure
	block: fix race between set_blocksize and read paths
	io_uring: don't duplicate flushing in io_req_post_cqe
	bpf: fix possible endless loop in BPF map iteration
	samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora
	kconfig: merge_config: use an empty file as initfile
	x86/fred: Fix system hang during S4 resume with FRED enabled
	s390/vfio-ap: Fix no AP queue sharing allowed message written to kernel log
	cifs: Add fallback for SMB2 CREATE without FILE_READ_ATTRIBUTES
	cifs: Fix querying and creating MF symlinks over SMB1
	cifs: Fix negotiate retry functionality
	smb: client: Store original IO parameters and prevent zero IO sizes
	fuse: Return EPERM rather than ENOSYS from link()
	exfat: call bh_read in get_block only when necessary
	io_uring/msg: initialise msg request opcode
	NFSv4: Check for delegation validity in nfs_start_delegation_return_locked()
	NFS: Don't allow waiting for exiting tasks
	SUNRPC: Don't allow waiting for exiting tasks
	arm64: Add support for HIP09 Spectre-BHB mitigation
	iommufd: Extend IOMMU_GET_HW_INFO to report PASID capability
	tracing: Mark binary printing functions with __printf() attribute
	ACPI: PNP: Add Intel OC Watchdog IDs to non-PNP device list
	tpm: Convert warn to dbg in tpm2_start_auth_session()
	mailbox: pcc: Use acpi_os_ioremap() instead of ioremap()
	mailbox: use error ret code of of_parse_phandle_with_args()
	riscv: Allow NOMMU kernels to access all of RAM
	fbdev: fsl-diu-fb: add missing device_remove_file()
	fbcon: Use correct erase colour for clearing in fbcon
	fbdev: core: tileblit: Implement missing margin clearing for tileblit
	cifs: Set default Netbios RFC1001 server name to hostname in UNC
	cifs: add validation check for the fields in smb_aces
	cifs: Fix establishing NetBIOS session for SMB2+ connection
	NFSv4: Treat ENETUNREACH errors as fatal for state recovery
	SUNRPC: rpc_clnt_set_transport() must not change the autobind setting
	SUNRPC: rpcbind should never reset the port to the value '0'
	spi-rockchip: Fix register out of bounds access
	ASoC: codecs: wsa884x: Correct VI sense channel mask
	ASoC: codecs: wsa883x: Correct VI sense channel mask
	mctp: Fix incorrect tx flow invalidation condition in mctp-i2c
	net: tn40xx: add pci-id of the aqr105-based Tehuti TN4010 cards
	net: tn40xx: create swnode for mdio and aqr105 phy and add to mdiobus
	thermal/drivers/mediatek/lvts: Start sensor interrupts disabled
	thermal/drivers/qoriq: Power down TMU on system suspend
	Bluetooth: btmtksdio: Prevent enabling interrupts after IRQ handler removal
	Bluetooth: Disable SCO support if READ_VOICE_SETTING is unsupported/broken
	dql: Fix dql->limit value when reset.
	lockdep: Fix wait context check on softirq for PREEMPT_RT
	objtool: Properly disable uaccess validation
	PCI: dwc: ep: Ensure proper iteration over outbound map windows
	r8169: disable RTL8126 ZRX-DC timeout
	tools/build: Don't pass test log files to linker
	pNFS/flexfiles: Report ENETDOWN as a connection error
	drm/amdgpu/discovery: check ip_discovery fw file available
	drm/amdkfd: set precise mem ops caps to disabled for gfx 11 and 12
	PCI: vmd: Disable MSI remapping bypass under Xen
	xen/pci: Do not register devices with segments >= 0x10000
	ext4: on a remount, only log the ro or r/w state when it has changed
	libnvdimm/labels: Fix divide error in nd_label_data_init()
	pidfs: improve multi-threaded exec and premature thread-group leader exit polling
	staging: vchiq_arm: Create keep-alive thread during probe
	mmc: host: Wait for Vdd to settle on card power off
	drm/amdgpu: Skip pcie_replay_count sysfs creation for VF
	cgroup/rstat: avoid disabling irqs for O(num_cpu)
	wifi: mt76: only mark tx-status-failed frames as ACKed on mt76x0/2
	wifi: mt76: mt7996: fix SER reset trigger on WED reset
	wifi: mt76: mt7996: revise TXS size
	wifi: mt76: mt7925: load the appropriate CLC data based on hardware type
	wifi: mt76: mt7925: fix fails to enter low power mode in suspend state
	x86/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in UAPI headers
	x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP
	x86/smpboot: Fix INIT delay assignment for extended Intel Families
	x86/microcode: Update the Intel processor flag scan check
	x86/mm: Check return value from memblock_phys_alloc_range()
	i2c: qup: Vote for interconnect bandwidth to DRAM
	i2c: pxa: fix call balance of i2c->clk handling routines
	btrfs: make btrfs_discard_workfn() block_group ref explicit
	btrfs: avoid linker error in btrfs_find_create_tree_block()
	btrfs: run btrfs_error_commit_super() early
	btrfs: fix non-empty delayed iputs list on unmount due to async workers
	btrfs: get zone unusable bytes while holding lock at btrfs_reclaim_bgs_work()
	btrfs: send: return -ENAMETOOLONG when attempting a path that is too long
	blk-cgroup: improve policy registration error handling
	drm/amdgpu: release xcp_mgr on exit
	drm/amd/display: Guard against setting dispclk low for dcn31x
	drm/amdgpu: adjust drm_firmware_drivers_only() handling
	i3c: master: svc: Fix missing STOP for master request
	s390/tlb: Use mm_has_pgste() instead of mm_alloc_pgste()
	dlm: make tcp still work in multi-link env
	clocksource/drivers/timer-riscv: Stop stimecmp when cpu hotplug
	um: Store full CSGSFS and SS register from mcontext
	um: Update min_low_pfn to match changes in uml_reserved
	wifi: mwifiex: Fix HT40 bandwidth issue.
	bnxt_en: Query FW parameters when the CAPS_CHANGE bit is set
	riscv: Call secondary mmu notifier when flushing the tlb
	ext4: reorder capability check last
	hypfs_create_cpu_files(): add missing check for hypfs_mkdir() failure
	scsi: st: Tighten the page format heuristics with MODE SELECT
	scsi: st: ERASE does not change tape location
	vfio/pci: Handle INTx IRQ_NOTCONNECTED
	bpf: Return prog btf_id without capable check
	PCI: dwc: Use resource start as ioremap() input in dw_pcie_pme_turn_off()
	jbd2: do not try to recover wiped journal
	tcp: reorganize tcp_in_ack_event() and tcp_count_delivered()
	rtc: rv3032: fix EERD location
	objtool: Fix error handling inconsistencies in check()
	thunderbolt: Do not add non-active NVM if NVM upgrade is disabled for retimer
	erofs: initialize decompression early
	spi: spi-mux: Fix coverity issue, unchecked return value
	ASoC: pcm6240: Drop bogus code handling IRQ as GPIO
	ASoC: mediatek: mt6359: Add stub for mt6359_accdet_enable_jack_detect
	bpf: Allow pre-ordering for bpf cgroup progs
	kbuild: fix argument parsing in scripts/config
	kconfig: do not clear SYMBOL_VALID when reading include/config/auto.conf
	crypto: octeontx2 - suppress auth failure screaming due to negative tests
	dm: restrict dm device size to 2^63-512 bytes
	net/smc: use the correct ndev to find pnetid by pnetid table
	xen: Add support for XenServer 6.1 platform device
	pinctrl-tegra: Restore SFSEL bit when freeing pins
	mfd: tps65219: Remove TPS65219_REG_TI_DEV_ID check
	drm/amdgpu/gfx12: don't read registers in mqd init
	drm/amdgpu/gfx11: don't read registers in mqd init
	drm/amdgpu: Update SRIOV video codec caps
	ASoC: sun4i-codec: support hp-det-gpios property
	clk: qcom: lpassaudiocc-sc7280: Add support for LPASS resets for QCM6490
	ext4: reject the 'data_err=abort' option in nojournal mode
	ext4: do not convert the unwritten extents if data writeback fails
	RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject()
	posix-timers: Add cond_resched() to posix_timer_add() search loop
	posix-timers: Ensure that timer initialization is fully visible
	net: stmmac: dwmac-rk: Validate GRF and peripheral GRF during probe
	net: hsr: Fix PRP duplicate detection
	timer_list: Don't use %pK through printk()
	wifi: rtw89: set force HE TB mode when connecting to 11ax AP
	netfilter: conntrack: Bound nf_conntrack sysctl writes
	PNP: Expand length of fixup id string
	phy: rockchip: usbdp: Only verify link rates/lanes/voltage when the corresponding set flags are set
	arm64/mm: Check pmd_table() in pmd_trans_huge()
	arm64/mm: Check PUD_TYPE_TABLE in pud_bad()
	mmc: dw_mmc: add exynos7870 DW MMC support
	mmc: sdhci: Disable SD card clock before changing parameters
	usb: xhci: Don't change the status of stalled TDs on failed Stop EP
	wifi: iwlwifi: mvm: fix setting the TK when associated
	hwmon: (dell-smm) Increment the number of fans
	iommu: Keep dev->iommu state consistent
	printk: Check CON_SUSPEND when unblanking a console
	wifi: iwlwifi: don't warn when if there is a FW error
	wifi: iwlwifi: w/a FW SMPS mode selection
	wifi: iwlwifi: fix debug actions order
	wifi: iwlwifi: mark Br device not integrated
	wifi: iwlwifi: fix the ECKV UEFI variable name
	wifi: mac80211: fix warning on disconnect during failed ML reconf
	wifi: mac80211_hwsim: Fix MLD address translation
	wifi: cfg80211: allow IR in 20 MHz configurations
	ipv6: save dontfrag in cork
	drm/amd/display: remove minimum Dispclk and apply oem panel timing.
	drm/amd/display: calculate the remain segments for all pipes
	drm/amd/display: not abort link train when bw is low
	drm/amd/display: Fix incorrect DPCD configs while Replay/PSR switch
	gfs2: Check for empty queue in run_queue
	auxdisplay: charlcd: Partially revert "Move hwidth and bwidth to struct hd44780_common"
	ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()
	badblocks: Fix a nonsense WARN_ON() which checks whether a u64 variable < 0
	coresight-etb10: change etb_drvdata spinlock's type to raw_spinlock_t
	iommu/amd/pgtbl_v2: Improve error handling
	cpufreq: tegra186: Share policy per cluster
	watchdog: aspeed: Update bootstatus handling
	PCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops
	misc: pci_endpoint_test: Give disabled BARs a distinct error code
	crypto: lzo - Fix compression buffer overrun
	crypto: mxs-dcp - Only set OTP_KEY bit for OTP key
	drm/amdkfd: Set per-process flags only once for gfx9/10/11/12
	drm/amdkfd: Set per-process flags only once cik/vi
	drm/amdgpu: Fix missing drain retry fault the last entry
	arm64: tegra: p2597: Fix gpio for vdd-1v8-dis regulator
	arm64: tegra: Resize aperture for the IGX PCIe C5 slot
	powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7
	ALSA: seq: Improve data consistency at polling
	tcp: bring back NUMA dispersion in inet_ehash_locks_alloc()
	rtc: ds1307: stop disabling alarms on probe
	ieee802154: ca8210: Use proper setters and getters for bitwise types
	drm/xe: Nuke VM's mapping upon close
	drm/xe: Retry BO allocation
	soc: samsung: include linux/array_size.h where needed
	ARM: tegra: Switch DSI-B clock parent to PLLD on Tegra114
	media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()
	usb: xhci: set page size to the xHCI-supported size
	dm cache: prevent BUG_ON by blocking retries on failed device resumes
	soc: mediatek: mtk-mutex: Add DPI1 SOF/EOF to MT8188 mutex tables
	orangefs: Do not truncate file size
	drm/gem: Test for imported GEM buffers with helper
	net: phylink: use pl->link_interface in phylink_expects_phy()
	blk-throttle: don't take carryover for prioritized processing of metadata
	remoteproc: qcom_wcnss: Handle platforms with only single power domain
	drm/amdgpu: Do not program AGP BAR regs under SRIOV in gfxhub_v1_0.c
	drm/amd/display: Ensure DMCUB idle before reset on DCN31/DCN35
	drm/amd/display: Skip checking FRL_MODE bit for PCON BW determination
	drm/amd/display: Fix DMUB reset sequence for DCN401
	drm/amd/display: Fix p-state type when p-state is unsupported
	drm/amd/display: Request HW cursor on DCN3.2 with SubVP
	perf/core: Clean up perf_try_init_event()
	media: cx231xx: set device_caps for 417
	pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned"
	rcu: Fix get_state_synchronize_rcu_full() GP-start detection
	net: ethernet: ti: cpsw_new: populate netdev of_node
	net: phy: nxp-c45-tja11xx: add match_phy_device to TJA1103/TJA1104
	dpll: Add an assertion to check freq_supported_num
	ublk: enforce ublks_max only for unprivileged devices
	iommufd: Disallow allocating nested parent domain with fault ID
	media: imx335: Set vblank immediately
	net: pktgen: fix mpls maximum labels list parsing
	perf/hw_breakpoint: Return EOPNOTSUPP for unsupported breakpoint type
	ALSA: hda/realtek: Enable PC beep passthrough for HP EliteBook 855 G7
	scsi: logging: Fix scsi_logging_level bounds
	ipv4: fib: Move fib_valid_key_len() to rtm_to_fib_config().
	drm/rockchip: vop2: Add uv swap for cluster window
	block: mark bounce buffering as incompatible with integrity
	ublk: complete command synchronously on error
	media: uvcvideo: Add sanity check to uvc_ioctl_xu_ctrl_map
	media: uvcvideo: Handle uvc menu translation inside uvc_get_le_value
	clk: imx8mp: inform CCF of maximum frequency of clocks
	x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2
	hwmon: (gpio-fan) Add missing mutex locks
	ARM: at91: pm: fix at91_suspend_finish for ZQ calibration
	drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence
	fpga: altera-cvp: Increase credit timeout
	perf: arm_pmuv3: Call kvm_vcpu_pmu_resync_el0() before enabling counters
	soc: apple: rtkit: Use high prio work queue
	soc: apple: rtkit: Implement OSLog buffers properly
	wifi: ath12k: Report proper tx completion status to mac80211
	PCI: brcmstb: Expand inbound window size up to 64GB
	PCI: brcmstb: Add a softdep to MIP MSI-X driver
	firmware: arm_ffa: Set dma_mask for ffa devices
	drm/xe/vf: Retry sending MMIO request to GUC on timeout error
	drm/xe/pf: Create a link between PF and VF devices
	net/mlx5: Avoid report two health errors on same syndrome
	selftests/net: have `gro.sh -t` return a correct exit code
	pinctrl: sophgo: avoid to modify untouched bit when setting cv1800 pinconf
	drm/amdkfd: KFD release_work possible circular locking
	drm/xe: xe_gen_wa_oob: replace program_invocation_short_name
	leds: pwm-multicolor: Add check for fwnode_property_read_u32
	net: ethernet: mtk_ppe_offload: Allow QinQ, double ETH_P_8021Q only
	net: xgene-v2: remove incorrect ACPI_PTR annotation
	bonding: report duplicate MAC address in all situations
	wifi: ath12k: Improve BSS discovery with hidden SSID in 6 GHz band
	soc: ti: k3-socinfo: Do not use syscon helper to build regmap
	bpf: Search and add kfuncs in struct_ops prologue and epilogue
	Octeontx2-af: RPM: Register driver with PCI subsys IDs
	x86/build: Fix broken copy command in genimage.sh when making isoimage
	drm/amd/display: handle max_downscale_src_width fail check
	drm/amd/display: fix dcn4x init failed
	drm/amd/display: Fix mismatch type comparison
	ASoC: mediatek: mt8188: Treat DMIC_GAINx_CUR as non-volatile
	ASoC: mediatek: mt8188: Add reference for dmic clocks
	x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()
	vhost-scsi: Return queue full for page alloc failures during copy
	vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines
	cpuidle: menu: Avoid discarding useful information
	media: adv7180: Disable test-pattern control on adv7180
	media: tc358746: improve calculation of the D-PHY timing registers
	net/mlx5e: Add correct match to check IPSec syndromes for switchdev mode
	scsi: mpi3mr: Update timestamp only for supervisor IOCs
	loop: check in LO_FLAGS_DIRECT_IO in loop_default_blocksize
	libbpf: Fix out-of-bound read
	dm: fix unconditional IO throttle caused by REQ_PREFLUSH
	scsi: scsi_debug: First fixes for tapes
	net/mlx5: Change POOL_NEXT_SIZE define value and make it global
	x86/kaslr: Reduce KASLR entropy on most x86 systems
	crypto: ahash - Set default reqsize from ahash_alg
	crypto: skcipher - Zap type in crypto_alloc_sync_skcipher
	net: ipv6: Init tunnel link-netns before registering dev
	drm/xe/oa: Ensure that polled read returns latest data
	MIPS: Use arch specific syscall name match function
	drm/amdgpu: remove all KFD fences from the BO on release
	x86/locking: Use ALT_OUTPUT_SP() for percpu_{,try_}cmpxchg{64,128}_op()
	genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie
	MIPS: pm-cps: Use per-CPU variables as per-CPU, not per-core
	clocksource: mips-gic-timer: Enable counter when CPUs start
	PCI: epf-mhi: Update device ID for SA8775P
	scsi: mpt3sas: Send a diag reset if target reset fails
	wifi: rtw88: Fix rtw_init_vht_cap() for RTL8814AU
	wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU
	wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31
	wifi: rtw89: fw: propagate error code from rtw89_h2c_tx()
	wifi: rtw89: fw: get sb_sel_ver via get_unaligned_le32()
	wifi: rtw89: fw: add blacklist to avoid obsolete secure firmware
	wifi: rtw89: 8922a: fix incorrect STA-ID in EHT MU PPDU
	net: pktgen: fix access outside of user given buffer in pktgen_thread_write()
	power: supply: axp20x_battery: Update temp sensor for AXP717 from device tree
	EDAC/ie31200: work around false positive build warning
	i3c: master: svc: Flush FIFO before sending Dynamic Address Assignment(DAA)
	mfd: axp20x: AXP717: Add AXP717_TS_PIN_CFG to writeable regs
	eeprom: ee1004: Check chip before probing
	irqchip/riscv-imsic: Separate next and previous pointers in IMSIC vector
	drm/amd/pm: Fetch current power limit from PMFW
	drm/amd/display: Add support for disconnected eDP streams
	drm/amd/display: Guard against setting dispclk low when active
	drm/amd/display: Fix BT2020 YCbCr limited/full range input
	drm/amd/display: Read LTTPR ALPM caps during link cap retrieval
	Revert "drm/amd/display: Request HW cursor on DCN3.2 with SubVP"
	drm/amd/display: Don't treat wb connector as physical in create_validate_stream_for_sink
	serial: mctrl_gpio: split disable_ms into sync and no_sync APIs
	RDMA/core: Fix best page size finding when it can cross SG entries
	pmdomain: imx: gpcv2: use proper helper for property detection
	can: c_can: Use of_property_present() to test existence of DT property
	bpf: don't do clean_live_states when state->loop_entry->branches > 0
	bpf: copy_verifier_state() should copy 'loop_entry' field
	eth: mlx4: don't try to complete XDP frames in netpoll
	PCI: Fix old_size lower bound in calculate_iosize() too
	ACPI: HED: Always initialize before evged
	vxlan: Join / leave MC group after remote changes
	hrtimers: Replace hrtimer_clock_to_base_table with switch-case
	irqchip/riscv-imsic: Set irq_set_affinity() for IMSIC base
	media: test-drivers: vivid: don't call schedule in loop
	net/mlx5: Modify LSB bitmask in temperature event to include only the first bit
	net/mlx5: Apply rate-limiting to high temperature warning
	firmware: arm_ffa: Reject higher major version as incompatible
	firmware: arm_ffa: Handle the presence of host partition in the partition info
	firmware: xilinx: Dont send linux address to get fpga config get status
	ASoC: ops: Enforce platform maximum on initial value
	ASoC: tas2764: Add reg defaults for TAS2764_INT_CLK_CFG
	ASoC: tas2764: Mark SW_RESET as volatile
	ASoC: tas2764: Power up/down amp on mute ops
	ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()
	pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map
	smack: recognize ipv4 CIPSO w/o categories
	smack: Revert "smackfs: Added check catlen"
	kunit: tool: Use qboot on QEMU x86_64
	media: i2c: imx219: Correct the minimum vblanking value
	media: v4l: Memset argument to 0 before calling get_mbus_config pad op
	net/mlx4_core: Avoid impossible mlx4_db_alloc() order value
	drm/xe: Stop ignoring errors from xe_ttm_stolen_mgr_init()
	drm/xe: Fix xe_tile_init_noalloc() error propagation
	clk: qcom: ipq5018: allow it to be bulid on arm32
	clk: qcom: clk-alpha-pll: Do not use random stack value for recalc rate
	drm/xe/debugfs: fixed the return value of wedged_mode_set
	drm/xe/debugfs: Add missing xe_pm_runtime_put in wedge_mode_set
	x86/ibt: Handle FineIBT in handle_cfi_failure()
	x86/traps: Cleanup and robustify decode_bug()
	sched: Reduce the default slice to avoid tasks getting an extra tick
	serial: sh-sci: Update the suspend/resume support
	pinctrl: renesas: rzg2l: Add suspend/resume support for pull up/down
	phy: phy-rockchip-samsung-hdptx: Swap the definitions of LCPLL_REF and ROPLL_REF
	phy: core: don't require set_mode() callback for phy_get_mode() to work
	phy: exynos5-usbdrd: fix EDS distribution tuning (gs101)
	soundwire: amd: change the soundwire wake enable/disable sequence
	soundwire: cadence_master: set frame shape and divider based on actual clk freq
	net: stmmac: dwmac-loongson: Set correct {tx,rx}_fifo_size
	drm/amdgpu/mes11: fix set_hw_resources_1 calculation
	drm/amdkfd: fix missing L2 cache info in topology
	drm/amdgpu: Set snoop bit for SDMA for MI series
	drm/amd/display: pass calculated dram_speed_mts to dml2
	drm/amd/display: Don't try AUX transactions on disconnected link
	drm/amdgpu: reset psp->cmd to NULL after releasing the buffer
	drm/amd/pm: Skip P2S load for SMU v13.0.12
	drm/amd/display: Support multiple options during psr entry.
	Revert "drm/amd/display: Exit idle optimizations before attempt to access PHY"
	drm/amd/display: Update CR AUX RD interval interpretation
	drm/amd/display: Initial psr_version with correct setting
	drm/amd/display: Increase block_sequence array size
	drm/amd/display: Use Nominal vBlank If Provided Instead Of Capping It
	drm/amd/display: Populate register address for dentist for dcn401
	drm/amdgpu: Use active umc info from discovery
	drm/amdgpu: enlarge the VBIOS binary size limit
	drm/amd/display/dm: drop hw_support check in amdgpu_dm_i2c_xfer()
	scsi: target: spc: Fix loop traversal in spc_rsoc_get_descr()
	net/mlx5: XDP, Enable TX side XDP multi-buffer support
	net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB
	net/mlx5e: set the tx_queue_len for pfifo_fast
	net/mlx5e: reduce rep rxq depth to 256 for ECPF
	net/mlx5e: reduce the max log mpwrq sz for ECPF and reps
	drm/v3d: Add clock handling
	xfrm: prevent high SEQ input in non-ESN mode
	wifi: ath12k: fix the ampdu id fetch in the HAL_RX_MPDU_START TLV
	mptcp: pm: userspace: flags: clearer msg if no remote addr
	wifi: iwlwifi: use correct IMR dump variable
	wifi: iwlwifi: don't warn during reprobe
	wifi: mac80211: don't unconditionally call drv_mgd_complete_tx()
	wifi: mac80211: remove misplaced drv_mgd_complete_tx() call
	wifi: mac80211: set ieee80211_prep_tx_info::link_id upon Auth Rx
	net: fec: Refactor MAC reset to function
	powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory
	powerpc/pseries/iommu: create DDW for devices with DMA mask less than 64-bits
	arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src
	ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().
	r8152: add vendor/device ID pair for Dell Alienware AW1022z
	iio: adc: ad7944: don't use storagebits for sizing
	pstore: Change kmsg_bytes storage size to u32
	leds: trigger: netdev: Configure LED blink interval for HW offload
	ext4: don't write back data before punch hole in nojournal mode
	ext4: remove writable userspace mappings before truncating page cache
	wifi: rtw88: Fix download_firmware_validate() for RTL8814AU
	wifi: rtw88: Fix __rtw_download_firmware() for RTL8814AU
	wifi: rtw89: coex: Assign value over than 0 to avoid firmware timer hang
	wifi: rtw89: fw: validate multi-firmware header before getting its size
	wifi: rtw89: fw: validate multi-firmware header before accessing
	wifi: rtw89: call power_on ahead before selecting firmware
	clk: qcom: camcc-sm8250: Use clk_rcg2_shared_ops for some RCGs
	net: page_pool: avoid false positive warning if NAPI was never added
	tools/power turbostat: Clustered Uncore MHz counters should honor show/hide options
	hwmon: (xgene-hwmon) use appropriate type for the latency value
	f2fs: introduce f2fs_base_attr for global sysfs entries
	media: qcom: camss: csid: Only add TPG v4l2 ctrl if TPG hardware is available
	media: qcom: camss: Add default case in vfe_src_pad_code
	drm/rockchip: vop2: Improve display modes handling on RK3588 HDMI0
	eth: fbnic: set IFF_UNICAST_FLT to avoid enabling promiscuous mode when adding unicast addrs
	tools: ynl-gen: don't output external constants
	net/mlx5e: Avoid WARN_ON when configuring MQPRIO with HTB offload enabled
	cpufreq: amd-pstate: Remove unnecessary driver_lock in set_boost
	vxlan: Annotate FDB data races
	ipv4: ip_gre: Fix set but not used warning in ipgre_err() if IPv4-only
	r8169: don't scan PHY addresses > 0
	net: flush_backlog() small changes
	bridge: mdb: Allow replace of a host-joined group
	ice: init flow director before RDMA
	ice: treat dyn_allowed only as suggestion
	rcu: handle quiescent states for PREEMPT_RCU=n, PREEMPT_COUNT=y
	rcu: handle unstable rdp in rcu_read_unlock_strict()
	rcu: fix header guard for rcu_all_qs()
	perf: Avoid the read if the count is already updated
	ice: count combined queues using Rx/Tx count
	drm/xe/relay: Don't use GFP_KERNEL for new transactions
	net/mana: fix warning in the writer of client oob
	scsi: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine
	scsi: lpfc: Ignore ndlp rport mismatch in dev_loss_tmo callbk
	scsi: lpfc: Free phba irq in lpfc_sli4_enable_msi() when pci_irq_vector() fails
	scsi: st: Restore some drive settings after reset
	wifi: ath12k: Avoid napi_sync() before napi_enable()
	HID: usbkbd: Fix the bit shift number for LED_KANA
	arm64: zynqmp: add clock-output-names property in clock nodes
	ASoC: codecs: pcm3168a: Allow for 24-bit in provider mode
	ASoC: rt722-sdca: Add some missing readable registers
	irqchip/riscv-aplic: Add support for hart indexes
	dm vdo indexer: prevent unterminated string warning
	dm vdo: use a short static string for thread name prefix
	drm/ast: Find VBIOS mode from regular display size
	bpf: Use kallsyms to find the function name of a struct_ops's stub function
	bpftool: Fix readlink usage in get_fd_type
	firmware: arm_scmi: Relax duplicate name constraint across protocol ids
	perf/amd/ibs: Fix perf_ibs_op.cnt_mask for CurCnt
	perf/amd/ibs: Fix ->config to sample period calculation for OP PMU
	clk: renesas: rzg2l-cpg: Refactor Runtime PM clock validation
	wifi: rtl8xxxu: retry firmware download on error
	wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power_index_by_rate
	wifi: rtw89: add wiphy_lock() to work that isn't held wiphy_lock() yet
	spi: zynqmp-gqspi: Always acknowledge interrupts
	regulator: ad5398: Add device tree support
	wifi: ath12k: fix ath12k_hal_tx_cmd_ext_desc_setup() info1 override
	accel/qaic: Mask out SR-IOV PCI resources
	drm/xe/pf: Reset GuC VF config when unprovisioning critical resource
	wifi: ath9k: return by of_get_mac_address
	wifi: ath12k: Fetch regdb.bin file from board-2.bin
	wifi: ath12k: Fix end offset bit definition in monitor ring descriptor
	drm: bridge: adv7511: fill stream capabilities
	drm/nouveau: fix the broken marco GSP_MSG_MAX_SIZE
	wifi: ath11k: Use dma_alloc_noncoherent for rx_tid buffer allocation
	drm/xe: Move suballocator init to after display init
	drm/xe: Do not attempt to bootstrap VF in execlists mode
	wifi: rtw89: coex: Separated Wi-Fi connecting event from Wi-Fi scan event
	drm/xe/sa: Always call drm_suballoc_manager_fini()
	drm/xe: Reject BO eviction if BO is bound to current VM
	drm/atomic: clarify the rules around drm_atomic_state->allow_modeset
	drm/buddy: fix issue that force_merge cannot free all roots
	drm/panel-edp: Add Starry 116KHD024006
	drm: Add valid clones check
	ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of()
	book3s64/radix: Fix compile errors when CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=n
	pinctrl: meson: define the pull up/down resistor value as 60 kOhm
	smb: server: smb2pdu: check return value of xa_store()
	platform/x86/intel: hid: Add Pantherlake support
	platform/x86: asus-wmi: Disable OOBE state after resume from hibernation
	platform/x86: ideapad-laptop: add support for some new buttons
	ASoC: cs42l43: Disable headphone clamps during type detection
	ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013
	ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
	nvme-pci: add quirks for device 126f:1001
	nvme-pci: add quirks for WDC Blue SN550 15b7:5009
	ALSA: usb-audio: Fix duplicated name in MIDI substream names
	nvmet-tcp: don't restore null sk_state_change
	io_uring/fdinfo: annotate racy sq/cq head/tail reads
	cifs: Fix and improve cifs_query_path_info() and cifs_query_file_info()
	cifs: Fix changing times and read-only attr over SMB1 smb_set_file_info() function
	ASoC: intel/sdw_utils: Add volume limit to cs42l43 speakers
	btrfs: compression: adjust cb->compressed_folios allocation type
	btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref
	btrfs: handle empty eb->folios in num_extent_folios()
	btrfs: avoid NULL pointer dereference if no valid csum tree
	tools: ynl-gen: validate 0 len strings from kernel
	block: only update request sector if needed
	wifi: iwlwifi: add support for Killer on MTL
	x86/Kconfig: make CFI_AUTO_DEFAULT depend on !RUST or Rust >= 1.88
	xenbus: Allow PVH dom0 a non-local xenstore
	drm/amd/display: Call FP Protect Before Mode Programming/Mode Support
	__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
	soundwire: bus: Fix race on the creation of the IRQ domain
	espintcp: fix skb leaks
	espintcp: remove encap socket caching to avoid reference leak
	xfrm: Fix UDP GRO handling for some corner cases
	dmaengine: idxd: Fix allowing write() from different address spaces
	x86/sev: Fix operator precedence in GHCB_MSR_VMPL_REQ_LEVEL macro
	kernel/fork: only call untrack_pfn_clear() on VMAs duplicated for fork()
	remoteproc: qcom_wcnss: Fix on platforms without fallback regulators
	clk: sunxi-ng: d1: Add missing divider for MMC mod clocks
	xfrm: Sanitize marks before insert
	dmaengine: idxd: Fix ->poll() return value
	dmaengine: fsl-edma: Fix return code for unhandled interrupts
	driver core: Split devres APIs to device/devres.h
	devres: Introduce devm_kmemdup_array()
	ASoC: SOF: Intel: hda: Fix UAF when reloading module
	irqchip/riscv-imsic: Start local sync timer on correct CPU
	perf/x86/intel: Fix segfault with PEBS-via-PT with sample_freq
	Bluetooth: L2CAP: Fix not checking l2cap_chan security level
	Bluetooth: btusb: use skb_pull to avoid unsafe access in QCA dump handling
	ptp: ocp: Limit signal/freq counts in summary output functions
	bridge: netfilter: Fix forwarding of fragmented packets
	ice: fix vf->num_mac count with port representors
	ice: Fix LACP bonds without SRIOV environment
	idpf: fix null-ptr-deref in idpf_features_check
	loop: don't require ->write_iter for writable files in loop_configure
	pinctrl: qcom: switch to devm_register_sys_off_handler()
	net: dwmac-sun8i: Use parsed internal PHY address instead of 1
	net: lan743x: Restore SGMII CTRL register on resume
	io_uring: fix overflow resched cqe reordering
	idpf: fix idpf_vport_splitq_napi_poll()
	sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
	octeontx2-pf: Add AF_XDP non-zero copy support
	net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done
	octeontx2-af: Set LMT_ENA bit for APR table entries
	octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG
	clk: s2mps11: initialise clk_hw_onecell_data::num before accessing ::hws[] in probe()
	crypto: algif_hash - fix double free in hash_accept
	padata: do not leak refcount in reorder_work
	can: slcan: allow reception of short error messages
	can: bcm: add locking for bcm_op runtime updates
	can: bcm: add missing rcu read protection for procfs content
	ASoC: SOF: ipc4-control: Use SOF_CTRL_CMD_BINARY as numid for bytes_ext
	ASoC: SOF: Intel: hda-bus: Use PIO mode on ACE2+ platforms
	ASoc: SOF: topology: connect DAI to a single DAI link
	ASoC: SOF: ipc4-pcm: Delay reporting is only supported for playback direction
	ALSA: pcm: Fix race of buffer access at PCM OSS layer
	ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ASP10
	llc: fix data loss when reading from a socket in llc_ui_recvmsg()
	can: kvaser_pciefd: Continue parsing DMA buf after dropped RX
	can: kvaser_pciefd: Fix echo_skb race
	net: dsa: microchip: linearize skb for tail-tagging switches
	vmxnet3: update MTU after device quiesce
	pmdomain: renesas: rcar: Remove obsolete nullify checks
	pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id()
	platform/x86: dell-wmi-sysman: Avoid buffer overflow in current_password_store()
	thermal: intel: x86_pkg_temp_thermal: Fix bogus trip temperature
	drm/edid: fixed the bug that hdr metadata was not reset
	smb: client: Fix use-after-free in cifs_fill_dirent
	arm64: dts: marvell: uDPU: define pinctrl state for alarm LEDs
	smb: client: Reset all search buffer pointers when releasing buffer
	Revert "drm/amd: Keep display off while going into S4"
	Input: xpad - add more controllers
	highmem: add folio_test_partial_kmap()
	memcg: always call cond_resched() after fn()
	mm/page_alloc.c: avoid infinite retries caused by cpuset race
	mm: mmap: map MAP_STACK to VM_NOHUGEPAGE only if THP is enabled
	mm: vmalloc: actually use the in-place vrealloc region
	mm: vmalloc: only zero-init on vrealloc shrink
	nilfs2: fix deadlock warnings caused by lock dependency in init_nilfs()
	Bluetooth: btmtksdio: Check function enabled before doing close
	Bluetooth: btmtksdio: Do close if SDIO card removed without close
	Revert "arm64: dts: allwinner: h6: Use RSB for AXP805 PMIC connection"
	ksmbd: fix stream write failure
	platform/x86: think-lmi: Fix attribute name usage for non-compliant items
	spi: use container_of_cont() for to_spi_device()
	spi: spi-fsl-dspi: restrict register range for regmap access
	spi: spi-fsl-dspi: Halt the module after a new message transfer
	spi: spi-fsl-dspi: Reset SR flags before sending a new message
	err.h: move IOMEM_ERR_PTR() to err.h
	gcc-15: make 'unterminated string initialization' just a warning
	gcc-15: disable '-Wunterminated-string-initialization' entirely for now
	Fix mis-uses of 'cc-option' for warning disablement
	kbuild: Properly disable -Wunterminated-string-initialization for clang
	drm/amd/display: Exit idle optimizations before accessing PHY
	bpf: abort verification if env->cur_state->loop_entry != NULL
	serial: sh-sci: Save and restore more registers
	drm/amdkfd: Correct F8_MODE for gfx950
	watchdog: aspeed: fix 64-bit division
	pinctrl: tegra: Fix off by one in tegra_pinctrl_get_group()
	i3c: master: svc: Fix implicit fallthrough in svc_i3c_master_ibi_work()
	x86/mm/init: Handle the special case of device private pages in add_pages(), to not increase max_pfn and trigger dma_addressing_limited() bounce buffers bounce buffers
	drm/gem: Internally test import_attach for imported objects
	Linux 6.12.31

Change-Id: I017795966fb764f9320a6a0df1571d19e5e631fe
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-07-03 07:19:01 +00:00
Andy Shevchenko
7207effe47 driver core: Split devres APIs to device/devres.h
[ Upstream commit a21cad9312767d26b5257ce0662699bb202cdda1 ]

device.h is a huge header which is hard to follow and easy to miss
something. Improve that by splitting devres APIs to device/devres.h.

In particular this helps to speedup the build of the code that includes
device.h solely for a devres APIs.

While at it, cast the error pointers to __iomem using IOMEM_ERR_PTR()
and fix sparse warnings.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Stable-dep-of: 7dd7f39fce00 ("ASoC: SOF: Intel: hda: Fix UAF when reloading module")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-29 11:03:15 +02:00
Greg Kroah-Hartman
75adb09e2f ANDROID: GKI: the "reusachtig" padding sync with android16-6.12
Add the initial set of ABI padding fields in android16-6.12 based on what
is in the android15-6.6 branch.

Bug: 151154716
Change-Id: Icdb394863b2911389bfdced0fd1ea20236ca4ce1
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2025-05-16 12:17:56 +00:00
Dan Williams
101c268bd2 cxl/port: Fix use-after-free, permit out-of-order decoder shutdown
In support of investigating an initialization failure report [1],
cxl_test was updated to register mock memory-devices after the mock
root-port/bus device had been registered. That led to cxl_test crashing
with a use-after-free bug with the following signature:

    cxl_port_attach_region: cxl region3: cxl_host_bridge.0:port3 decoder3.0 add: mem0:decoder7.0 @ 0 next: cxl_switch_uport.0 nr_eps: 1 nr_targets: 1
    cxl_port_attach_region: cxl region3: cxl_host_bridge.0:port3 decoder3.0 add: mem4:decoder14.0 @ 1 next: cxl_switch_uport.0 nr_eps: 2 nr_targets: 1
    cxl_port_setup_targets: cxl region3: cxl_switch_uport.0:port6 target[0] = cxl_switch_dport.0 for mem0:decoder7.0 @ 0
1)  cxl_port_setup_targets: cxl region3: cxl_switch_uport.0:port6 target[1] = cxl_switch_dport.4 for mem4:decoder14.0 @ 1
    [..]
    cxld_unregister: cxl decoder14.0:
    cxl_region_decode_reset: cxl_region region3:
    mock_decoder_reset: cxl_port port3: decoder3.0 reset
2)  mock_decoder_reset: cxl_port port3: decoder3.0: out of order reset, expected decoder3.1
    cxl_endpoint_decoder_release: cxl decoder14.0:
    [..]
    cxld_unregister: cxl decoder7.0:
3)  cxl_region_decode_reset: cxl_region region3:
    Oops: general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6bc3: 0000 [#1] PREEMPT SMP PTI
    [..]
    RIP: 0010:to_cxl_port+0x8/0x60 [cxl_core]
    [..]
    Call Trace:
     <TASK>
     cxl_region_decode_reset+0x69/0x190 [cxl_core]
     cxl_region_detach+0xe8/0x210 [cxl_core]
     cxl_decoder_kill_region+0x27/0x40 [cxl_core]
     cxld_unregister+0x5d/0x60 [cxl_core]

At 1) a region has been established with 2 endpoint decoders (7.0 and
14.0). Those endpoints share a common switch-decoder in the topology
(3.0). At teardown, 2), decoder14.0 is the first to be removed and hits
the "out of order reset case" in the switch decoder. The effect though
is that region3 cleanup is aborted leaving it in-tact and
referencing decoder14.0. At 3) the second attempt to teardown region3
trips over the stale decoder14.0 object which has long since been
deleted.

The fix here is to recognize that the CXL specification places no
mandate on in-order shutdown of switch-decoders, the driver enforces
in-order allocation, and hardware enforces in-order commit. So, rather
than fail and leave objects dangling, always remove them.

In support of making cxl_region_decode_reset() always succeed,
cxl_region_invalidate_memregion() failures are turned into warnings.
Crashing the kernel is ok there since system integrity is at risk if
caches cannot be managed around physical address mutation events like
CXL region destruction.

A new device_for_each_child_reverse_from() is added to cleanup
port->commit_end after all dependent decoders have been disabled. In
other words if decoders are allocated 0->1->2 and disabled 1->2->0 then
port->commit_end only decrements from 2 after 2 has been disabled, and
it decrements all the way to zero since 1 was disabled previously.

Link: http://lore.kernel.org/20241004212504.1246-1-gourry@gourry.net [1]
Cc: stable@vger.kernel.org
Fixes: 176baefb2e ("cxl/hdm: Commit decoder state to hardware")
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Alison Schofield <alison.schofield@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Zijun Hu <quic_zijuhu@quicinc.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://patch.msgid.link/172964782781.81806.17902885593105284330.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
2024-10-25 16:07:03 -05:00
Christoph Hellwig
de6c85bf91 dma-mapping: clearly mark DMA ops as an architecture feature
DMA ops are a helper for architectures and not for drivers to override
the DMA implementation.

Unfortunately driver authors keep ignoring this.  Make the fact more
clear by renaming the symbol to ARCH_HAS_DMA_OPS and having the two drivers
overriding their dma_ops depend on that.  These drivers should probably be
marked broken, but we can give them a bit of a grace period for that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> # for IPU6
Acked-by: Robin Murphy <robin.murphy@arm.com>
2024-09-04 07:08:51 +03:00
Leon Romanovsky
b5c58b2fdc dma-mapping: direct calls for dma-iommu
Directly call into dma-iommu just like we have been doing for dma-direct
for a while.  This avoids the indirect call overhead for IOMMU ops and
removes the need to have DMA ops entirely for many common configurations.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2024-08-22 06:18:11 +02:00
Greg Kroah-Hartman
269e974e66 driver core: make [device_]driver_attach take a const *
Change device_driver_attach() and driver_attach() to take a const * to
struct device driver as neither of them modify the structure at all.

Also, for some odd reason, drivers/dma/idxd/compat.c had a duplicate
external reference to device_driver_attach(), so remove that to fix up
the build, it should never have had that there in the first place.

Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Petr Tesarik <petr.tesarik.ext@huawei.com>
Cc: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: dmaengine@vger.kernel.org
Link: https://lore.kernel.org/r/2024061401-rasping-manger-c385@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-20 12:51:42 +02:00
Greg Kroah-Hartman
b5dd424181 Merge tag 'v6.10-rc4' into driver-core-next
We need the driver core and sysfs fixes in here to build on top of.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-17 08:33:41 +02:00
Andy Shevchenko
1968845d35 driver core: device.h: Group of_node handling declarations and definitions
There are a few of_node related APIs defined in the driver core.
Group the respective declarations and definitions in the header.
There is no functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240531145129.1506733-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-04 18:04:36 +02:00
Greg Kroah-Hartman
9711873506 driver core: remove devm_device_add_groups()
There is no more in-kernel users of this function, and no driver should
ever be using it, so remove it from the kernel.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230704131715.44454-8-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-04 15:53:36 +02:00
Linus Torvalds
d90be6e4aa Merge tag 'driver-core-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
 "Here is the small set of driver core and kernfs changes for 6.10-rc1.

  Nothing major here at all, just a small set of changes for some driver
  core apis, and minor fixups. Included in here are:

   - sysfs_bin_attr_simple_read() helper added and used

   - device_show_string() helper added and used

  All usages of these were acked by the various maintainers. Also in
  here are:

   - kernfs minor cleanup

   - removed unused functions

   - typo fix in documentation

   - pay attention to sysfs_create_link() failures in module.c finally

  All of these have been in linux-next for a very long time with no
  reported problems"

* tag 'driver-core-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  device property: Fix a typo in the description of device_get_child_node_count()
  kernfs: mount: Remove unnecessary ‘NULL’ values from knparent
  scsi: Use device_show_string() helper for sysfs attributes
  platform/x86: Use device_show_string() helper for sysfs attributes
  perf: Use device_show_string() helper for sysfs attributes
  IB/qib: Use device_show_string() helper for sysfs attributes
  hwmon: Use device_show_string() helper for sysfs attributes
  driver core: Add device_show_string() helper for sysfs attributes
  treewide: Use sysfs_bin_attr_simple_read() helper
  sysfs: Add sysfs_bin_attr_simple_read() helper
  module: don't ignore sysfs_create_link() failures
  driver core: Remove unused platform_notify, platform_notify_remove
2024-05-22 12:13:40 -07:00
Alexander Lobakin
a6016aac52 dma: fix DMA sync for drivers not calling dma_set_mask*()
There are several reports that the DMA sync shortcut broke non-coherent
devices.
dev->dma_need_sync is false after the &device allocation and if a driver
didn't call dma_set_mask*(), it will still be false even if the device
is not DMA-coherent and thus needs synchronizing. Due to historical
reasons, there's still a lot of drivers not calling it.
Invert the boolean, so that the sync will be performed by default and
the shortcut will be enabled only when calling dma_set_mask*().

Reported-by: Steven Price <steven.price@arm.com>
Closes: https://lore.kernel.org/lkml/010686f5-3049-46a1-8230-7752a1b433ff@arm.com
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Closes: https://lore.kernel.org/lkml/46160534-5003-4809-a408-6b3a3f4921e9@samsung.com
Fixes: f406c8e4b7. ("dma: avoid redundant calls for sync operations")
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Steven Price <steven.price@arm.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
2024-05-09 19:00:29 +02:00
Alexander Lobakin
f406c8e4b7 dma: avoid redundant calls for sync operations
Quite often, devices do not need dma_sync operations on x86_64 at least.
Indeed, when dev_is_dma_coherent(dev) is true and
dev_use_swiotlb(dev) is false, iommu_dma_sync_single_for_cpu()
and friends do nothing.

However, indirectly calling them when CONFIG_RETPOLINE=y consumes about
10% of cycles on a cpu receiving packets from softirq at ~100Gbit rate.
Even if/when CONFIG_RETPOLINE is not set, there is a cost of about 3%.

Add dev->need_dma_sync boolean and turn it off during the device
initialization (dma_set_mask()) depending on the setup:
dev_is_dma_coherent() for the direct DMA, !(sync_single_for_device ||
sync_single_for_cpu) or the new dma_map_ops flag, %DMA_F_CAN_SKIP_SYNC,
advertised for non-NULL DMA ops.
Then later, if/when swiotlb is used for the first time, the flag
is reset back to on, from swiotlb_tbl_map_single().

On iavf, the UDP trafficgen with XDP_DROP in skb mode test shows
+3-5% increase for direct DMA.

Suggested-by: Christoph Hellwig <hch@lst.de> # direct DMA shortcut
Co-developed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2024-05-07 13:29:53 +02:00
Lukas Wunner
3cc50d07be driver core: Add device_show_string() helper for sysfs attributes
For drivers wishing to expose an unsigned long, int or bool at a static
memory location in sysfs, the driver core provides ready-made helpers
such as device_show_ulong() to be used as ->show() callback.

Some drivers need to expose a string and so far they all provide their
own ->show() implementation.  arch/powerpc/perf/hv-24x7.c went so far
as to create a device_show_string() helper but kept it private.

Make it public for reuse by other drivers.  The pattern seems to be
sufficiently frequent to merit a public helper.

Add a DEVICE_STRING_ATTR_RO() macro in line with the existing
DEVICE_ULONG_ATTR() and similar macros to ease declaration of string
attributes.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/2e3eaaf2600bb55c0415c23ba301e809403a7aa2.1713608122.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 17:37:03 +02:00
Greg Kroah-Hartman
e5019b1423 Merge 6.9-rc5 into driver-core-next
We want the kernfs fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-23 13:27:43 +02:00
Bjorn Helgaas
0bb322be5d driver core: Remove unused platform_notify, platform_notify_remove
The "platform_notify" and "platform_notify_remove" hooks have been unused
since 00ba9357d1 ("ARM: ixp4xx: Drop custom DMA coherency and bouncing").

Remove "platform_notify" and "platform_notify_remove".  No functional
change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20240325221409.1457036-1-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-27 08:01:12 +01:00
Herve Codina
0462c56c29 driver core: Introduce device_link_wait_removal()
The commit 80dd33cf72 ("drivers: base: Fix device link removal")
introduces a workqueue to release the consumer and supplier devices used
in the devlink.
In the job queued, devices are release and in turn, when all the
references to these devices are dropped, the release function of the
device itself is called.

Nothing is present to provide some synchronisation with this workqueue
in order to ensure that all ongoing releasing operations are done and
so, some other operations can be started safely.

For instance, in the following sequence:
  1) of_platform_depopulate()
  2) of_overlay_remove()

During the step 1, devices are released and related devlinks are removed
(jobs pushed in the workqueue).
During the step 2, OF nodes are destroyed but, without any
synchronisation with devlink removal jobs, of_overlay_remove() can raise
warnings related to missing of_node_put():
  ERROR: memory leak, expected refcount 1 instead of 2

Indeed, the missing of_node_put() call is going to be done, too late,
from the workqueue job execution.

Introduce device_link_wait_removal() to offer a way to synchronize
operations waiting for the end of devlink removals (i.e. end of
workqueue jobs).
Also, as a flushing operation is done on the workqueue, the workqueue
used is moved from a system-wide workqueue to a local one.

Cc: stable@vger.kernel.org
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Saravana Kannan <saravanak@google.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240325152140.198219-2-herve.codina@bootlin.com
Signed-off-by: Rob Herring <robh@kernel.org>
2024-03-26 15:32:32 -05:00
Linus Torvalds
0dde2bf67b Merge tag 'iommu-updates-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull iommu updates from Joerg Roedel:
 "Core changes:
   - Fix race conditions in device probe path
   - Retire IOMMU bus_ops
   - Support for passing custom allocators to page table drivers
   - Clean up Kconfig around IOMMU_SVA
   - Support for sharing SVA domains with all devices bound to a mm
   - Firmware data parsing cleanup
   - Tracing improvements for iommu-dma code
   - Some smaller fixes and cleanups

  ARM-SMMU drivers:
   - Device-tree binding updates:
      - Add additional compatible strings for Qualcomm SoCs
      - Document Adreno clocks for Qualcomm's SM8350 SoC
   - SMMUv2:
      - Implement support for the ->domain_alloc_paging() callback
      - Ensure Secure context is restored following suspend of Qualcomm
        SMMU implementation
   - SMMUv3:
      - Disable stalling mode for the "quiet" context descriptor
      - Minor refactoring and driver cleanups

  Intel VT-d driver:
   - Cleanup and refactoring

  AMD IOMMU driver:
   - Improve IO TLB invalidation logic
   - Small cleanups and improvements

  Rockchip IOMMU driver:
   - DT binding update to add Rockchip RK3588

  Apple DART driver:
   - Apple M1 USB4/Thunderbolt DART support
   - Cleanups

  Virtio IOMMU driver:
   - Add support for iotlb_sync_map
   - Enable deferred IO TLB flushes"

* tag 'iommu-updates-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (66 commits)
  iommu: Don't reserve 0-length IOVA region
  iommu/vt-d: Move inline helpers to header files
  iommu/vt-d: Remove unused vcmd interfaces
  iommu/vt-d: Remove unused parameter of intel_pasid_setup_pass_through()
  iommu/vt-d: Refactor device_to_iommu() to retrieve iommu directly
  iommu/sva: Fix memory leak in iommu_sva_bind_device()
  dt-bindings: iommu: rockchip: Add Rockchip RK3588
  iommu/dma: Trace bounce buffer usage when mapping buffers
  iommu/arm-smmu: Convert to domain_alloc_paging()
  iommu/arm-smmu: Pass arm_smmu_domain to internal functions
  iommu/arm-smmu: Implement IOMMU_DOMAIN_BLOCKED
  iommu/arm-smmu: Convert to a global static identity domain
  iommu/arm-smmu: Reorganize arm_smmu_domain_add_master()
  iommu/arm-smmu-v3: Remove ARM_SMMU_DOMAIN_NESTED
  iommu/arm-smmu-v3: Master cannot be NULL in arm_smmu_write_strtab_ent()
  iommu/arm-smmu-v3: Add a type for the STE
  iommu/arm-smmu-v3: disable stall for quiet_cd
  iommu/qcom: restore IOMMU state if needed
  iommu/arm-smmu-qcom: Add QCM2290 MDSS compatible
  iommu/arm-smmu-qcom: Add missing GMU entry to match table
  ...
2024-01-18 15:16:57 -08:00
Linus Torvalds
80955ae955 Merge tag 'driver-core-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
 "Here are the set of driver core and kernfs changes for 6.8-rc1.
  Nothing major in here this release cycle, just lots of small cleanups
  and some tweaks on kernfs that in the very end, got reverted and will
  come back in a safer way next release cycle.

  Included in here are:

   - more driver core 'const' cleanups and fixes

   - fw_devlink=rpm is now the default behavior

   - kernfs tiny changes to remove some string functions

   - cpu handling in the driver core is updated to work better on many
     systems that add topologies and cpus after booting

   - other minor changes and cleanups

  All of the cpu handling patches have been acked by the respective
  maintainers and are coming in here in one series. Everything has been
  in linux-next for a while with no reported issues"

* tag 'driver-core-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (51 commits)
  Revert "kernfs: convert kernfs_idr_lock to an irq safe raw spinlock"
  kernfs: convert kernfs_idr_lock to an irq safe raw spinlock
  class: fix use-after-free in class_register()
  PM: clk: make pm_clk_add_notifier() take a const pointer
  EDAC: constantify the struct bus_type usage
  kernfs: fix reference to renamed function
  driver core: device.h: fix Excess kernel-doc description warning
  driver core: class: fix Excess kernel-doc description warning
  driver core: mark remaining local bus_type variables as const
  driver core: container: make container_subsys const
  driver core: bus: constantify subsys_register() calls
  driver core: bus: make bus_sort_breadthfirst() take a const pointer
  kernfs: d_obtain_alias(NULL) will do the right thing...
  driver core: Better advertise dev_err_probe()
  kernfs: Convert kernfs_path_from_node_locked() from strlcpy() to strscpy()
  kernfs: Convert kernfs_name_locked() from strlcpy() to strscpy()
  kernfs: Convert kernfs_walk_ns() from strlcpy() to strscpy()
  initramfs: Expose retained initrd as sysfs file
  fs/kernfs/dir: obey S_ISGID
  kernel/cgroup: use kernfs_create_dir_ns()
  ...
2024-01-18 09:48:40 -08:00
Joerg Roedel
75f74f85a4 Merge branches 'apple/dart', 'arm/rockchip', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2024-01-03 09:59:32 +01:00
Randy Dunlap
ae4d90f7ca driver core: device.h: fix Excess kernel-doc description warning
Remove the @knode_class: line to prevent the kernel-doc warning:

include/linux/device.h:807: warning: Excess struct member 'knode_class' description in 'device'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20231223050532.13881-1-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-23 14:12:01 +01:00
Greg Kroah-Hartman
32f78abe59 driver core: bus: constantify subsys_register() calls
The functions subsys_register() and subsys_virtual_register() should be
taking a constant pointer to a struct bus_type, as they do not actually
modify anything in it, so fix up the function definitions to do so
properly.

This also changes the pointer type in struct subsys_interface to be
constant as well, as again, that's the proper signature of it.

Cc: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/2023121908-grove-genetics-f8af@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-21 13:55:38 +01:00
Dan Williams
134c6eaa60 driver core: Add a guard() definition for the device_lock()
At present there are ~200 usages of device_lock() in the kernel. Some of
those usages lead to "goto unlock;" patterns which have proven to be
error prone. Define a "device" guard() definition to allow for those to
be cleaned up and prevent new ones from appearing.

Link: http://lore.kernel.org/r/657897453dda8_269bd29492@dwillia2-mobl3.amr.corp.intel.com.notmuch
Link: http://lore.kernel.org/r/6577b0c2a02df_a04c5294bb@dwillia2-xfh.jf.intel.com.notmuch
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Link: https://lore.kernel.org/r/170250854466.1522182.17555361077409628655.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-15 13:14:55 +01:00
Greg Kroah-Hartman
eec4954b81 driver core: make device_is_dependent() static
The function device_is_dependent() is only called by the driver core
internally and should not, at this time, be called by anyone else
outside of it, so mark it as static so as not to give driver authors the
wrong idea.

Cc: Saravana Kannan <saravanak@google.com>
Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/2023112815-faculty-thud-add8@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 20:14:25 +00:00
Robin Murphy
17de3f5fdd iommu: Retire bus ops
With the rest of the API internals converted, it's time to finally
tackle probe_device and how we bootstrap the per-device ops association
to begin with. This ends up being disappointingly straightforward, since
fwspec users are already doing it in order to find their of_xlate
callback, and it works out that we can easily do the equivalent for
other drivers too. Then shuffle the remaining awareness of iommu_ops
into the couple of core headers that still need it, and breathe a sigh
of relief.

Ding dong the bus ops are gone!

CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/a59011ef65b4b6657cb0b7a388d786b779b61305.1700589539.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-11-27 11:03:15 +01:00
Masahiro Yamada
a083c755e1 devres: rename the first parameter of devm_add_action(_or_reset)
The first parameter of devm_add_action(_or_reset) is a device.
The name 'release' is confusing because it is often used for
dr_release_t in the devres context.

Rename it to 'dev'. No functional change intended.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20230908135840.2362708-1-masahiroy@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-05 11:15:52 +02:00
Linus Torvalds
28a4f91f5f Merge tag 'driver-core-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
 "Here is a small set of driver core updates and additions for 6.6-rc1.

  Included in here are:

   - stable kernel documentation updates

   - class structure const work from Ivan on various subsystems

   - kernfs tweaks

   - driver core tests!

   - kobject sanity cleanups

   - kobject structure reordering to save space

   - driver core error code handling fixups

   - other minor driver core cleanups

  All of these have been in linux-next for a while with no reported
  problems"

* tag 'driver-core-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (32 commits)
  driver core: Call in reversed order in device_platform_notify_remove()
  driver core: Return proper error code when dev_set_name() fails
  kobject: Remove redundant checks for whether ktype is NULL
  kobject: Add sanity check for kset->kobj.ktype in kset_register()
  drivers: base: test: Add missing MODULE_* macros to root device tests
  drivers: base: test: Add missing MODULE_* macros for platform devices tests
  drivers: base: Free devm resources when unregistering a device
  drivers: base: Add basic devm tests for platform devices
  drivers: base: Add basic devm tests for root devices
  kernfs: fix missing kernfs_iattr_rwsem locking
  docs: stable-kernel-rules: mention that regressions must be prevented
  docs: stable-kernel-rules: fine-tune various details
  docs: stable-kernel-rules: make the examples for option 1 a proper list
  docs: stable-kernel-rules: move text around to improve flow
  docs: stable-kernel-rules: improve structure by changing headlines
  base/node: Remove duplicated include
  kernfs: attach uuid for every kernfs and report it in fsid
  kernfs: add stub helper for kernfs_generic_poll()
  x86/resctrl: make pseudo_lock_class a static const structure
  x86/MSR: make msr_class a static const structure
  ...
2023-09-01 09:43:18 -07:00
Linus Torvalds
4fb0dacb78 Merge tag 'sound-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
 "We've received a fairly wide range of changes at this time, including
  for ALSA and ASoC core, but all of them are rather small changes.

  Here are some highlights:

  ALSA / ASoC Core:
   - Fixes of inconsistent locking around control API helpers
   - A few new control API functions and cleanups
   - Workarounds for potential UAFs by delayed kobj releases
   - Unified PCM copy ops with iov_iter
   - Continued efforts for ASoC API cleanups

  ASoC:
   - An adaptor to allow use of IIO DACs and ADCs in ASoC which pulls in
     some IIO changes
   - Create a library function for intlog10() and use it in the NAU8825
     driver
   - Convert drivers to use the more modern maple tree register cache
   - Lots of work on the SOF framework, AMD and Intel drivers, including
     a lot of cleanup and new device support
   - Standardization of the presentation of jacks from drivers
   - Provision of some generic sound card DT properties
   - Support for AMD Van Gogh, AMD machines with MAX98388 and NAU8821,
     AWInic AW88261, Cirrus Logic CS35L36 and CS42L43, various Intel
     platforms including AVS machines with ES8336 and RT5663, Mediatek
     MT7986, NXP i.MX93, RealTek RT1017 and StarFive JH7110

  Others:
   - New test coverage including ASoC and topology tests in KUnit; this
     also involves enabling UML builds of ALSA since that's the default
     KUnit test environment which pulls in the addition of some stubs to
     the driver
   - More enhancement of pcmtest driver
   - A few fixes / enhancements of MIDI 2.0 UMP core
   - Using PCI definitions in allover HD-audio code
   - Support for Cirrus CS35L56 and TI TAS2781 HD-audio sub-codecs
   - CS35L41 HD-audio sub-codec improvements
   - Continued emu10k1 improvements"

* tag 'sound-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (693 commits)
  ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl
  ASoC: dwc: i2s: Fix unused functions
  ALSA: usb-audio: Don't try to submit URBs after disconnection
  ALSA: emu10k1: add separate documentation for E-MU cards
  ALSA: emu10k1: more documentation updates
  ALSA: emu10k1: de-duplicate audigy-mixer.rst vs. sb-live-mixer.rst
  ALSA: ump: Fix -Wformat-truncation warnings
  ALSA: hda: Add missing dependency on CONFIG_EFI for Cirrus/TI sub-codecs
  ALSA: doc: Fix missing backquote in midi-2.0.rst
  ALSA: hda/realtek: Add quirk for mute LEDs on HP ENVY x360 15-eu0xxx
  ALSA: hda/tas2781: Switch back to use struct i2c_driver's .probe()
  ASoC: soc-core.c: Do not error if a DAI link component is not found
  ASoC: codecs: Fix error code in aw88261_i2c_probe()
  ASoC: audio-graph-card.c: move audio_graph_parse_of()
  ASoC: cs42l43: Use new-style PM runtime macros
  ALSA: documentation: Add description for USB MIDI 2.0 gadget driver
  ALSA: ump: Don't create unused substreams for static blocks
  ALSA: ump: Fill group names for legacy rawmidi substreams
  ALSA: usb-audio: Attach legacy rawmidi after probing all UMP EPs
  ALSA: ac97: Fix possible error value of *rac97
  ...
2023-08-30 13:45:05 -07:00
Andy Shevchenko
9e0cace7a6 driver core: Move dev_err_probe() to where it belogs
dev_err_probe() belongs to the printing API, hence
move the definition from device.h to dev_printk.h.

There is no change to the callers at all, since:
1) implementation is located in the same core.c;
2) dev_printk.h is guaranteed to be included by device.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20230721131309.16821-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-05 08:31:41 +02:00
Petr Tesarik
1395706a14 swiotlb: search the software IO TLB only if the device makes use of it
Skip searching the software IO TLB if a device has never used it, making
sure these devices are not affected by the introduction of multiple IO TLB
memory pools.

Additional memory barrier is required to ensure that the new value of the
flag is visible to other CPUs after mapping a new bounce buffer. For
efficiency, the flag check should be inlined, and then the memory barrier
must be moved to is_swiotlb_buffer(). However, it can replace the existing
barrier in swiotlb_find_pool(), because all callers use is_swiotlb_buffer()
first to verify that the buffer address belongs to the software IO TLB.

Signed-off-by: Petr Tesarik <petr.tesarik.ext@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2023-08-01 18:02:32 +02:00
Petr Tesarik
79636caad3 swiotlb: if swiotlb is full, fall back to a transient memory pool
Try to allocate a transient memory pool if no suitable slots can be found
and the respective SWIOTLB is allowed to grow. The transient pool is just
enough big for this one bounce buffer. It is inserted into a per-device
list of transient memory pools, and it is freed again when the bounce
buffer is unmapped.

Transient memory pools are kept in an RCU list. A memory barrier is
required after adding a new entry, because any address within a transient
buffer must be immediately recognized as belonging to the SWIOTLB, even if
it is passed to another CPU.

Deletion does not require any synchronization beyond RCU ordering
guarantees. After a buffer is unmapped, its physical addresses may no
longer be passed to the DMA API, so the memory range of the corresponding
stale entry in the RCU list never matches. If the memory range gets
allocated again, then it happens only after a RCU quiescent state.

Since bounce buffers can now be allocated from different pools, add a
parameter to swiotlb_alloc_pool() to let the caller know which memory pool
is used. Add swiotlb_find_pool() to find the memory pool corresponding to
an address. This function is now also used by is_swiotlb_buffer(), because
a simple boundary check is no longer sufficient.

The logic in swiotlb_alloc_tlb() is taken from __dma_direct_alloc_pages(),
simplified and enhanced to use coherent memory pools if needed.

Note that this is not the most efficient way to provide a bounce buffer,
but when a DMA buffer can't be mapped, something may (and will) actually
break. At that point it is better to make an allocation, even if it may be
an expensive operation.

Signed-off-by: Petr Tesarik <petr.tesarik.ext@huawei.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2023-08-01 18:02:20 +02:00
Petr Tesarik
158dbe9c9a swiotlb: separate memory pool data from other allocator data
Carve out memory pool specific fields from struct io_tlb_mem. The original
struct now contains shared data for the whole allocator, while the new
struct io_tlb_pool contains data that is specific to one memory pool of
(potentially) many.

Signed-off-by: Petr Tesarik <petr.tesarik.ext@huawei.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2023-08-01 18:02:14 +02:00
Mark Brown
da7c07b108 driver core: Provide stubs for !IOMEM builds
The various _ioremap_resource functions are not built when
CONFIG_HAS_IOMEM is disabled but no stubs are provided. Given how
widespread IOMEM usage is in drivers and how rare !IOMEM configurations
are in practical use let's just provide some stubs so users will build
without having to add explicit dependencies on HAS_IOMEM.

The most likely use case is builds with UML for KUnit testing.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230718-asoc-topology-kunit-enable-v2-1-0ee11e662b92@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-07-18 15:19:00 +01:00
Linus Torvalds
04f2933d37 Merge tag 'core_guards_for_6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue
Pull scope-based resource management infrastructure from Peter Zijlstra:
 "These are the first few patches in the Scope-based Resource Management
  series that introduce the infrastructure but not any conversions as of
  yet.

  Adding the infrastructure now allows multiple people to start using
  them.

  Of note is that Sparse will need some work since it doesn't yet
  understand this attribute and might have decl-after-stmt issues"

* tag 'core_guards_for_6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue:
  kbuild: Drop -Wdeclaration-after-statement
  locking: Introduce __cleanup() based infrastructure
  apparmor: Free up __cleanup() name
  dmaengine: ioat: Free up __cleanup() name
2023-07-04 13:50:38 -07:00
Peter Zijlstra
54da6a0924 locking: Introduce __cleanup() based infrastructure
Use __attribute__((__cleanup__(func))) to build:

 - simple auto-release pointers using __free()

 - 'classes' with constructor and destructor semantics for
   scope-based resource management.

 - lock guards based on the above classes.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20230612093537.614161713%40infradead.org
2023-06-26 11:14:18 +02:00
James Seo
cd00bc2ca4 driver core: device.h: add some missing kerneldocs
struct device_attribute, struct dev_ext_attribute, dev_name(), and the
DEVICE_ATTR() macros lack kerneldocs, preventing them from appearing in
the driver core documentation and from being cross-referenced elsewhere.

Add the missing kerneldocs (except for DEVICE_ATTR_IGNORE_LOCKDEP(),
which is only meaningful on debug builds with CONFIG_DEBUG_LOCK_ALLOC
defined, and is aliased to DEVICE_ATTR() otherwise).

Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: James Seo <james@equiv.tech>
Link: https://lore.kernel.org/r/20230509024702.1977991-1-james@equiv.tech
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-31 20:25:57 +01:00
James Clark
d388f06ace devres: Provide krealloc_array
There is no krealloc_array equivalent in devres. Users would have to
do their own multiplication overflow check so provide one.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: James Clark <james.clark@arm.com>
Link: https://lore.kernel.org/r/20230509094942.396150-2-james.clark@arm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-30 21:07:15 +01:00
Greg Kroah-Hartman
f43243c66e driver core: device.h: remove extern from function prototypes
The kernel coding style does not require 'extern' in function prototypes
in .h files, so remove them from include/linux/device.h as they are not
needed.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230324122711.2664537-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-24 15:35:31 +01:00
Greg Kroah-Hartman
d492cc2573 driver core: device.h: make struct bus_type a const *
Now that all users who accessed the bus_type structure in struct device
are properly using it as a const *, mark it as such so that no one can
modify it going forward anymore.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230313182918.1312597-35-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-23 13:21:58 +01:00
Greg Kroah-Hartman
2bd5c63978 driver core: device: make device_create*() take a const struct class *
The functions device_create() and device_create_with_groups() do not
modify the struct class passed into it, so enforce this by changing the
function parameters to be struct const class.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230313181843.1207845-12-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-17 15:16:50 +01:00
Greg Kroah-Hartman
9fa120fbd5 driver core: device: mark struct class in struct device as constant
The pointer to a struct class in a struct device should never be used to
change anything in that class.  So mark it as constant to enforce this
requirement.

This requires a few minor changes to some internal driver core functions
to enforce the const * being used here now.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230313181843.1207845-11-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-17 15:16:48 +01:00
Greg Kroah-Hartman
d2fff09656 driver core: device: make device_destroy() take a const class *
device_destroy() does not modify the struct class passed into it, so
mark it as const to enforce this rule.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230313181843.1207845-9-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-17 15:16:43 +01:00
Andy Shevchenko
410e7088e9 devres: Pass unique name of the resource to devm_add_action_or_reset()
All the same as it's done in the commit e32c80bbd2f9 ("devres:
Pass unique name of the resource to devm_add_action()") applies
to the devm_add_action_or_reset(), which this change makes real.
This helps with debug resource management.

Reported-and-tested-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230313113100.59643-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-17 15:09:59 +01:00
Andy Shevchenko
0433686c60 devres: Pass unique name of the resource to devm_add_action()
Pass the unique name of the resource to devm_add_action(),
so it will be easier to debug managed resources.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230224200745.17324-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-10 09:06:22 +01:00
Greg Kroah-Hartman
721da5cee9 driver core: remove CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2
CONFIG_SYSFS_DEPRECATED was added in commit 88a22c985e
("CONFIG_SYSFS_DEPRECATED") in 2006 to allow systems with older versions
of some tools (i.e. Fedora 3's version of udev) to boot properly.  Four
years later, in 2010, the option was attempted to be removed as most of
userspace should have been fixed up properly by then, but some kernel
developers clung to those old systems and refused to update, so we added
CONFIG_SYSFS_DEPRECATED_V2 in commit e52eec13cd ("SYSFS: Allow boot
time switching between deprecated and modern sysfs layout") to allow
them to continue to boot properly, and we allowed a boot time parameter
to be used to switch back to the old format if needed.

Over time, the logic that was covered under these config options was
slowly removed from individual driver subsystems successfully, removed,
and the only thing that is now left in the kernel are some changes in
the block layer's representation in sysfs where real directories are
used instead of symlinks like normal.

Because the original changes were done to userspace tools in 2006, and
all distros that use those tools are long end-of-life, and older
non-udev-based systems do not care about the block layer's sysfs
representation, it is time to finally remove this old logic and the
config entries from the kernel.

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: linux-block@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Acked-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20230223073326.2073220-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-06 07:46:23 +01:00
Saravana Kannan
67cad5c670 driver core: fw_devlink: Add DL_FLAG_CYCLE support to device links
fw_devlink uses DL_FLAG_SYNC_STATE_ONLY device link flag for two
purposes:

1. To allow a parent device to proxy its child device's dependency on a
   supplier so that the supplier doesn't get its sync_state() callback
   before the child device/consumer can be added and probed. In this
   usage scenario, we need to ignore cycles for ensure correctness of
   sync_state() callbacks.

2. When there are dependency cycles in firmware, we don't know which of
   those dependencies are valid. So, we have to ignore them all wrt
   probe ordering while still making sure the sync_state() callbacks
   come correctly.

However, when detecting dependency cycles, there can be multiple
dependency cycles between two devices that we need to detect. For
example:

A -> B -> A and A -> C -> B -> A.

To detect multiple cycles correct, we need to be able to differentiate
DL_FLAG_SYNC_STATE_ONLY device links used for (1) vs (2) above.

To allow this differentiation, add a DL_FLAG_CYCLE that can be use to
mark use case (2). We can then use the DL_FLAG_CYCLE to decide which
DL_FLAG_SYNC_STATE_ONLY device links to follow when looking for
dependency cycles.

Fixes: 2de9d8e0d2 ("driver core: fw_devlink: Improve handling of cyclic dependencies")
Signed-off-by: Saravana Kannan <saravanak@google.com>
Tested-by: Colin Foster <colin.foster@in-advantage.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcom/sm7225-fairphone-fp4
Link: https://lore.kernel.org/r/20230207014207.1678715-6-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-08 13:37:54 +01:00
Greg Kroah-Hartman
42bb5be893 driver core: device_get_devnode() should take a const *
device_get_devnode() should take a constant * to struct device as it
does not modify it in any way, so modify the function definition to do
this and move it out of device.h as it does not need to be exposed to
the whole kernel tree.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Won Chung <wonchung@google.com>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230111113018.459199-8-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27 13:45:40 +01:00
Greg Kroah-Hartman
a9b12f8b4e driver core: make struct device_type.devnode() take a const *
The devnode() callback in struct device_type should not be modifying the
device that is passed into it, so mark it as a const * and propagate the
function signature changes out into all relevant subsystems that use
this callback.

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Alison Schofield <alison.schofield@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Ben Widawsky <bwidawsk@kernel.org>
Cc: Jeremy Kerr <jk@ozlabs.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Alistar Popple <alistair@popple.id.au>
Cc: Eddie James <eajames@linux.ibm.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Jilin Yuan <yuanjilin@cdjrlc.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Won Chung <wonchung@google.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230111113018.459199-7-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27 13:45:38 +01:00
Greg Kroah-Hartman
162736b0d7 driver core: make struct device_type.uevent() take a const *
The uevent() callback in struct device_type should not be modifying the
device that is passed into it, so mark it as a const * and propagate the
function signature changes out into all relevant subsystems that use
this callback.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Andreas Noever <andreas.noever@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Chaitanya Kulkarni <kch@nvidia.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jilin Yuan <yuanjilin@cdjrlc.com>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Mark Gross <markgross@kernel.org>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Maximilian Luz <luzmaximilian@gmail.com>
Cc: Michael Jamet <michael.jamet@intel.com>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Sanyog Kale <sanyog.r.kale@intel.com>
Cc: Sean Young <sean@mess.org>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Won Chung <wonchung@google.com>
Cc: Yehezkel Bernat <YehezkelShB@gmail.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> # for Thunderbolt
Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Wolfram Sang <wsa@kernel.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230111113018.459199-6-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27 13:45:36 +01:00
Linus Torvalds
71a7507afb Merge tag 'driver-core-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
 "Here is the set of driver core and kernfs changes for 6.2-rc1.

  The "big" change in here is the addition of a new macro,
  container_of_const() that will preserve the "const-ness" of a pointer
  passed into it.

  The "problem" of the current container_of() macro is that if you pass
  in a "const *", out of it can comes a non-const pointer unless you
  specifically ask for it. For many usages, we want to preserve the
  "const" attribute by using the same call. For a specific example, this
  series changes the kobj_to_dev() macro to use it, allowing it to be
  used no matter what the const value is. This prevents every subsystem
  from having to declare 2 different individual macros (i.e.
  kobj_const_to_dev() and kobj_to_dev()) and having the compiler enforce
  the const value at build time, which having 2 macros would not do
  either.

  The driver for all of this have been discussions with the Rust kernel
  developers as to how to properly mark driver core, and kobject,
  objects as being "non-mutable". The changes to the kobject and driver
  core in this pull request are the result of that, as there are lots of
  paths where kobjects and device pointers are not modified at all, so
  marking them as "const" allows the compiler to enforce this.

  So, a nice side affect of the Rust development effort has been already
  to clean up the driver core code to be more obvious about object
  rules.

  All of this has been bike-shedded in quite a lot of detail on lkml
  with different names and implementations resulting in the tiny version
  we have in here, much better than my original proposal. Lots of
  subsystem maintainers have acked the changes as well.

  Other than this change, included in here are smaller stuff like:

   - kernfs fixes and updates to handle lock contention better

   - vmlinux.lds.h fixes and updates

   - sysfs and debugfs documentation updates

   - device property updates

  All of these have been in the linux-next tree for quite a while with
  no problems"

* tag 'driver-core-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (58 commits)
  device property: Fix documentation for fwnode_get_next_parent()
  firmware_loader: fix up to_fw_sysfs() to preserve const
  usb.h: take advantage of container_of_const()
  device.h: move kobj_to_dev() to use container_of_const()
  container_of: add container_of_const() that preserves const-ness of the pointer
  driver core: fix up missed drivers/s390/char/hmcdrv_dev.c class.devnode() conversion.
  driver core: fix up missed scsi/cxlflash class.devnode() conversion.
  driver core: fix up some missing class.devnode() conversions.
  driver core: make struct class.devnode() take a const *
  driver core: make struct class.dev_uevent() take a const *
  cacheinfo: Remove of_node_put() for fw_token
  device property: Add a blank line in Kconfig of tests
  device property: Rename goto label to be more precise
  device property: Move PROPERTY_ENTRY_BOOL() a bit down
  device property: Get rid of __PROPERTY_ENTRY_ARRAY_EL*SIZE*()
  kernfs: fix all kernel-doc warnings and multiple typos
  driver core: pass a const * into of_device_uevent()
  kobject: kset_uevent_ops: make name() callback take a const *
  kobject: kset_uevent_ops: make filter() callback take a const *
  kobject: make kobject_namespace take a const *
  ...
2022-12-16 03:54:54 -08:00