summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-07-10dm-verity: make error counter atomicMikulas Patocka
The error counter "v->corrupted_errs" was not atomic, thus it could be subject to race conditions. The call to dm_audit_log_target("max-corrupted-errors") may be skipped due to the races. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Assisted-by: Claude:claude-opus-4.6 Fixes: 65ff5b7ddf05 ("dm verity: add error handling modes for corrupted blocks") Cc: stable@vger.kernel.org
2026-07-10mmc: sdhci-of-dwcmshc: Log eMMC reset callsSatyansh Shukla
Log when the BlueField-3 eMMC hardware reset path is invoked. This makes it easier to diagnose cases where the controller recovery path depends on issuing an eMMC reset, and helps confirm that the reset sequence was attempted on affected systems. Signed-off-by: Satyansh Shukla <satyansh.shukla@oracle.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-07-10dm-verity: increase sprintf buffer sizeMikulas Patocka
The prefix "DM_VERITY_ERR_BLOCK_NR" is 22 chars. Add '=', one digit for type, ',', up to 20 digits for a u64 block number, and a NUL terminator: that's 46 bytes. The buffer is 42 bytes. For block numbers >= 16 decimal digits (devices larger than ~16 EB with 4K blocks), snprintf silently truncates the uevent environment variable. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Assisted-by: Claude:claude-opus-4.6 Fixes: 65ff5b7ddf05 ("dm verity: add error handling modes for corrupted blocks") Cc: stable@vger.kernel.org
2026-07-10Merge tag 'tegra-for-7.2-soc-fixes' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes soc/tegra: Fixes for v7.2 Fix a spurious WARN() that was checking for an outdated condition. * tag 'tegra-for-7.2-soc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: fuse: Fix spurious straps warning on SMCCC platforms Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-07-10dm-verity: fix a possible NULL pointer dereferenceMikulas Patocka
Fix a possible NULL pointer dereference dm_verity_loadpin_is_bdev_trusted if the device has no table. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Assisted-by: Claude:claude-opus-4-6 Fixes: b6c1c5745ccc ("dm: Add verity helpers for LoadPin") Cc: stable@vger.kernel.org
2026-07-10dm-verity: avoid double increment of &use_bh_wq_enabledMikulas Patocka
verity_parse_opt_args is called twice, first with the only_modifier_opts, first with only_modifier_opts == true and then with only_modifier_opts == false. Thus, the static branch &use_bh_wq_enabled was incremented twice and the destructor verity_dtr would only decrement it once. Fix tihs bug by only incrementing it on the first call, on the second call, when v->use_bh_wq is true, do nothing. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Assisted-by: Claude:claude-opus-4-6 Cc: stable@vger.kernel.org Fixes: df326e7a0699 ("dm verity: allow optional args to alter primary args handling")
2026-07-10serial: qcom-geni: trace: Drop redundant len field from geni_serial_dataPraveen Talari
The dynamic array stored in the ring buffer already carries its own length in the array metadata. There is no need to also store it as a separate scalar field in the entry struct. Drop __field(unsigned int, len) and the corresponding __entry->len assignment, and use __get_dynamic_array_len(data) in the TP_printk for both the len=%u format argument and the __print_hex() size argument. This saves 4 bytes per event on the ring buffer. Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com> Suggested-by: Steven Rostedt <rostedt@goodmis.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://patch.msgid.link/20260615-add-tracepoints-for-qcom-geni-serial-v5-1-2efa4c97e0e2@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-10serial: 8250: force synchronous probe for the ISA and PNP driversRahul Bukte
On x86_64 defconfig, booting with driver_async_probe=serial hangs in early init. The 8250 PNP driver is put onto the async probe pool. serial8250_register_8250_port() runs in a kworker concurrently with the ISA registration done from the serial8250_init() initcall resulting in a deadlock or NULL dereference. - Deadlock: serial_core_register_port() holds port_mutex across serial_core_add_one_port() uart_configure_port() autoconfig_irq() probe_irq_on() async_synchronize_full(), which waits for the async probe pool to drain. The async PNP worker reaches the "port already in use" check and tries to unregister it. serial8250_register_8250_port() uart_remove_one_port() serial_core_unregister_port() This blocks on port_mutex. The init thread waits for the worker and the worker waits for the init thread. - NULL deref: when the worker instead observes a slot whose port.dev is set but whose port_dev has not yet been populated, it hits the null pointer on the call to serial_core_get_ctrl_dev() in serial_core_unregister_port(). Signed-off-by: Rahul Bukte <rahul.bukte@sony.com> Link: https://patch.msgid.link/20260610054130.2825182-1-rahul.bukte@sony.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-10serial: cpm_uart: replace irq_of_parse_and_map with platform_get_irqRosen Penev
platform_get_irq is a newer API for this that does not require irq_dispose_mapping(). Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260607021117.6325-1-rosenp@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-10Merge tag 'tegra-for-7.2-pmc-fixes' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes soc/tegra: pmc: Fixes for v7.2 This contains two fixes, one for a bad error unwinding path and another for an #ifdef block that wasn't covering all the combinations correctly. * tag 'tegra-for-7.2-pmc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: fix #ifdef block in header drm/tegra: Fix a strange error handling path Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-07-10dm-ioctl: fix a possible overflow in list_version_get_infoMikulas Patocka
sizeof(tt->version) is 12 bytes, but the code writes 16 bytes into the output buffer - info->vers->version[0], info->vers->version[1], info->vers->version[2] and info->vers->next. This can cause buffer overflow. Fix this buffer overflow by replacing "sizeof(tt->version)" with "sizeof(struct dm_target_versions)". Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Assisted-by: Claude:claude-opus-4.6 Cc: stable@vger.kernel.org
2026-07-10serial: 8250: Clear CON_PRINTBUFFER on port re-registrationFushuai Wang
When two PnP devices map to the same physical port, the serial8250 driver removes and re-registers the console structure for the same port. During re-registration, the console structure still has CON_PRINTBUFFER set from the initial registration, which causes console_init_seq() to set console->seq to syslog_seq. This results in re-printing the entire system log buffer, which may lead to RCU stall on slow serial consoles. Clear CON_PRINTBUFFER when re-registering a port to prevent duplicate log printing. Fixes: 835d844d1a28 ("8250_pnp: do pnp probe before legacy probe") Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Fushuai Wang <wangfushuai@baidu.com> Link: https://patch.msgid.link/20260522101042.21976-1-fushuai.wang@linux.dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-10dm_early_create: fix freeing used table on dm_resume failureMikulas Patocka
If dm_resume fails, the kernel attempts to free table with dm_table_destroy, but the table was already instantiated with dm_swap_table. This commit skips the call to dm_table_destroy in this case. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Assisted-by: Claude:claude-opus-4.6 Fixes: 6bbc923dfcf5 ("dm: add support to directly boot to a mapped device") Cc: stable@vger.kernel.org
2026-07-10tty: serial: mpc52xx_uart: add bounds check for psc_num array indexRosen Penev
psc_num is derived from port->mapbase bits 11:8, giving a range of 0-15, but the psc_mclk_clk and psc_ipg_clk arrays are sized to MPC52xx_PSC_MAXNUM (12 when CONFIG_PPC_MPC512x is set). A malformed device tree with bits 11:8 >= 12 would cause out-of-bounds writes in mpc512x_psc_alloc_clock() and out-of-bounds reads/writes in mpc512x_psc_relse_clock() and mpc512x_psc_endis_clock(). The same unchecked index also appears in mpc512x_psc_handle_irq(). Add ARRAY_SIZE() bounds checks to all four functions before using psc_num as an array index. Assisted-by: Opencode:big-pickle Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260530061025.11625-1-rosenp@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-10dm-integrity: fix a bug if the bio is out of limitsMikulas Patocka
If dm_integrity_check_limits fails, the code would exit with DM_MAPIO_KILL. However, the range would be already locked at this point, and it wouldn't be unlocked, resulting in a deadlock. Let's move the limit check up, so that when it exits, no resources are leaked. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Assisted-by: Claude:claude-opus-4.6 Fixes: fb0987682c62 ("dm-integrity: introduce the Inline mode") Cc: stable@vger.kernel.org
2026-07-10mmc: block: reject invalid perdev_minors before divisionXu Rao
The mmcblk.perdev_minors module parameter is parsed as a signed int and is used during mmc_blk_init() to compute the number of supported block devices. Passing perdev_minors=0 makes the init path divide by zero when it computes max_devices. Negative values are invalid as well and would make max_devices negative before it is later used as an IDA limit. Reject non-positive perdev_minors values before registering any mmcblk resources. Signed-off-by: Xu Rao <raoxu@uniontech.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-07-10dm-integrity: don't increment hash_offset twiceMikulas Patocka
hash_offset is already incremented in the loop "for (i = 0; i < to_copy; i++, ts--)". Do not increment it again. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Assisted-by: Claude:claude-opus-4.6 Fixes: 84597a44a9d8 ("dm-integrity: dm integrity: add optional discard support") Cc: stable@vger.kernel.org
2026-07-10dm-integrity: fix leaking uninitialized kernel memoryMikulas Patocka
If hash size is less than device's tuple size, dm-integrity is supposed to zero the remaining space. There was a bug in the code that zeroing didn't work. This commit fixes it. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Assisted-by: Claude:claude-opus-4.6 Fixes: fb0987682c62 ("dm-integrity: introduce the Inline mode") Cc: stable@vger.kernel.org
2026-07-10dm-integrity: fix the 'fix_hmac' optionMikulas Patocka
When the "fix_hmac" argument is used, dm-integrity is supposed to check the superblock with the journal_mac. However, there was a logic bug in the code - the code only checked the superblock mac if the bit SB_FLAG_FIXED_HMAC was set in the superblock. So, the attacker could clear this bit and bypass the checking trivially. This commit changes dm-integrity so that when the user specified the "fix_hmac" flag and the superblock doesn't have the bit SB_FLAG_FIXED_HMAC set, the activation is aborted with an error. Unfortunatelly, there's a bug in the integritysetup tool that when using the 'open' command it passes the "fix_hmac" argument to the kernel even if the user specified --integrity-legacy-hmac. The bug will be fixed in the upcoming 2.8.7 release. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Reported-by: Shukai Ni <shukai.ni@kuleuven.be>
2026-07-10ASoC: xilinx: xlnx_i2s: Use dev_err_probe() and drop redundant error handlingMark Brown
bui duc phuc <phucduc.bui@gmail.com> says: It replaces dev_err() followed by return with dev_err_probe() where appropriate in probe paths, allowing deferred probe to be handled correctly while simplifying the code. It also removes redundant dev_err() calls after helper functions that already report failures, avoiding duplicate error messages. Link: https://patch.msgid.link/20260710102138.29347-1-phucduc.bui@gmail.com
2026-07-10ASoC: xilinx: xlnx_spdif: Use dev_err_probe() and drop redundant error handlingbui duc phuc
Use dev_err_probe() for probe error handling where appropriate to simplify the code and properly handle deferred probe. Also remove redundant error messages when the called helper already reports failures, returning the error directly to avoid duplicate logging. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Reviewed-by: Michal Simek <michal.simek@amd.com> Link: https://patch.msgid.link/20260710102138.29347-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-10ASoC: xilinx: xlnx_spdif: Preserve devm_request_irq() error codesbui duc phuc
devm_request_irq() can return various error codes, such as -EINVAL, -ENOTCONN, -ENOMEM, -ENOSYS, and -EBUSY. However, the driver overwrites all of them with -ENODEV, which hides the actual cause of the failure. Also, devm_request_irq() already reports failures internally, so the additional dev_err() call is redundant. Return the original error code and remove the duplicate error message. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Reviewed-by: Michal Simek <michal.simek@amd.com> Link: https://patch.msgid.link/20260710102138.29347-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-10ASoC: xilinx: xlnx_i2s: Use dev_err_probe() and drop redundant error handlingbui duc phuc
Use dev_err_probe() for probe error handling where appropriate to simplify the code and properly handle deferred probe. Also remove redundant error messages when the called helper already reports failures, returning the error directly to avoid duplicate logging. Reviewed-by: Michal Simek <michal.simek@amd.com> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260710102138.29347-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-10media: drivers/media/dvb-core: CodeStyle for dvb_frontend_open()Ricardo Ribalda
We can rearrange a bit the function to reduce the indentation levels. No functional change added to this patch. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-07-10media: drivers/media/dvb-core: Refactor dvb_frontend_open lockingRicardo Ribalda
Split out the wait function, and introduce some new toys: guard and lockdep. This fixes the following cocci warnings: drivers/media/dvb-core/dvb_frontend.c:2897:1-7: preceding lock on line 2776 drivers/media/dvb-core/dvb_frontend.c:2897:1-7: preceding lock on line 2786 drivers/media/dvb-core/dvb_frontend.c:2897:1-7: preceding lock on line 2809 Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-07-10media: drivers/media/dvb-core: Split dvb_frontend_open()Ricardo Ribalda
Move the actual opening to its own function. Not intended code change. This is a preparation for the next patch. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-07-10media: dvb-frontends/helene: Rename priv variableRicardo Ribalda
Coccinelle triggers a false positive where it thinks that the priv variable in helene_attach_s and helene_attach is the same variable as helene_probe. This is due to a bad heuristic in cocci. We have reported it to cocci, but until/if this is fixed, renaming a local variable is a good compromise to fix this warning: ./dvb-frontends/helene.c:1049:2-7: WARNING: invalid free of devm_ allocated data ./dvb-frontends/helene.c:1013:2-7: WARNING: invalid free of devm_ allocated data Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-07-10media: platform: amd: use refcount_t instead of atomic_tRicardo Ribalda
We are using the refcnt variable for refcounting. Use the refcount_t type instead, as it has support for saturation and underflow. This also makes cocci happier, as it will fix the following warning: ./platform/amd/isp4/isp4_subdev.c:394:6-25: WARNING: atomic_dec_and_test variation before object free at line 395. Fixes: 4c5feef6a62c ("media: platform: amd: Add isp4 fw and hw interface") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Pratap Nirujogi <pratap.nirujogi@amd.com> Reviewed-by: Bin Du <bin.du@amd.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-07-10media: vimc: Ensure that pixel_rate fits in 32 bitsRicardo Ribalda
pixel_rate is set to VIMC_PIXEL_RATE_FIXED, which the code expects to fit in 32 bits. Make that constraint into a WARN_ON, so if we ever break that constraint a kernel warning will be triggered. It also fixes the following cocci warning: ./test-drivers/vimc/vimc-sensor.c:107:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-07-10media: vimc: Fix prototype of vimc_sensor_update_frame_timingRicardo Ribalda
The function does not return any value, make it into a void function. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-07-10media: iris: Replace ternary conditionals with max()Ricardo Ribalda
The max() macro is simpler to read than the current construction, it also makes cocci happier, which currently throws these warnings: ./platform/qcom/iris/iris_vpu_buffer.c:703:13-15: WARNING opportunity for max() ./platform/qcom/iris/iris_vpu_buffer.c:583:23-25: WARNING opportunity for max() Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-07-10media: em28xx-video: Remove unneeded semicolonsRicardo Ribalda
There is no need to add a semicolon after a switch statement. It also makes cocci a bit uneasy. It triggers the following warnings: ./usb/em28xx/em28xx-cards.c:4085:2-3: Unneeded semicolon ./usb/em28xx/em28xx-core.c:635:2-3: Unneeded semicolon Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-07-10Documentation/ABI: add testing entry for AMD PMF character device interfaceShyam Sundar S K
Add a Documentation/ABI/testing entry describing the AMD PMF util layer character device (/dev/amdpmf_interface) and the initial ioctl used to query feature support and metrics data information. This interface is available when CONFIG_AMD_PMF_UTIL_SUPPORT=y. Also update the MAINTAINERS record with the new UAPI header. Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://patch.msgid.link/20260609081044.2416731-8-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2026-07-10platform/x86/amd/pmf: Introduce AMD PMF testing tool for driver metrics and ↵Shyam Sundar S K
features This tool leverages amd-pmf ioctls exposed via the util layer, allowing validation of its newly integrated util layer and /dev/amdpmf_interface. It includes a user-space test application, test_amd_pmf, designed to interact with the PMF driver and retrieve relevant metrics for the testing and analysis. It provides definitions for test metrics, feature IDs, and device states, and includes tests for various AMD PMF metrics such as power source, skin temperature, battery state, and custom BIOS inputs/outputs. It also enables the testing of PMF metrics data and feature support reporting. Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://patch.msgid.link/20260609081044.2416731-7-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2026-07-10Merge tag 'reset-fixes-for-v7.2' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/pza/linux into arm/fixes Reset controller fixes for v7.2 * Fix the SpacemiT K3 USB2 AHB reset bit location. * Add missing COMBOPHY_RESET definition for Altera Agilex5. * Fix the reset-sunxi initialization error path to release the requested memory region. * Correct polarity of MIPI CSI resets on NXP i.MX8MQ. The corresponding fix in the CSI2 driver, 6d79bb8fd2aa, is already contained in v7.2-rc1. * tag 'reset-fixes-for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/pza/linux: reset: imx7: Correct polarity of MIPI CSI resets on i.MX8MQ reset: sunxi: fix memory region leak on ioremap failure dt-bindings: reset: altr: add COMBOPHY_RESET for Agilex5 reset: spacemit: k3: fix USB2 ahb reset Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-07-10platform/x86/amd/pmf: Implement util layer ioctl handlerShyam Sundar S K
Implement the ioctl handler for the util layer character device. This support adds the actual functionality to populate PMF metrics from the TA shared memory buffer and return them to userspace. The implementation includes: - amd_pmf_populate_data() to extract metrics from TA shared memory - amd_pmf_set_ioctl() to handle userspace ioctl requests - Size negotiation for forward/backward compatibility - Feature-based population of struct fields - Export amd_pmf_get_ta_custom_bios_inputs() Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://patch.msgid.link/20260609081044.2416731-6-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2026-07-10MAINTAINERS: Update SpacemiT SoC git tree repositoryYixun Lan
Due to security concern, switch SpacemiT kernel SoC tree's repository from github.com to kernel.org Signed-off-by: Yixun Lan <dlan@kernel.org> Link: https://lore.kernel.org/r/20260707-07-spacemit-git-repo-url-v1-1-137697316a4c@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-07-10platform/x86/amd/pmf: Move debug helper functions to UAPI headerShyam Sundar S K
These debug helper functions convert enumerated values to appropriate message and can be useful for userspace tools and other kernel components that need to interpret AMD PMF state values. By making them inline functions in the UAPI header, they become available to both kernel and userspace without code duplication. Also, prefix the function names with amd_pmf_. Also, include a case to cover unused enum entries. Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://patch.msgid.link/20260609081044.2416731-5-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2026-07-10platform/x86/amd/pmf: Store commonly used enums in the header fileShyam Sundar S K
Relocate commonly used enums from multiple source files into a shared header file to simplify code structure, improve readability, and enhance maintainability. Also, remove the initialization of the first enum member, since it is not needed. Add the AMD_PMF_ prefix to the laptop_placement and platform_type enums since these names are overly generic for inclusion in a UAPI header Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://patch.msgid.link/20260609081044.2416731-4-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2026-07-10platform/x86/amd/pmf: store BIOS output values for user-space metrics via ↵Shyam Sundar S K
util IOCTL Add a bios_output[] to amd_pmf_dev struct and store the latest values for BIOS output policies when applying PMF policies. This enables the AMD PMF util layer to expose these BIOS outputs alongside selected thermal and power metrics to user space via /dev/amdpmf_interface and a new IOCTL, supporting real-time monitoring tools such as SystemDeck. Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://patch.msgid.link/20260609081044.2416731-3-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2026-07-10platform/x86/amd/pmf: Add util layer and userspace character device interfaceShyam Sundar S K
Add a util layer to AMD PMF that exposes a minimal userspace interface via a character device for metrics monitoring and feature discovery. This creates /dev/amdpmf_interface with basic ioctl support to retrieve PMF metrics such as: * Power source and power slider position * Platform type, lid state, and user presence * Skin temperature and ambient light * BIOS input parameters (1-10) * Graphics workload metrics * CPU C-state residency (average and maximum) * Socket power consumption * Auto Mode: Automatic power profile switching based on system activity * Static Power Slider: User-selectable power profiles * Policy Builder (Smart PC): Action based policy management * Dynamic Power Slider AC: Adaptive power profiles when on AC power * Dynamic Power Slider DC: Adaptive power profiles when on battery The interface enables smoother integration with userspace tools such as AMD SystemDeck [1], which is widely used for monitoring and controlling power and thermal behavior on AMD platforms. These tools help designers keep major components within thermal limits to ensure proper operation and enhance overall system stability and reliability. The feature is gated behind the CONFIG_AMD_PMF_UTIL_SUPPORT Kconfig option, allowing it to be disabled if not needed. The implementation uses existing PMF infrastructure to populate data from the TA (Trusted Application) shared memory buffer. Link: https://docs.amd.com/v/u/en-US/68773_0.50 [1] Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://patch.msgid.link/20260609081044.2416731-2-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2026-07-10ASoC: xtensa: Use dev_err_probe() and drop redundant error handlingbui duc phuc
Convert error paths with messages to dev_err_probe(), which combines dev_err() and the return statement while also handling -EPROBE_DEFER for the clock path. Remove the redundant "err:" label and return errors directly. Paths such as platform_get_irq() already log failures in the callee, so they simply return the error code without printing an additional message. Inline the pm_runtime_disable() cleanup at its only call site. No functional change. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Reviewed-by: Max Filippov <jcmvbkbc@gmail.com> Link: https://patch.msgid.link/20260709043740.329504-1-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-10Merge tag 'asoc-fix-v7.2-rc2' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v7.2 A fairly standard set of device specific fixes and quriks for new devices, nothing too remarkable here.
2026-07-10drm/xe/guc: toggle paging engine support for NVL-S+Matthew Auld
NVL-S with latest GuC should be the first platform combo to support the special GUC_PAGING_CLASS feature. v2: - Update with the final GuC version v3: - Split VF vs PF versioning. Which is recommendation from GuC side. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patch.msgid.link/20260626111520.487997-22-matthew.auld@intel.com
2026-07-10drm/xe/hw_engine: document top-down paging requirementMatthew Auld
We were doing this anyway, but going forward for paging engines, agreement is to always reserve BCS instances in top down fashion. This hopefully future proofs things for VFs, where in some low-level places it might only have the physical BCS instance from the hw pov. If we stick to a consistent mapping scheme, it should make it possible to determine if this is a special paging engine, or not. v2 (Daniele) - Give a concrete example, like with page fault descriptor Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patch.msgid.link/20260626111520.487997-21-matthew.auld@intel.com
2026-07-10drm/xe/vf: wire up NUM_PAGING_ENGINE_INSTANCESMatthew Auld
When host PF writes the logical configuration for the GUC PAGING engine, the VF is meant to query it, and mirror it. Size of N means we have paging logical index range [0, N-1], with N fewer normal copy engines. Agreement is that PF will only spawn PAGING engines on NVL-S+, so this should be zero on older platforms, where we should simply fall back to the old behaviour. v2 (Sashiko): - We can't call use the guc_has_paging_engine() this early in the VF code. With that just unconditionally do the query, if the GuC is new enough and take the value as-is. With that drop the -1 special case and just let the upper layers figure out the rest. v3: - Also update xe_guc_klv_key_to_string. (Michal) - Add kernel-doc for xe_gt_sriov_vf_paging_engines(), plus other tweaks. (Michal) - Update with final GuC version. v4: - Just fallback to manual reserve when vf reported paging engines is zero. Will revisit in the future. v5 (Michal): - Convert the assert to a full abort if we ever see non-zero GuC paging engine count, on pre-nvl. - Move the VF hunk in guc_has_paging_engine() here. - Some small tweaks. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Piotr Piórkowski <piotr.piorkowski@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patch.msgid.link/20260626111520.487997-20-matthew.auld@intel.com
2026-07-10drm/xe/guc: handle submit mask with paging engineMatthew Auld
We need to re-map the submit mask so that we correctly account for the logical mask of paging engines, if the GUC_PAGING_CLASS is in play. We could also have multiple instances (possible on VF), so we need to handle that also. v2 (Daniele): - Move the implementation to guc_submit.c Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patch.msgid.link/20260626111520.487997-19-matthew.auld@intel.com
2026-07-10drm/xe/guc: handle guc logical instance for paging engineMatthew Auld
In the GuC backend, we need a different logical instance when referring to the reserved paging engine. Under the hood, this is still just the same physical BSC engine, however from the GuC POV this is actually re-mapped to a separate GUC_PAGING_CLASS, with the logical index starting from zero. The idea is to not leak this into the upper layers, since this is GuC version specific, so the changes here are purely on the GuC side. No functional change. v2: - Add some kernel-doc to explain the usage. - Move the implementation to guc.c Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patch.msgid.link/20260626111520.487997-18-matthew.auld@intel.com
2026-07-10drm/xe: refactor the paging engine setupMatthew Auld
On newer platforms, the paging configuration is now configured by the PF via the ADS object, where VF side should ensure that everything configured as GUC_PAGING_CLASS is correctly mirrored on VF side. For example PF could in theory reserve two BCS instances, and we expect VF to mirror that. With that move towards having a logical mask of all the paging engines, and also generalise selecting those engines, based on the number of paging engines. Also cache the first designated paging engine, which will makes things a little cleaner here, and in later patches. No functional changes for existing platforms. v2 (Sashiko): - Rework the loop slightly so that we don't needlessly check for the paging engine, before we have correctly set the logical instance. - Add a proper error return, if we encounter a bogus paging config. Thinking ahead to VF where the config is defined by the PF, we should just gracefully exit the probe sequence. v3: - Move paging_engines > copy_engines engines check to VF patch. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Link: https://patch.msgid.link/20260626111520.487997-17-matthew.auld@intel.com
2026-07-10drm/xe/hw_engine: don't open code is_usm_hwe()Matthew Auld
Prefer is_usm_hwe() here. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patch.msgid.link/20260626111520.487997-16-matthew.auld@intel.com