summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2026-10-02arm_mpam: Add missing mon_sel locking in MBWU save and restoreBen Horgan
The mon_sel_lock is used to protect the mbwu_state, as well as h/w accesses that use MPAMCFG_MON_SEL. However, in mpam_restore/save_mbwu_state(), mbwu_state is accessed without holding the mon_sel_lock. Add the missing locking. Fixes: 41e8a14950e1 ("arm_mpam: Track bandwidth counter state for power management") Signed-off-by: Ben Horgan <ben.horgan@arm.com> Tested-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
2026-10-02arm_mpam: Set mpam_feat_msmon_mbwu_31counter when there are bandwidth countersBen Horgan
When MPAMF_MSMON_IDR.MSMON_MBWU is 1, MSMON_MBWU is present and has a VALUE field of 31 bits. If additionally, MPAMF_MBWUMON_IDR.HAS_LONG is 1, then MSMON_MBWU_L is also present and has a VALUE field of 44 or 63 bits as indicated by MPAMF_MBWUMON_IDR.LWD. Hence, if there are memory bandwidth counters then there are always 31 bit counters irrespective of whether there also long counters. Set the 31 bit bandwidth counter feature bit whenever there are bandwidth counters. Fixes: fdc29a141d63 ("arm_mpam: Probe for long/lwd mbwu counters") Signed-off-by: Ben Horgan <ben.horgan@arm.com> Tested-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
2026-10-02arm_mpam: Restore the error interrupt enable from mpam_cpu_online()Ben Horgan
When all the associated CPUs to an MSC are offline, possibly caused by PSCI_CPU_OFF, the power supply to the MSC can be cut off and all the registers lose their value, including MPAMF_ECR.INTEN. Afterwards, we need to explicitly set MPAMF_ECR.INTEN when the first associated CPU becomes online and the power supply to the MSC is recovered. Restore MPAMF_ECR.INTEN in mpam_cpu_online() when the first associated CPU of the MSC becomes online. Fixes: 49aa621c4dca ("arm_mpam: Register and enable IRQs") Signed-off-by: Ben Horgan <ben.horgan@arm.com> Tested-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> [morse: rephrased commit message] Signed-off-by: James Morse <james.morse@arm.com>
2026-10-02arm_mpam: Move MPAMF_ECR write helpers to allow reuseBen Horgan
In preparation for calling mpam_enable_msc_ecr() from the CPU hotplug handlers move it higher in the file. Move mpam_disable_msc_ecr() too to keep them together. Signed-off-by: Ben Horgan <ben.horgan@arm.com> Tested-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: James Morse <james.morse@arm.com> Signed-off-by: James Morse <james.morse@arm.com>
2026-10-02PCI: Accept AtomicOps already enabled by the hypervisorNikola Prica
pci_enable_atomic_ops_to_root() currently fails when no Root Port is visible. That is common in passthrough guests (ESXi, Hyper-V): the Endpoint is assigned to the VM, but the Root Port above it is not visible in the guest topology. In those setups the hypervisor may already have enabled AtomicOp Requester Enable on the device. If PCI_EXP_DEVCTL2_ATOMIC_REQ is set, treat AtomicOps as already enabled and return success instead of failing the Root Port walk. After 1ae8c4ce1570 ("PCI: Enable AtomicOps only if Root Port supports them"), pci_enable_atomic_ops_to_root() always returns failure if the Root Port is not visible, so drivers don't use atomics when they could. On systems where the Root Port is not visible but *does* support AtomicOps, this is a regression: prior to 1ae8c4ce1570, it enabled AtomicOps in the endpoint and returned success. Fixes: 1ae8c4ce1570 ("PCI: Enable AtomicOps only if Root Port supports them") Signed-off-by: Nikola Prica <nikola.prica@amd.com> [bhelgaas: commit log, code comment] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Gerd Bayer <gbayer@linux.ibm.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Gerd Bayer <gbayer@linux.ibm.com> Link: https://patch.msgid.link/20260921111903.978687-1-nikprica@amd.com
2026-10-02Merge tag 'for-next-tpm-v7.3-rc6' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm fixes from Jarkko Sakkinen. - tpm error handling and buffer size fixes * tag 'for-next-tpm-v7.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: Disable TPM on null key name mismatch tpm: fix off-by-four bounds check in tpm2_get_random() tpm: Fix auth session leak in tpm2_get_random() error path tpm: Fix heap buffer overflow in tpm_transmit_cmd()
2026-10-02virt: tdx-guest: Make the Quote buffer size dynamicPeter Fang
Support a new TDX module ABI that reports the Quote size limit in a metadata field. The fixed 128KB buffer in the driver may be too small for Quotes that use new algorithms like post-quantum cryptography (PQC), which can produce much larger certificates. With this ABI, the guest sizes the buffer to the platform's needs and no longer has to rely on some empirical number. The shared buffer comes from the buddy allocator, as the host expects it to be physically contiguous. The allocator's page order limit should be sufficient for current attestation needs. Platforms that don't report the limit fall back to the default 128KB buffer. Assume the TDX module always reports the same size. It is a TDX module bug if the size changes. AI was used under supervision to collect/apply feedback, review code and workshop logs. Based on a patch originally by Kuppuswamy Sathyanarayanan. Signed-off-by: Peter Fang <peter.fang@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Link: https://patch.msgid.link/20260930103739.2851980-7-peter.fang@intel.com
2026-10-02virt: tdx-guest: Add a helper for the Quote buffer sizePeter Fang
The Quote buffer size is a constant sprinkled across several places. Read it from a helper instead. And rename the constant to avoid using a verb. This sets up the plumbing for a later change that makes the size dynamic. There are several "sizes" at play here: the raw Quote data, the Quote buffer (the header metadata plus the raw data), and the allocation (the page-padded Quote buffer). The helper returns the Quote buffer size and leaves page alignment to callers that need it. AI was used under supervision to collect/apply feedback, review code and workshop logs. Signed-off-by: Peter Fang <peter.fang@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://patch.msgid.link/20260930103739.2851980-5-peter.fang@intel.com
2026-10-02virt: tdx-guest: Calculate the Quote buffer size safelyPeter Fang
struct tdx_quote_buf has a trailing flexible array member. struct_size() calculates the size of this kind of struct safely. It handles overflow, which helps since the Quote size comes from the host. Use it to rewrite the bounds check logic, since "header_size + data_size > buf_size" ... is more readable than "data_size > buf_size - header_size". This also prepares for a later change that needs the same "header_size + data_size" calculation for the Quote buffer size. AI was used under supervision to collect/apply feedback, review code and workshop logs. Signed-off-by: Peter Fang <peter.fang@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Reviewed-by: Tony Lindgren <tony.lindgren@linux.intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Link: https://patch.msgid.link/20260930103739.2851980-4-peter.fang@intel.com
2026-10-02virt: tdx-guest: Give the Quote buffer an explicit typePeter Fang
The Quote buffer is always a "struct tdx_quote_buf", but its global pointer is a "void *". A function would have to convert it back to make sense of it. Declare the global with its actual type, and give it a better name. This creates variable shadowing in wait_for_quote_completion(), so rename its parameter for clarity. AI was used under supervision to collect/apply feedback, review code and workshop logs. Signed-off-by: Peter Fang <peter.fang@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Link: https://patch.msgid.link/20260930103739.2851980-3-peter.fang@intel.com
2026-10-02Revert "drm/amd/display: Attach blend mode property for alpha planes"Alex Deucher
This reverts commit 44139872f22350b1e6c45da80e414caca81f11f5. This regresses blend mode handling. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-02iommu/arm-smmu-v3-test: Fix UBSAN errorMostafa Saleh
struct arm_smmu_invs marks its flexible array member inv[] with the __counted_by(max_invs). arm_smmu_v3_invs_test() uses invs1 to invs5 which has num_invs = 3 but omit max_invs. This causes the following UBSAN error: [ 2.333240] UBSAN: array-index-out-of-bounds in drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:1116:21 [ 2.333604] # arm_smmu_v3_invs_test: lib/ubsan.c:228: array-index-out-of-bounds in drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c [ 2.334129] index 1 is out of range for type 'struct arm_smmu_inv[] __counted_by(max_invs)' (aka 'struct arm_smmu_inv[]') [ 2.335375] CPU: 6 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G N 7.2.0-g8dcb331fbb72 #2 PREEMPT [ 2.335759] Tainted: [N]=TEST [ 2.335791] Hardware name: linux,dummy-virt (DT) [ 2.336254] Call trace: [ 2.336932] show_stack+0x18/0x24 (C) [ 2.338443] __dump_stack+0x28/0x38 [ 2.338494] dump_stack_lvl+0x54/0x6c [ 2.338518] dump_stack+0x18/0x24 [ 2.338541] ubsan_epilogue+0x10/0x44 [ 2.338565] __ubsan_handle_out_of_bounds+0xb8/0xbc [ 2.338834] arm_smmu_invs_merge+0x688/0x8ac [ 2.338862] arm_smmu_v3_invs_test+0xd4/0x598 [ 2.338890] kunit_try_run_case+0x64/0x160 [ 2.338914] kunit_generic_run_threadfn_adapter+0x28/0x4c [ 2.338955] kthread+0x10c/0x12c [ 2.338984] ret_from_fork+0x10/0x20 [ 2.339433] ---[ end trace ]--- Explicitly set max_invs = 3 on the test arrays to match the number of elements. Fixes: 15a2a5645ad7 ("iommu/arm-smmu-v3: Introduce a per-domain arm_smmu_invs array") Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Mostafa Saleh <smostafa@google.com> Reviewed-by: Pranjal Shrivastava <praan@google.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Will Deacon <will@kernel.org>
2026-10-02iommu/arm-smmu-v3-test: Fix OOB in arm_smmu_v3_invs_test_verify()Mostafa Saleh
arm_smmu_v3_invs_test_verify() validates the array bounds using KUNIT_EXPECT_EQ(), which triggers a failure and continues execution. If invs->num_invs was smaller than expected, the next loop over num_invs would blindly read past the end of the invs->inv[] array. Switch to KUNIT_ASSERT_EQ() to fail and stop the test on bound errors. Fixes: 15a2a5645ad7 ("iommu/arm-smmu-v3: Introduce a per-domain arm_smmu_invs array") Reported-by: Sashiko <> Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Mostafa Saleh <smostafa@google.com> Reviewed-by: Pranjal Shrivastava <praan@google.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Will Deacon <will@kernel.org>
2026-10-02iommu/arm-smmu-v3-test: Add missing error checks for inv arrayMostafa Saleh
arm_smmu_invs_merge() and arm_smmu_invs_alloc() can return NULL or errors which are checked by the driver but not the test. Add KUNIT_ASSERT_NOT_ERR_OR_NULL() after calling them to fail the test instead of accessing NULL or ERR pointers. Fixes: 15a2a5645ad7 ("iommu/arm-smmu-v3: Introduce a per-domain arm_smmu_invs array") Reported-by: Sashiko <> Signed-off-by: Mostafa Saleh <smostafa@google.com> Reviewed-by: Pranjal Shrivastava <praan@google.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Will Deacon <will@kernel.org>
2026-10-02iommu/arm-smmu-v3-test: Fix arm_smmu_v3_test_debug_print_used_bits()Mostafa Saleh
arm_smmu_v3_test_debug_print_used_bits() hardcodes arm_smmu_get_ste_used() instead of using the provided writer->ops->get_used() callback. This caused Context Descriptors to be incorrectly parsed as STEs. Fixes: 56e1a4cc2588 ("iommu/arm-smmu-v3: Add unit tests for arm_smmu_write_entry") Reported-by: Sashiko <> Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Mostafa Saleh <smostafa@google.com> Reviewed-by: Pranjal Shrivastava <praan@google.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Will Deacon <will@kernel.org>
2026-10-02iommu/arm-smmu-v3: Ensure L2 tables are visible before L1 ptrsMostafa Saleh
Commit 6fabce53f6b9 ("iommu/arm-smmu-v3: Add a missing dma_wmb() for hitless STE update") adds a dma_wmb() to arm_smmu_write_entry() to make sure stream tables and context descriptors are observed first. However, STE L1 table descriptors are configured directly via WRITE_ONCE(), where before that they were zeroed with memset() inside dma_direct_alloc() then written to abort in via memset() also in arm_smmu_init_initial_stes() without a barrier in both cases which means that the SMMUv3 can observe the allocated table before the written descriptors causing it to fetch random data. Similarly in arm_smmu_write_cd_l1_desc() where the L1 CD is written after dma_alloc_coherent() with no barriers. Add dma_wmb() in both cases. Fixes: 48ec83bcbcf5 ("iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices") Reported-by: Sashiko <> Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Mostafa Saleh <smostafa@google.com> Reviewed-by: Pranjal Shrivastava <praan@google.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Will Deacon <will@kernel.org>
2026-10-02iommu/arm-smmu-v3: Default queue depths to one page in a kdump kernelKiryl Shutsemau (Meta)
All three queues are sized from the maxima the hardware advertises in IDR1 and allocated at probe, up to 4 MB each on a 4K-page kernel. The capture kernel already disables two of them: arm_smmu_device_reset() drops CR0_EVTQEN and CR0_PRIQEN. It still allocates both at full size. A kdump capture kernel runs from a small crashkernel reservation, and every SMMUv3 instance pays that cost again, up to 12 MB apiece. It goes to queues that either serve the handful of devices used to save the dump or are switched off outright, and it is memory the dump itself needs. Size all three queues at one page worth of entries when is_kdump_kernel(). The queues carry commands and fault records rather than DMA data, so dump throughput is unaffected. A shallower command queue only bounds how many commands may be in flight before a sync, which does not matter for the few devices that save the dump. The cmdq_max_n_shift parameter therefore does not apply in a capture kernel. Suggested-by: Kyle McMartin <jkkm@meta.com> Assisted-by: LLM Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Tested-by: Yuanhe Shu <xiangzao@linux.alibaba.com> Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Breno Leitao <leitao@debian.org> Signed-off-by: Will Deacon <will@kernel.org>
2026-10-02iommu/arm-smmu-v3: Add a cmdq_max_n_shift module parameterKiryl Shutsemau (Meta)
The command queue depth comes straight from the maximum the hardware advertises in IDR1, which reaches megabytes of coherent DMA per queue. A system with several SMMUv3 instances pays that per instance, and the Tegra241 CMDQV pays it again for every VCMDQ it preallocates. Queue depth only bounds how many commands may be in flight before a sync. A machine driving a handful of devices, or one with a tight memory budget, has no use for the maximum, and no way to say so. Add cmdq_max_n_shift, a cap on the depth given as the log2 of the entry count, the form the hardware itself takes in the LOG2SIZE field of CMDQ_BASE. It defaults to the largest depth the driver allocates, so an unset parameter changes nothing. Decide the depth in arm_smmu_cmdq_max_n_shift(), which applies the parameter to the IDR1 value, so the queue is allocated at the requested size. The Tegra241 CMDQV sizes its VCMDQs from IDR1 itself, so route that through the same helper. Floor the request at one page worth of entries. Without the floor, a small request trips the CMDQ_BATCH_ENTRIES check in arm_smmu_device_hw_probe() and the SMMU fails to probe. The floor also costs nothing: coherent DMA is page granular, so a shallower queue occupies the same memory as one that fills the page. Assisted-by: LLM Reviewed-by: Breno Leitao <leitao@debian.org> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Will Deacon <will@kernel.org>
2026-10-02Bluetooth: btintel_pcie: use managed IRQ teardownRunyu Xiao
The PCIe driver registers its MSI-X handlers with devm_request_threaded_irq(), but remove() uses free_irq() directly. The devres actions then retain registrations and attempt to release them again during device cleanup. Use devm_free_irq() for the remove path and for already registered vectors when a later setup request fails. This removes the managed resource at the same time as the IRQ is released and keeps MSI-X vector teardown ordered after IRQ ownership is gone. Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2026-10-02iommu/arm-smmu-v3: Add support for arm,instdata-override DT propertyPeter Griffin
The Google Tensor G5 SoC (Laguna) has a silicon errata with the SMMU integration where the AxPROT[2] signal is always 1, which makes all transactions appear as instructions. To avoid F_PERMISSION faults (due to the VMSAv8-64 requirement that unprivilieged writable buffers are treated as Privileged Execute-Never (PXN)), as a software workaround we make use of the INSTCFG override feature to force all incoming traffic to data. To enable this workaround, the "arm,instdata-override" DT property can be provided in the device tree entry for the SMMU, similar to how existing errata workarounds are handled by this driver. Note this is added for "stage-1" and "stage-2" but we intentionally leave out "bypass" as nothing is downstream of the SMMU that makes use of the Instruction/Data attribute. [peter.griffin: ported to upstream, updated commit message, remove feature flag] Signed-off-by: Pranjal Shrivastava <praan@google.com> Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Will Deacon <will@kernel.org>
2026-10-02tee: optee: ffa: support shared memory offsets on large-page kernelsMahantesh Salimath
OP-TEE FF-A memory objects use 4 KiB pages, while the kernel page size may be larger. Consequently, tee_shm->offset can be greater than or equal to FFA_PAGE_SIZE, but OP-TEE rejects such a value in internal_offs. Do not encode the excess page offset in offs_low/offs_high. Those fields describe the logical memref offset and are copied back into tee_param->shm_offs on return. Folding the page offset into them breaks parameter round trips when a memref is reused. They are also ignored by the OPTEE_RPC_CMD_SHM_ALLOC response path, which uses only global_id and internal_offs to construct the shared-memory mobj. Instead, start the FF-A descriptor at the 4 KiB page containing the shared buffer, the same approach as optee_fill_pages_list() in the SMC ABI. Store the remaining in-page offset in internal_offs and preserve shm_offs in offs_low/offs_high. This keeps internal_offs within the FF-A page size, maps RPC allocations at the correct address, and preserves normal memref offsets across repeated invocations. Tested on ARMv8-A with 64 KiB PAGE_SIZE. OP-TEE OS ran as a secure partition under Hafnium (SPMC) over FF-A. Verified registered shared memory with tee_shm->offset >= 4 KiB, memref reuse on the same TEEC_Operation, and RPC OPTEE_RPC_CMD_SHM_ALLOC (xtest regression 6007-6009). optee_hello_world, optee_aes, and xtest regression 1005, 1007, 1008, 4001-4003 and 6001-6003 also passed. Fixes: 4615e5a34b95 ("optee: add FF-A support") Acked-by: Liming Sun <limings@nvidia.com> Acked-by: James Hurley <jahurley@nvidia.com> Acked-by: Dave Thompson <davthompson@nvidia.com> Signed-off-by: Mahantesh Salimath <mahantesh@nvidia.com> Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Signed-off-by: Jens Wiklander <jens.wiklander@oss.qualcomm.com>
2026-10-02optee: register TEE devices only once fully initializedShao-Fu Chen
optee_probe() called tee_device_register() on both the client and the supplicant device before the rest of struct optee had been initialized. tee_device_register() calls cdev_device_add(), which does two things at once: it creates /dev/tee0 and /dev/teepriv0, and it links the device into the tee class so that class_find_device() can find it. From that moment on the device is reachable both from user space via tee_open() and from kernel space via tee_client_open_context(). The only gate in teedev_open() is tee_device_get(), which merely checks that teedev->desc is non-NULL, which was already set by tee_device_alloc(). Therefore, there is effectively no gate at all. A context opened in that window can run against a struct optee where - optee->call_queue.mutex is not initialized by optee_cq_init() - optee->supp mutex and completions is not initialized by optee_supp_init() - optee->rpmb_dev_mutex is not initialized yet, - the message argument cache is not initialized by optee_shm_arg_cache_init() - optee->ctx is still NULL Any open session or invoke during this window takes uninitialized mutexes and dereferences a NULL pointer. Fix it by moving both tee_device_register() calls down to the point where all of struct optee is set up. Fixes: 4fb0a5eb364d ("tee: add OP-TEE driver") Cc: stable@vger.kernel.org Signed-off-by: Shao-Fu Chen <shf.chen@mediatek.com> [JW: adding fixes and cc] Signed-off-by: Jens Wiklander <jens.wiklander@oss.qualcomm.com>
2026-10-02Merge branch 'for-linus' into for-nextTakashi Iwai
Pull again 7.3-devel branch for working on snd_card_free auto-clean changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-02Revert "drm/amd/display: replace STATIC_IFN_KUNIT with VISIBLE_IF_KUNIT"Alex Deucher
This reverts commit 7e9fca772695c65f97493272e2e7cd475f202965. This series breaks the build when CONFIG_KUNIT=y and CONFIG_DRM_AMD_DC_KUNIT_TEST=n. When CONFIG_KUNIT=y, the functions are not static, but when CONFIG_DRM_AMD_DC_KUNIT_TEST=n, they should be. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-02Revert "drm/amd/display: replace EXPORT_IF_KUNIT with EXPORT_SYMBOL_IF_KUNIT"Alex Deucher
This reverts commit b6b813e046e475bb3fe209d74f1df70033b5b98e. This series breaks the build when CONFIG_KUNIT=y and CONFIG_DRM_AMD_DC_KUNIT_TEST=n. When CONFIG_KUNIT=y, the functions are not static, but when CONFIG_DRM_AMD_DC_KUNIT_TEST=n, they should be. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-02Revert "drm/amd/display: drop INLINE_IFN_KUNIT"Alex Deucher
This reverts commit 5a98f454a61197761c4c5e8eed948dea2b9f5a69. This series breaks the build when CONFIG_KUNIT=y and CONFIG_DRM_AMD_DC_KUNIT_TEST=n. When CONFIG_KUNIT=y, the functions are not static, but when CONFIG_DRM_AMD_DC_KUNIT_TEST=n, they should be. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-02gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AIAbduvaliy Abdulazizov
On the Acer Nitro V 16S AI (ANV16S-41) the internal USB camera (0408:4035) works on Windows but never shows up on Linux. The firmware drives GPIO 11 of AMDI0030 high to power the camera. The same pin is listed in \_SB.GPIO._AEI as an edge-triggered, active-low wake interrupt whose _EVT case only writes a debug code. gpiolib-acpi requests _AEI pins as inputs, which clears the output enable bit, so the camera loses power during boot. After boot the pin register reads 0x00447a00 (output value 1, output enable 0, line low). With the xHCI controller kept away from Linux (pci-stub), the camera port shows CSC=1, CCS=0: the camera was connected during boot and then dropped off. Booting with gpiolib_acpi.ignore_interrupt=AMDI0030:00@11 keeps the camera powered; it enumerates and works with uvcvideo. Add a DMI quirk so this works out of the box, like the existing one for the Acer Nitro V 14 on the same pin. Closes: https://lore.kernel.org/linux-usb/CAPGafdkBb49YFV+d0rYjbi4QjifCUr1Wos6C5TZtDQzN6-pn+g@mail.gmail.com/ Assisted-by: LLM Signed-off-by: Abduvaliy Abdulazizov <abduvaliy.hbai@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2026-10-02gpu: nova-core: add KUnit tests for the interrupt treeJohn Hubbard
The vector arithmetic and the leaf and subtree sets touch no hardware, so KUnit can cover them without a GPU. A wrong leaf, bit or subtree for a vector would otherwise show up only as a lost interrupt on hardware. Add the nova_core_gin_tree suite. It checks that a leaf index stops at the widest supported tree, that a leaf count implies the right number of subtrees and vectors, that a leaf count enumerates every leaf in order, that a vector maps to the right leaf, bit and subtree, and that a vector beyond an 8-leaf tree is rejected there and accepted in a 16-leaf tree. It also exercises the subtree set operations and checks that every supported chipset implements the subtree that carries the GSP event. Assisted-by: LLM Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-15-jhubbard@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02gpu: nova-core: service GSP events from the SWGEN0 interruptJohn Hubbard
The GSP posts each message for the CPU to the GSP-to-CPU queue and then raises SWGEN0, a software-generated interrupt cause of its falcon. GIN delivers SWGEN0 to the CPU on vector 155. A thread waiting for a command reply was the only reader of the queue, so an event posted between commands stayed unread until the next command was sent. Register a threaded handler on the GSP vector. Draining the queue takes the command-queue mutex, which can sleep, so the top half reads and writes only registers and wakes the IRQ thread to drain the queue. Every existing read of the queue asks for one message type and waits on a deadline, so add a drain that logs and consumes whatever the GSP has already posted and returns at once. When a falcon cause other than SWGEN0 stays set after its latch is cleared, as the Blackwell fault-containment and ECC causes do, disable the GSP vector rather than retrigger the falcon. A retrigger would re-emit the cause at once, and the CPU would take the same interrupt again and again. Assisted-by: LLM Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-14-jhubbard@nvidia.com [acourbot: trim comment leaking unneeded implementation details.] [acourbot: make Subtree crate-visible here instead of in earlier patch.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02gpu: nova-core: add the falcon interrupt registers and HAL methodsJohn Hubbard
A falcon latches each interrupt cause that is raised in its IRQSTAT register. On a RISC-V falcon, each cause is routed either to the host, meaning the CPU, or to the falcon's own core, and two routing registers hold that routing. The falcon signals the interrupt tree only when its set of host-routed causes goes from empty to non-empty, so a handler that clears the tree leaf while a cause is still latched has to write INTR_RETRIGGER, which makes the falcon re-emit its causes. Turing falcons have no INTR_RETRIGGER, and the routing registers have different offsets from GA102 on. Add IRQSTAT, INTR_RETRIGGER, and the two routing registers, the last at both sets of offsets, and add two falcon HAL methods: one intersects an IRQSTAT value with the routing registers, and one retriggers the falcon, or does nothing on Turing. GA100 keeps the Turing HAL, as it does for boot, and the retrigger register is a property of that HAL's instance. The two methods have no user yet. Assisted-by: LLM Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-13-jhubbard@nvidia.com [acourbot: remove implementation-specific comments on interface doc.] [acourbot: make constructor take boolean instead of having two methods.] [acourbot: add NVIDIA copyright headers to modified files.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02gpu: nova-core: bound a GSP wait by a single deadlineJohn Hubbard
The GSP posts unsolicited events on the same queue as command replies, so a caller waiting for one message consumes whatever arrives first and reads again. Every read started a fresh five-second timeout, so a steady stream of events extended the wait without bound. The two boot-time waits for an unsolicited event also released the queue mutex between reads, so a command sent from another thread could consume the event and leave the waiter to time out. Compute one deadline when the wait begins and pass the time remaining to each read, and hold the queue mutex across the whole wait. Put the loop in one helper that the command reply wait and both boot-time event waits share. Assisted-by: LLM Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-12-jhubbard@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02gpu: nova-core: return ENOMSG for an unmatched GSP messageJohn Hubbard
The GSP posts unsolicited events on the same queue as command replies, so a receive that asks for one message type has to report that the message at the queue head was a different one. That case returned ERANGE, which means a value outside a valid range and says nothing about a message. Return ENOMSG, no message of the desired type, instead. Suggested-by: Gary Guo <gary@garyguo.net> Suggested-by: Alexandre Courbot <acourbot@nvidia.com> Assisted-by: LLM Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-11-jhubbard@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02gpu: nova-core: log GSP events instead of discarding themJohn Hubbard
The GSP posts unsolicited messages on the same queue that carries command replies: log records, OS error and robust-channel records, and lifecycle notices. nova-core discarded every message that was not the reply that a caller was waiting for, and an unrecognized function code aborted the in-flight command. The GSP's error reports never reached the kernel log. Log every non-reply message according to its function code, on the receive path that already reads it, and leave the in-flight command waiting for its reply. Event payloads, such as XID numbers and log contents, are not decoded. Assisted-by: LLM Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-10-jhubbard@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02gpu: nova-core: add an interrupt delivery self-testJohn Hubbard
A GPU interrupt can be lost in the MSI or MSI-X allocation, in the GIN tree's enables, or in the rearm, and every one of those failures looks the same: no interrupt arrives, and no register or log line says which one broke. Add a probe-time self-test, built under NOVA_CORE_SELFTESTS, that latches the CPU doorbell vector through the GIN software trigger and waits for a registered handler to service it. One delivery would pass with a broken rearm, because the first message-signaled interrupt arrives whether or not the driver rearms, so the test triggers twice and waits for the first handler to finish before the second trigger. It runs after GFW boot and before GSP boot, on a quiesced tree, and fails probe unless both deliveries arrive, each finds only the doorbell pending, and the leaf ends clear. The doorbell has the same vector on every supported GPU, so the test names it without asking GSP-RM. It allocates the PCI vectors for the doorbell's subtree and releases them before returning, so under MSI-X the delivery also exercises that subtree's table entry. Assisted-by: LLM Co-developed-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-9-jhubbard@nvidia.com [acourbot: move relevant bits of previous patch into this one.] [acourbot: remove reference to self-test section of documentation.] [acourbot: replace completions with atomic polling code.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02tee: shm: reject zero-sized allocations in tee_dyn_shm_alloc_helper()Georgiy Osokin
tee_dyn_shm_alloc_helper() derives nr_pages from a caller-supplied size and passes it to alloc_pages_exact() without checking it. For size == 0 nr_pages is 0, and alloc_pages_exact(0) calls get_order(0), which is documented as undefined and returns BITS_PER_LONG - PAGE_SHIFT. The page allocator then trips its order > MAX_PAGE_ORDER warning and fails the allocation; on a panic_on_warn kernel that ends the boot. This can be triggered by TEE_IOC_SHM_ALLOC with struct tee_ioctl_shm_alloc_data where size is 0. Reject a zero page count, as register_shm_helper() already does for the register path. Fixes: cf4441503e20 ("tee: optee: Move pool_op helper functions") Cc: stable@vger.kernel.org Cc: lvc-project@linuxtesting.org Signed-off-by: Georgiy Osokin <g.osokin@auroraos.dev> Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Signed-off-by: Jens Wiklander <jens.wiklander@oss.qualcomm.com>
2026-10-02gpu: nova-core: move wait for GFW boot code to associated functionJohn Hubbard
The GPU boots its own firmware, GFW, out of reset, and the driver must not program the GPU until GFW reports completion. nova-core waited for GFW inside the Gpu constructor, which also boots the GSP. Code that has to run after GFW and before GSP boot, such as a probe-time hardware self-test, had nowhere to go. Move the wait code into an associated function so it can also be called by test code that requires it before the Gpu instance is constructed. Suggested-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/all/DLSNXUU1UXIH.JG4L0L5ZFV89@kernel.org/ Assisted-by: LLM Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-8-jhubbard@nvidia.com [acourbot: move code to associated function, move relevant hunks to next patch.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02gpu: nova-core: add the GIN interrupt tree and allocate its vectorsJoel Fernandes
Servicing a GIN leaf has a required order: read its pending bits, then clear them. Clearing a leaf first discards every vector latched in it, and the hardware keeps no record of what was discarded. The interrupt never arrives, and no register shows that it was ever pending. Every subtree enabled at TOP also needs an allocated PCI vector with a handler registered on it. Under MSI-X each subtree has its own table entry. Linux masks every entry until a driver requests its IRQ, and a masked entry sends no message. An enabled subtree whose entry was never requested raises interrupts that never reach a handler, while the leaf and TOP registers show them pending and enabled. Under MSI the whole tree raises a single message, so one entry serves every subtree. Add the CPU interrupt tree of one PCIe function. The tree allocates the PCI vectors for the subtrees that it services and hands out the request for each, so that the chipset is given once and the vectors live as long as the tree. Reading a leaf yields the handle that clears it, so that the wrong order does not compile. Building a tree fails if it names a subtree that the GPU does not implement. A reset disables every vector, clears every pending bit, rearms delivery, and leaves the serviced subtrees disabled at TOP, so that a handler registered afterwards receives no interrupt left over from boot. Request MSI-X entries 0 through the highest serviced subtree, since an MSI-X allocation cannot be sparse, and fall back to a single MSI message, never to INTx. [jhubbard: reworked on top of the GIN vector types: a leaf read yields the handle that clears it, enables are guarded, the leaf count and the rearm come from the interrupt HAL, the drain reads every implemented leaf rather than descending from TOP, the tree owns its PCI vectors, and a reset returns the tree to a known state before a handler is registered] Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: Will Pierce <wpierce@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-7-jhubbard@nvidia.com [acourbot: keep item that doesn't need to be exported private.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02gpu: nova-core: add the per-architecture GIN CPU interrupt HALJohn Hubbard
The GIN CPU interrupt tree differs by GPU family in two ways: * The size of the tree. Turing, Ampere and Ada implement 8 leaves. Hopper and later families implement 16. * The write that rearms delivery. A message-signaled interrupt is delivered once per edge, and the PCI side delivers nothing more until the CPU rearms it. Before Hopper, MSI rearms by writing the end-of-interrupt register in the BAR0 mirror of PCI configuration space. On Hopper and later, MSI rearms by clearing and then setting the TOP enables of every serviced subtree, which produces a new edge. MSI-X rearms the same way on every family, but for the handler's own subtree only, since each subtree has its own table entry. Add an interrupt HAL that provides the leaf count and performs the rearm for each family. Name the interrupt type with two variants, MSI and MSI-X, since nova-core never allocates the level-triggered INTx that the kernel's PCI interrupt type also names. The HAL has no user yet. Assisted-by: LLM Signed-off-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: Will Pierce <wpierce@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-6-jhubbard@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02gpu: nova-core: add the GIN CPU interrupt tree and MSI EOI registersJohn Hubbard
GIN is the GPU's interrupt controller. It latches each interrupt source in a two-level tree of LEAF registers summarized by TOP, and raises the PCI interrupt when an enabled vector in an enabled subtree becomes pending. A message-signaled interrupt is delivered once per edge, and pre-Hopper MSI rearms delivery by writing the end-of-interrupt register in the BAR0 mirror of PCI configuration space. Add the CPU tree registers that receiving GSP interrupts and running the software-triggered self-test need: the leaf pending and enable arrays, the TOP enables, and the leaf trigger. Add the end-of-interrupt register, NV_XVE_CYA_2, alongside them. Use the NV_VIRTUAL_FUNCTION_PRIV_CPU_INTR_* names on every chipset. The pre-Hopper headers call the same tree NV_CTRL, but each function reaches its own tree through this aperture on both families. Declare the leaf arrays at 16 entries, the widest tree that any supported chipset implements. Leave the read-only TOP summary undeclared. A vector that latched while disabled does not appear in TOP, so nova-core never descends from it and reads every implemented leaf instead. Declare each leaf field as a set of vectors within one leaf and each TOP field as a set of subtrees, so that a set of subtrees cannot be written to a leaf register, nor the reverse. The trigger register's vector field is 12 bits wide, wider than any GIN vector, so a vector converts into it infallibly. Assisted-by: LLM Signed-off-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: Will Pierce <wpierce@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-5-jhubbard@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02gpu: nova-core: add the GIN vector, leaf and subtree typesJohn Hubbard
GIN, the GPU Interrupt and Notification unit, is the GPU's interrupt controller. Each interrupt source has a GIN vector number, and the controller latches a pending vector in a two-level tree: one bit of a LEAF register, summarized two leaves at a time by one bit of the TOP register. A vector's number fixes its position in that tree: leaf = vector / 32 bit = vector % 32 subtree = leaf / 2 A tree implements either 8 or 16 leaves, depending on the GPU family. The leaf count sets both the number of subtrees and the highest vector that the tree carries. Without distinct types, a vector, a leaf index, a set of vectors within one leaf, a subtree and a set of subtrees are all plain integers. A caller can pass one where another belongs, and a register field can accept the wrong one. Add a type for each of those, and for the leaf count. A vector converts to its own leaf, bit and subtree. Its constructor rejects, at build time, a number beyond the widest supported tree, and a validation method rejects, at run time, a number beyond the leaves that the current tree implements. A leaf count yields the set of subtrees that it implements. The module has no user yet. Suggested-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: John Hubbard <jhubbard@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260930034148.590687-4-jhubbard@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-10-02slimbus: qcom-ngd-ctrl: Implement disable_stream callbackViken Dadhaniya
Switching a channel to a new frequency without first disabling the stream causes the channel to be re-enabled without a clean shutdown, leading to a crash on the DSP subsystem. Implement qcom_slim_ngd_disable_stream() so clients can properly close a channel before switching to a new frequency. Acked-by: Mukesh Savaliya <mukesh.savaliya@oss.qualcomm.com> Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101506.1084743-5-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-02slimbus: qcom-ngd-ctrl: Remove redundant dev_err_probe()Pan Chuang
Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in devm_request_*_irq()"), devm_request_irq() automatically logs detailed error messages on failure. Remove the now-redundant driver-specific dev_err_probe() calls. Signed-off-by: Pan Chuang <panchuang@vivo.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101506.1084743-4-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-02slimbus: qcom-ngd-ctrl: use platform_device_set_fwnode()Bartosz Golaszewski
Prefer the higher-level platform_device_set_fwnode() over the OF-specific platform_device_set_of_node() for dynamically allocated platform devices. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101506.1084743-3-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-02slimbus: fix typos in commentsHemanth Selam
Fix typos in comments, reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes. Assisted-by: Cursor:claude-opus-5 Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101506.1084743-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-02nvmem: protect nvmem_device::ops with SRCUBartosz Golaszewski
With the provider-owned data split out into a separate 'ops' structure, we can now protect it with SRCU. Protect all dereferences of nvmem->ops with an SRCU read lock. Synchronize SRCU in nvmem_unregister() after setting the implementation pointer to NULL. This has the effect of numbing down the device after nvmem_unregister() returns - it will no longer accept any consumer calls and return -ENODEV. The actual device will live on for as long as there are references to it but we will no longer reach into the consumer's memory which may be gone by this time. Nvmem cell entries are destroyed in .release() now as they may be still dereferenced via the nvmem_cell handles after nvmem_release(). The actual calls will still go through SRCU and fail with -ENODEV if the provider is gone. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Tested-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Link: https://patch.msgid.link/20261002101352.1084447-10-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-02nvmem: remove duplicated reference countingBartosz Golaszewski
Commit c1de7f43bd84 ("nvmem: use kref") introduced reference counting with kref to an already reference counted nvmem_device structure. We only need one refcount so use the one provded by device's kobject and drop the kref field from struct nvmem_device. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101352.1084447-9-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-02nvmem: add mt6323 PMIC EFUSE driverRoman Vivchar
Add support for the EFUSE controller found in the Mediatek MT6323 PMIC. The MT6323 EFUSE stores 24 bytes of hardware-related data, such as thermal sensor calibration values. Tested-by: Ben Grisdale <bengris32@protonmail.ch> # Amazon Echo Dot (2nd Generation) Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Roman Vivchar <rva333@protonmail.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101352.1084447-8-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-02nvmem: layouts: Support fixed-layout as the nvmem device node itselfLoic Poulain
of_nvmem_layout_get_container() only looks for a child node named "nvmem-layout" to locate the cell definitions. This does not cover providers whose device tree node is itself the fixed-layout container, such as an eMMC boot partition block device whose fwnode points directly at a "fixed-layout" compatible partitions node. When no "nvmem-layout" child is present, fall back to returning the nvmem device node itself if it is compatible with "fixed-layout", so that its cells are parsed by nvmem_add_cells_from_fixed_layout(). Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101352.1084447-6-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-02nvmem: core: Add const to pattrs allocation typeKees Cook
In preparation for making the devm_kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "const struct bin_attribute **", but the converted allocation type would be "struct bin_attribute **", which is the same type without the const qualifier. As there is no general way to safely add const qualifiers, take the size from the assignment target instead. No change in allocation size results. Build tested ARCH=x86_64 allmodconfig with GCC 16.2.0: drivers/nvmem/core.o Assisted-by: LLM coccinelle Signed-off-by: Kees Cook <kees+treewide@kernel.org> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101352.1084447-5-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-02nvmem: uniphier-efuse: Enable for K3 SoCsJudith Mendez
Add ARCH_K3 dependency and set to always build for K3 architecture. The uniphier-efuse driver must be builtin to support early probe of k3-socinfo during boot. The k3-socinfo driver requires the efuse provider for reading silicon revision information on AM62p device. Signed-off-by: Judith Mendez <jm@ti.com> Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101352.1084447-4-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>