id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
f30cb6429f750ad7225214072d8d13b9e3a851dc
Analyze and fix the following issue in the Linux kernel code: KVM: TDX: Handle EXCEPTION_NMI and EXTERNAL_INTERRUPT
Problem Details: Handle EXCEPTION_NMI and EXTERNAL_INTERRUPT exits for TDX. NMI Handling: Just like the VMX case, NMI remains blocked after exiting from TDX guest for NMI-induced exits [*]. Handle NMI-induced exits for TDX guests in the same way as they are handled for VMX guests, i.e., handle NMI in tdx_vcpu_enter_e...
```diff diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c index a74895775593..11f8f1077e15 100644 --- a/arch/x86/kvm/vmx/tdx.c +++ b/arch/x86/kvm/vmx/tdx.c @@ -882,6 +882,8 @@ static noinstr void tdx_vcpu_enter_exit(struct kvm_vcpu *vcpu) tdx->exit_gpa = tdx->vp_enter_args.r8; vt->exit_intr_info = tdx->v...
da407fe4590878754c790ec22d89398651790856
Analyze and fix the following issue in the Linux kernel code: KVM: TDX: Handle EPT violation/misconfig exit
Problem Details: For TDX, on EPT violation, call common __vmx_handle_ept_violation() to trigger x86 MMU code; on EPT misconfiguration, bug the VM since it shouldn't happen. EPT violation due to instruction fetch should never be triggered from shared memory in TDX guest. If such EPT violation occurs, treat it as broke...
```diff diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c index 8b00639680dc..fb2ca11c6fda 100644 --- a/arch/x86/kvm/vmx/tdx.c +++ b/arch/x86/kvm/vmx/tdx.c @@ -859,6 +859,12 @@ static __always_inline u32 tdx_to_vmx_exit_reason(struct kvm_vcpu *vcpu) return EXIT_REASON_VMCALL; return tdcall_to_vmx_ex...
f65916ae2d734b48f6ef616eceeb790a1c239457
Analyze and fix the following issue in the Linux kernel code: KVM: TDX: Force APICv active for TDX guest
Problem Details: Force APICv active for TDX guests in KVM because APICv is always enabled by TDX module. From the view of KVM, whether APICv state is active or not is decided by: 1. APIC is hw enabled 2. VM and vCPU have no inhibit reasons set. After TDX vCPU init, APIC is set to x2APIC mode. KVM_SET_{SREGS,SREGS2} a...
```diff diff --git a/arch/x86/kvm/vmx/main.c b/arch/x86/kvm/vmx/main.c index 0be6abc77f4c..66545d5b009d 100644 --- a/arch/x86/kvm/vmx/main.c +++ b/arch/x86/kvm/vmx/main.c @@ -437,6 +437,16 @@ static void vt_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason, vmx_get_exit_info(vcpu, reason, info1, info2, intr_info, erro...
bb723bebde1eee606ab0bd56bbc9aafda96d3801
Analyze and fix the following issue in the Linux kernel code: KVM: TDX: Handle TDX PV MMIO hypercall
Problem Details: Handle TDX PV MMIO hypercall when TDX guest calls TDVMCALL with the leaf #VE.RequestMMIO (same value as EXIT_REASON_EPT_VIOLATION) according to TDX Guest Host Communication Interface (GHCI) spec. For TDX guests, VMM is not allowed to access vCPU registers and the private memory, and the code instructi...
```diff diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c index ac37d714bf02..35f28e165417 100644 --- a/arch/x86/kvm/vmx/tdx.c +++ b/arch/x86/kvm/vmx/tdx.c @@ -810,6 +810,8 @@ static __always_inline u32 tdcall_to_vmx_exit_reason(struct kvm_vcpu *vcpu) switch (tdvmcall_leaf(vcpu)) { case EXIT_REASON_IO_IN...
095b71a03f4905982953625edd9a1ad16682cfb7
Analyze and fix the following issue in the Linux kernel code: KVM: TDX: Add a place holder to handle TDX VM exit
Problem Details: Introduce the wiring for handling TDX VM exits by implementing the callbacks .get_exit_info(), .get_entry_info(), and .handle_exit(). Additionally, add error handling during the TDX VM exit flow, and add a place holder to handle various exit reasons. Store VMX exit reason and exit qualification in str...
```diff diff --git a/arch/x86/include/asm/tdx.h b/arch/x86/include/asm/tdx.h index bb4a3bc26219..6d74f4d8c573 100644 --- a/arch/x86/include/asm/tdx.h +++ b/arch/x86/include/asm/tdx.h @@ -19,6 +19,7 @@ * TDX module. */ #define TDX_ERROR _BITUL(63) +#define TDX_NON_RECOVERABLE _BITUL(62) #define TDX_SW_ERROR (...
eac0b72fae3936028feb0f5f44af9dc850ca0133
Analyze and fix the following issue in the Linux kernel code: KVM: TDX: Handle SEPT zap error due to page add error in premap
Problem Details: Move the handling of SEPT zap errors caused by unsuccessful execution of tdh_mem_page_add() in KVM_TDX_INIT_MEM_REGION from tdx_sept_drop_private_spte() to tdx_sept_zap_private_spte(). Introduce a new helper function tdx_is_sept_zap_err_due_to_premap() to detect this specific error. During the IOCTL K...
```diff diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c index 314387728e82..277f5decde9c 100644 --- a/arch/x86/kvm/vmx/tdx.c +++ b/arch/x86/kvm/vmx/tdx.c @@ -780,20 +780,6 @@ static int tdx_sept_drop_private_spte(struct kvm *kvm, gfn_t gfn, &level_state); } while (unlikely(tdx_operand_busy(err)))...
fbb4adadea55e68f0f9ebde83b069552b7a67fe1
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Make cpu_dirty_log_size a per-VM value
Problem Details: Make cpu_dirty_log_size (CPU's dirty log buffer size) a per-VM value and set the per-VM cpu_dirty_log_size only for normal VMs when PML is enabled. Do not set it for TDs. Until now, cpu_dirty_log_size was a system-wide value that is used for all VMs and is set to the PML buffer size when PML was enabl...
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 6800d3956ab1..ddb08581c64d 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -1562,6 +1562,13 @@ struct kvm_arch { struct kvm_mmu_memory_cache split_desc_cache; gfn_t gfn_direct_bits; +...
488808e682e72bdb15a579d61f5b90ece92ba83c
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Introduce KVM_TDX_GET_CPUID
Problem Details: Implement an IOCTL to allow userspace to read the CPUID bit values for a configured TD. The TDX module doesn't provide the ability to set all CPUID bits. Instead some are configured indirectly, or have fixed values. But it does allow for the final resulting CPUID bits to be read. This information will...
```diff diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include/uapi/asm/kvm.h index 9316afbd4a88..cd55484e3f0c 100644 --- a/arch/x86/include/uapi/asm/kvm.h +++ b/arch/x86/include/uapi/asm/kvm.h @@ -932,6 +932,7 @@ enum kvm_tdx_cmd_id { KVM_TDX_CAPABILITIES = 0, KVM_TDX_INIT_VM, KVM_TDX_INIT_VCPU, + KVM_T...
a50f673f25e0ba2b594d94efe235f4eb57d0e784
Analyze and fix the following issue in the Linux kernel code: KVM: TDX: Do TDX specific vcpu initialization
Problem Details: TD guest vcpu needs TDX specific initialization before running. Repurpose KVM_MEMORY_ENCRYPT_OP to vcpu-scope, add a new sub-command KVM_TDX_INIT_VCPU, and implement the callback for it. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Isaku Yamahata <isaku.yamahata...
```diff diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h index e6cb89ced1fd..aae4193f80e3 100644 --- a/arch/x86/include/asm/kvm-x86-ops.h +++ b/arch/x86/include/asm/kvm-x86-ops.h @@ -127,6 +127,7 @@ KVM_X86_OP(enable_smi_window) #endif KVM_X86_OP_OPTIONAL(dev_get_attr) KVM_X86_OP(...
8d032b683c299302aa8b5fbce17b9b87a138a5f5
Analyze and fix the following issue in the Linux kernel code: KVM: TDX: create/destroy VM structure
Problem Details: Implement managing the TDX private KeyID to implement, create, destroy and free for a TDX guest. When creating at TDX guest, assign a TDX private KeyID for the TDX guest for memory encryption, and allocate pages for the guest. These are used for the Trust Domain Root (TDR) and Trust Domain Control Str...
```diff diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h index 1eca04087cf4..e6cb89ced1fd 100644 --- a/arch/x86/include/asm/kvm-x86-ops.h +++ b/arch/x86/include/asm/kvm-x86-ops.h @@ -21,6 +21,7 @@ KVM_X86_OP(has_emulated_msr) KVM_X86_OP(vcpu_after_set_cpuid) KVM_X86_OP(vm_init) KV...
74c1807f6c4feddb3c3cb1056c54531d4adbaea6
Analyze and fix the following issue in the Linux kernel code: KVM: x86: block KVM_CAP_SYNC_REGS if guest state is protected
Problem Details: KVM_CAP_SYNC_REGS does not make sense for VMs with protected guest state, since the register values cannot actually be written. Return 0 when using the VM-level KVM_CHECK_EXTENSION ioctl, and accordingly return -EINVAL from KVM_RUN if the valid/dirty fields are nonzero. However, on exit from KVM_RUN ...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 053547fc6f89..eceb97734646 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4580,6 +4580,11 @@ static bool kvm_is_vm_type_supported(unsigned long type) return type < 32 && (kvm_caps.supported_vm_types & BIT(type)); } +static inline u32 ...
a5951389e58d2e816eed3dbec5877de9327fd881
Analyze and fix the following issue in the Linux kernel code: arm64: errata: Add newer ARM cores to the spectre_bhb_loop_affected() lists
Problem Details: When comparing to the ARM list [1], it appears that several ARM cores were missing from the lists in spectre_bhb_loop_affected(). Add them. NOTE: for some of these cores it may not matter since other ways of clearing the BHB may be used (like the CLRBHB instruction or ECBHB), but it still seems good t...
```diff diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c index 89405be53d8f..0f51fd10b4b0 100644 --- a/arch/arm64/kernel/proton-pack.c +++ b/arch/arm64/kernel/proton-pack.c @@ -876,6 +876,14 @@ static u8 spectre_bhb_loop_affected(void) { u8 k = 0; + static const struct midr_range spec...
a9b5bd81b294d30a747edd125e9f6aef2def7c79
Analyze and fix the following issue in the Linux kernel code: arm64: cputype: Add MIDR_CORTEX_A76AE
Problem Details: >From the TRM, MIDR_CORTEX_A76AE has a partnum of 0xDOE and an implementor of 0x41 (ARM). Add the values. Cc: stable@vger.kernel.org # dependency of the next fix in the series Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20250107120555.v4.4.I151f3b7ee323bcc30...
```diff diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h index 6f3f4142e214..40d310cb2da9 100644 --- a/arch/arm64/include/asm/cputype.h +++ b/arch/arm64/include/asm/cputype.h @@ -75,6 +75,7 @@ #define ARM_CPU_PART_CORTEX_A76 0xD0B #define ARM_CPU_PART_NEOVERSE_N1 0xD0C #define ARM_CP...
0c9fc6e652cd5aed48c5f700c32b7642bea7f453
Analyze and fix the following issue in the Linux kernel code: arm64: errata: Add KRYO 2XX/3XX/4XX silver cores to Spectre BHB safe list
Problem Details: Qualcomm has confirmed that, much like Cortex A53 and A55, KRYO 2XX/3XX/4XX silver cores are unaffected by Spectre BHB. Add them to the safe list. Fixes: 558c303c9734 ("arm64: Mitigate spectre style branch history side channels") Cc: stable@vger.kernel.org Cc: Scott Bauer <sbauer@quicinc.com> Signed-o...
```diff diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c index 17aa836fe46d..89405be53d8f 100644 --- a/arch/arm64/kernel/proton-pack.c +++ b/arch/arm64/kernel/proton-pack.c @@ -854,6 +854,9 @@ static bool is_spectre_bhb_safe(int scope) MIDR_ALL_VERSIONS(MIDR_CORTEX_A510), MIDR_ALL_VE...
e403e8538359d8580cbee1976ff71813e947101e
Analyze and fix the following issue in the Linux kernel code: arm64: errata: Assume that unknown CPUs _are_ vulnerable to Spectre BHB
Problem Details: The code for detecting CPUs that are vulnerable to Spectre BHB was based on a hardcoded list of CPU IDs that were known to be affected. Unfortunately, the list mostly only contained the IDs of standard ARM cores. The IDs for many cores that are minor variants of the standard ARM cores (like many Qualco...
```diff diff --git a/arch/arm64/include/asm/spectre.h b/arch/arm64/include/asm/spectre.h index 0c4d9045c31f..f1524cdeacf1 100644 --- a/arch/arm64/include/asm/spectre.h +++ b/arch/arm64/include/asm/spectre.h @@ -97,7 +97,6 @@ enum mitigation_state arm64_get_meltdown_state(void); enum mitigation_state arm64_get_spectr...
ed1ce841245d8febe3badf51c57e81c3619d0a1d
Analyze and fix the following issue in the Linux kernel code: arm64: errata: Add QCOM_KRYO_4XX_GOLD to the spectre_bhb_k24_list
Problem Details: Qualcomm Kryo 400-series Gold cores have a derivative of an ARM Cortex A76 in them. Since A76 needs Spectre mitigation via looping then the Kyro 400-series Gold cores also need Spectre mitigation via looping. Qualcomm has confirmed that the proper "k" value for Kryo 400-series Gold cores is 24. Fixes...
```diff diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c index da53722f95d4..e149efadff20 100644 --- a/arch/arm64/kernel/proton-pack.c +++ b/arch/arm64/kernel/proton-pack.c @@ -866,6 +866,7 @@ u8 spectre_bhb_loop_affected(int scope) MIDR_ALL_VERSIONS(MIDR_CORTEX_A76), MIDR_ALL_VERS...
2fdbf2ff388441476aae5d914a04c47b247b5e7b
Analyze and fix the following issue in the Linux kernel code: arm64/sysreg: Enforce whole word match for open/close tokens
Problem Details: Opening and closing tokens can also match on words with common prefixes like "Endsysreg" vs "EndsysregFields". This could potentially make the script go wrong in weird ways so make it fall through to the fatal unhandled statement catcher if it doesn't fully match the current block. Closing ones also g...
```diff diff --git a/arch/arm64/tools/gen-sysreg.awk b/arch/arm64/tools/gen-sysreg.awk index 1a2afc9fdd42..f2a1732cb1f6 100755 --- a/arch/arm64/tools/gen-sysreg.awk +++ b/arch/arm64/tools/gen-sysreg.awk @@ -111,7 +111,7 @@ END { /^$/ { next } /^[\t ]*#/ { next } -/^SysregFields/ && block_current() == "Root" { +$1 =...
00cb1e01cd29c664dcd22cabc25be410e2c7faa7
Analyze and fix the following issue in the Linux kernel code: arm64/sysreg: Fix unbalanced closing block
Problem Details: This is a sysreg block so close it with one. This doesn't make a difference to the output because the script only matches on the beginning of the word to close blocks which is correct by coincidence here. Signed-off-by: James Clark <james.clark@linaro.org> Reviewed-by: Anshuman Khandual <anshuman.khan...
```diff diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index 891fe033e1b6..10809047fc87 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -2076,7 +2076,7 @@ EndEnum Res0 4:2 Field 1 ExTRE Field 0 E0TRE -EndSysregFields +EndSysreg Sysreg SMPRI_EL1 3 0 1 2 4 Res0 63:4 ```
02ba09c8ab9406f30c5c63b7cfd4b300c3c2c32c
Analyze and fix the following issue in the Linux kernel code: perf test stat_all_pmu.sh: Correctly check 'perf stat' result
Problem Details: Test case "stat_all_pmu.sh" is not correctly checking 'perf stat' output due to a poor design. Firstly, having the 'set -e' option with a trap catching the sigexit causes the shell to exit immediately if 'perf stat' ends with any non-zero value, which is then caught by the trap reporting an unexpected ...
```diff diff --git a/tools/perf/tests/shell/stat_all_pmu.sh b/tools/perf/tests/shell/stat_all_pmu.sh index 8b148b300be1..9c466c0efa85 100755 --- a/tools/perf/tests/shell/stat_all_pmu.sh +++ b/tools/perf/tests/shell/stat_all_pmu.sh @@ -2,7 +2,6 @@ # perf all PMU test (exclusive) # SPDX-License-Identifier: GPL-2.0 -s...
58fcd0b72955d795fb68a93a6a1e6c55d77af13e
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amd/seattle: Drop undocumented "spi-controller" properties
Problem Details: "spi-controller" is not a documented property nor used anywhere, so drop it. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250306-dt-amd-fixes-v1-4-011c423ba99a@kernel.org Signed-off-by: Arnd Bergm...
```diff diff --git a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi index aa7fe884a458..a611f8288b3e 100644 --- a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi +++ b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi @@ -121,7 +121,6 @@ status = "disabled"; compatible = "ar...
6268ac369b594af0309f14ff75743d7d64fae467
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amd/seattle: Fix bus, mmc, and ethernet node names
Problem Details: Use preferred node names for bus, mmc, and ethernet. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250306-dt-amd-fixes-v1-3-011c423ba99a@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
```diff diff --git a/arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dts b/arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dts index 7c82d90e940d..8862adae44e9 100644 --- a/arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dts +++ b/arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dts @@ -58,7 +58,7 @@ &spi1 { status = "okay"; -...
8945ed5c8e692ba454de90f1729e09b18284eac2
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amd/seattle: Move and simplify fixed clocks
Problem Details: The fixed clocks are not part of "simple-bus", so move them out of the bus to the top-level. In the process, use the preferred node names of "clock-<freq>". There's also little reason to have multiple fixed clocks at the same frequencies, so remove them keeping the labels to minimize the change. Signe...
```diff diff --git a/arch/arm64/boot/dts/amd/amd-seattle-clks.dtsi b/arch/arm64/boot/dts/amd/amd-seattle-clks.dtsi index 2dd2c28171ee..73f687773ce6 100644 --- a/arch/arm64/boot/dts/amd/amd-seattle-clks.dtsi +++ b/arch/arm64/boot/dts/amd/amd-seattle-clks.dtsi @@ -5,51 +5,39 @@ * Copyright (C) 2014 Advanced Micro Devic...
bae2bdde4211d2cc6f17b8af9b5e09a3ca0f443a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amd/seattle: Base Overdrive B1 on top of B0 version
Problem Details: AMD Overdrive B1 version is just more peripherals enabled over B0 version. Rework the B1 .dts to use the B0 .dts. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250306-dt-amd-fixes-v1-1-011c423ba99a@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
```diff diff --git a/arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dts b/arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dts index 58e2b0a6f841..b34dd8d5d1b1 100644 --- a/arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dts +++ b/arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dts @@ -8,32 +8,10 @@ /dts-v1/; -/include/ "amd-...
45d5fe1c53baaed1fb3043f45d1e15ebb4bbe86a
Analyze and fix the following issue in the Linux kernel code: ARM: davinci: da850: fix selecting ARCH_DAVINCI_DA8XX
Problem Details: Chips in the DA850 family need to have ARCH_DAVINCI_DA8XX to be selected in order to enable some peripheral drivers. This was accidentally removed in a previous commit. Fixes: dec85a95167a ("ARM: davinci: clean up platform support") Signed-off-by: David Lechner <dlechner@baylibre.com> Acked-by: Barto...
```diff diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 2a8a9fe46586..3fa15f342240 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -27,6 +27,7 @@ config ARCH_DAVINCI_DA830 config ARCH_DAVINCI_DA850 bool "DA850/OMAP-L138/AM18x based system" + select...
262666c04be6afa8f15b6c318596b54c37499cda
Analyze and fix the following issue in the Linux kernel code: soc: hisilicon: kunpeng_hccs: Fix incorrect string assembly
Problem Details: String assembly should use sysfs_emit_at() instead of sysfs_emit(). Fixes: 23fe8112a231 ("soc: hisilicon: kunpeng_hccs: Add used HCCS types sysfs") Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Huisong Li <lihuisong@huawei.com> Link: https://lore.kernel.org/r/2025031410014...
```diff diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c index 8aa8dec14911..444a8f59b7da 100644 --- a/drivers/soc/hisilicon/kunpeng_hccs.c +++ b/drivers/soc/hisilicon/kunpeng_hccs.c @@ -1539,8 +1539,8 @@ static ssize_t used_types_show(struct kobject *kobj, u16 i; for (i = ...
b49e37de8e70bc433b526a9f4382f72b7ac6492e
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e80100-crd: Drop duplicate DMIC supplies
Problem Details: The WCD938x codec provides two controls for each of the MIC_BIASn outputs: - "MIC BIASn" enables an internal regulator to generate the output with a configurable voltage (qcom,micbiasN-microvolt). - "VA MIC BIASn" enables "pull-up mode" that bypasses the internal regulator and directly output...
```diff diff --git a/arch/arm64/boot/dts/qcom/x1-crd.dtsi b/arch/arm64/boot/dts/qcom/x1-crd.dtsi index 9e587dc57532..5ea7b30983d9 100644 --- a/arch/arm64/boot/dts/qcom/x1-crd.dtsi +++ b/arch/arm64/boot/dts/qcom/x1-crd.dtsi @@ -217,10 +217,6 @@ "VA DMIC1", "MIC BIAS3", "VA DMIC2", "MIC BIAS1", "VA DMIC3",...
a2e617f4e6981aa514a569e927f90b0d39bb31b2
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc8280xp-x13s: Drop duplicate DMIC supplies
Problem Details: The WCD938x codec provides two controls for each of the MIC_BIASn outputs: - "MIC BIASn" enables an internal regulator to generate the output with a configurable voltage (qcom,micbiasN-microvolt). - "VA MIC BIASn" enables "pull-up mode" that bypasses the internal regulator and directly output...
```diff diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index 6ddb954a04fd..3053e17731fe 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -1202,...
515551e65635b988f2afa9e8683a6b57d6cfba36
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm8750: Correct clocks property for uart14 node
Problem Details: Correct the clocks property for the uart14 node to fix UART functionality on QUP2_SE6. The current failure is due to an incorrect clocks assignment. Change the clocks property to GCC_QUPV3_WRAP2_S6_CLK to resolve the issue. Signed-off-by: Jyothi Kumar Seerapu <quic_jseerapu@quicinc.com> Reviewed-by: ...
```diff diff --git a/arch/arm64/boot/dts/qcom/sm8750.dtsi b/arch/arm64/boot/dts/qcom/sm8750.dtsi index 735e7628df96..612b99dc3c55 100644 --- a/arch/arm64/boot/dts/qcom/sm8750.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8750.dtsi @@ -1059,7 +1059,7 @@ interrupts = <GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&gc...
28f997b89967afdc0855d8aa7538b251fb44f654
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm8250: Fix CPU7 opp table
Problem Details: There is a typo in cpu7_opp9. Fix it to get rid of the following errors. [ 0.198043] cpu cpu7: Voltage update failed freq=1747200 [ 0.198052] cpu cpu7: failed to update OPP for freq=1747200 Fixes: 8e0e8016cb79 ("arm64: dts: qcom: sm8250: Add CPU opp tables") Signed-off-by: Xilin Wu <wuxilin123@...
```diff diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index c2937b4d9f18..68613ea7146c 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -606,7 +606,7 @@ }; cpu7_opp9: opp-1747200000 { - opp-hz = /bits/ 64 <1708800000>; +...
9eca3fd5c336afc3b90804ec008f54ce59320aee
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e80100-crd: add support for volume-up key
Problem Details: Add support for the keypad volume-up key on the debug extension board. This is useful to have when testing PMIC interrupt handling, and the key can also be used to wake up from deep suspend states (CX shutdown). Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/202...
```diff diff --git a/arch/arm64/boot/dts/qcom/x1-crd.dtsi b/arch/arm64/boot/dts/qcom/x1-crd.dtsi index 53f329c32019..f74c576f1c13 100644 --- a/arch/arm64/boot/dts/qcom/x1-crd.dtsi +++ b/arch/arm64/boot/dts/qcom/x1-crd.dtsi @@ -52,9 +52,16 @@ gpio-keys { compatible = "gpio-keys"; - pinctrl-0 = <&hall_int_n_defau...
8cd4b0f6bc71b2bf4f5c3fb8ec2857192182cb23
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e001de-devkit: Drop clock-names from PS8830
Problem Details: The preemptively-merged node contains a property absent from the final bindings. Remove it. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Fixes: 019e1ee32fec ("arm64: dts: qcom: x1e001de-devkit: Enable external DP support") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Li...
```diff diff --git a/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts b/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts index 602bd793e09c..f87730f4b63f 100644 --- a/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts +++ b/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts @@ -777,7 +777,6 @@ reg = <0x08>; clocks = <&rpmhcc RPMH_...
57aac7bd091cd7a1f43c852ce3703ce6c2433b21
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e80100-romulus: Drop clock-names from PS8830
Problem Details: The preemptively-merged node contains a property absent from the final bindings. Remove it. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Fixes: b16ee3d0cda4 ("arm64: dts: qcom: x1e80100-romulus: Set up PS8830s") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https:/...
```diff diff --git a/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi b/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi index 6a883fafe3c7..da8cef62ae73 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi +++ b/arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi @@ -794,7 +794,6 ...
6d617082867d4789ea4dcc67fc483460e2ac1d05
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e80100-dell-xps13-9345: Drop clock-names from PS8830
Problem Details: The preemptively-merged node contains a property absent from the final bindings. Remove it. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Fixes: bd2dbbb1f35a ("arm64: dts: qcom: x1e80100-dell-xps13-9345: Introduce retimer support") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro...
```diff diff --git a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts index 124051334be0..5d807fb34aee 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts +++ b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts @@ -612,7 +612,6 @@ reg = ...
9ea77c65b7b0357c54899a24ffd37d0430c90913
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc8180x: Rename AOSS_QMP to power-management
Problem Details: The node is currently named power-controller, which requires the device underneath is a power domain provider. Rename it to align with other SoCs and resolve this sort of warnings: power-controller@c310000: '#power-domain-cells' is a required property Fixes: 8575f197b077 ("arm64: dts: qcom: Introduce...
```diff diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi index 28693a3bfc7f..f142eb63b8d7 100644 --- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi @@ -3524,7 +3524,7 @@ #thermal-sensor-cells = <1>; }; - aoss_qmp: power-controller@...
bc09537f4745aae561f56daad0353d1b876bc096
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: qcs615: Rename AOSS_QMP to power-management
Problem Details: The node is currently named power-controller, which requires the device underneath is a power domain provider. Rename it to align with other SoCs and resolve this sort of warnings: power-controller@c300000: '#power-domain-cells' is a required property Fixes: 0775021783b5 ("arm64: dts: qcom: qcs615: a...
```diff diff --git a/arch/arm64/boot/dts/qcom/qcs615.dtsi b/arch/arm64/boot/dts/qcom/qcs615.dtsi index f9398cf95003..1627110bcfc9 100644 --- a/arch/arm64/boot/dts/qcom/qcs615.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs615.dtsi @@ -3208,7 +3208,7 @@ interrupt-controller; }; - aoss_qmp: power-controller@c300000 { +...
a3715ce8650928e2da7060957a7e9b962d8bb7be
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sdx75: Rename AOSS_QMP to power-management
Problem Details: The node is currently named power-controller, which requires the device underneath is a power domain provider. Rename it to align with other SoCs and resolve this sort of warnings: power-controller@c310000: '#power-domain-cells' is a required property Fixes: 91f767eb6938 ("arm64: dts: qcom: sdx75: Ad...
```diff diff --git a/arch/arm64/boot/dts/qcom/sdx75.dtsi b/arch/arm64/boot/dts/qcom/sdx75.dtsi index 8da2383861e4..8e63f635a327 100644 --- a/arch/arm64/boot/dts/qcom/sdx75.dtsi +++ b/arch/arm64/boot/dts/qcom/sdx75.dtsi @@ -1079,7 +1079,7 @@ interrupt-controller; }; - aoss_qmp: power-controller@c310000 { + ao...
6810ecd57eb4ba9e09bac851d5b9d56c5e5acc1a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sdx75: Fix up the USB interrupt description
Problem Details: Commit 53c6d854be4e ("dt-bindings: usb: dwc3: Clean up hs_phy_irq in binding") reworked the dt-bindings to accurately represent the hardware. Execute the second half of the cleanup by wiring up the missing pwr_event IRQ and adjusting the entry order. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qu...
```diff diff --git a/arch/arm64/boot/dts/qcom/sdx75.dtsi b/arch/arm64/boot/dts/qcom/sdx75.dtsi index b0a8a0fe5f39..8da2383861e4 100644 --- a/arch/arm64/boot/dts/qcom/sdx75.dtsi +++ b/arch/arm64/boot/dts/qcom/sdx75.dtsi @@ -1008,14 +1008,16 @@ <&gcc GCC_USB30_MASTER_CLK>; assigned-clock-rates = <19200000>, <...
67d15c7aa0864dfd82325c7e7e7d8548b5224c7b
Analyze and fix the following issue in the Linux kernel code: accel/qaic: Fix integer overflow in qaic_validate_req()
Problem Details: These are u64 variables that come from the user via qaic_attach_slice_bo_ioctl(). Use check_add_overflow() to ensure that the math doesn't have an integer wrapping bug. Cc: stable@vger.kernel.org Fixes: ff13be830333 ("accel/qaic: Add datapath") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> ...
```diff diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c index ffcdf5738d09..43aba57b48f0 100644 --- a/drivers/accel/qaic/qaic_data.c +++ b/drivers/accel/qaic/qaic_data.c @@ -557,6 +557,7 @@ static bool invalid_sem(struct qaic_sem *sem) static int qaic_validate_req(struct qaic_device *qdev,...
84a833d90635e4b846333e2df0ae72f9cbecac39
Analyze and fix the following issue in the Linux kernel code: accel/qaic: Fix possible data corruption in BOs > 2G
Problem Details: When slicing a BO, we need to iterate through the BO's sgt to find the right pieces to construct the slice. Some of the data types chosen for this process are incorrectly too small, and can overflow. This can result in the incorrect slice construction, which can lead to data corruption in workload exec...
```diff diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c index c20eb63750f5..ffcdf5738d09 100644 --- a/drivers/accel/qaic/qaic_data.c +++ b/drivers/accel/qaic/qaic_data.c @@ -172,9 +172,10 @@ static void free_slice(struct kref *kref) static int clone_range_of_sgt_for_slice(struct qaic_devic...
8189aa56dbed0bfb46b7b30d4d231f57ab17b3f4
Analyze and fix the following issue in the Linux kernel code: PCI: dwc: ep: Return -ENOMEM for allocation failures
Problem Details: If the bitmap or memory allocations fail, then dw_pcie_ep_init_registers() will incorrectly return a success. Return -ENOMEM instead. Fixes: 869bc5253406 ("PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> [kwilczynsk...
```diff diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index 11ff292ca87d..2212609632c4 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -774,6 +774,7 @@ int dw_pcie_ep_init_registers(str...
baaef0a274cfb75f9b50eab3ef93205e604f662c
Analyze and fix the following issue in the Linux kernel code: misc: pci_endpoint_test: Fix 'irq_type' to convey the correct type
Problem Details: There are two variables that indicate the interrupt type to be used in the next test execution, "irq_type" as global and "test->irq_type". The global is referenced from pci_endpoint_test_get_irq() to preserve the current type for ioctl(PCITEST_GET_IRQTYPE). The type set in this function isn't reflect...
```diff diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index acf3d8dab131..896392c428de 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -833,6 +833,7 @@ static int pci_endpoint_test_set_irq(struct pci_endpoint_test *test, return ret; } + i...
c361baf67200a79c878d72cc879b1217c52cec96
Analyze and fix the following issue in the Linux kernel code: reset: imx: fix incorrect module device table
Problem Details: The ID table is for of_device_id, not platform_device_id: ERROR: modpost: drivers/reset/reset-imx-scu: type mismatch between imx_scu_reset_ids[] and MODULE_DEVICE_TABLE(platform, ...) Fixes: 6b64fde5c183 ("reset: imx: Add SCU reset driver for i.MX8QXP and i.MX8QM") Signed-off-by: Arnd Bergmann <arnd@...
```diff diff --git a/drivers/reset/reset-imx-scu.c b/drivers/reset/reset-imx-scu.c index d3074eaad4c9..919fc29f944c 100644 --- a/drivers/reset/reset-imx-scu.c +++ b/drivers/reset/reset-imx-scu.c @@ -85,7 +85,7 @@ static const struct of_device_id imx_scu_reset_ids[] = { { .compatible = "fsl,imx-scu-reset", }, {} };...
b1a7f99967fc0c052db8e65b449c7b32b1e9177f
Analyze and fix the following issue in the Linux kernel code: PCI: Check BAR index for validity
Problem Details: Many functions in PCI use accessor macros such as pci_resource_len(), which take a BAR index. That index, however, is never checked for validity, potentially resulting in undefined behavior by overflowing the array pci_dev.resource in the macro pci_resource_n(). Since many users of those macros direct...
```diff diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 728ed0c7f70a..73047316889e 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -577,7 +577,7 @@ static int pcim_add_mapping_to_legacy_table(struct pci_dev *pdev, { void __iomem **legacy_iomap_table; - if (bar >= PCI_STD_NUM_BARS) + ...
73782fc64793f6e6e0118797d3b9044436f2e8e9
Analyze and fix the following issue in the Linux kernel code: i915/gt/selftests: Disable lrc_timestamp test
Problem Details: This test was designed to isolate a bug in tigerlake and dg2 hardware. The bug was found and fixed in newer generations. Since we won't support any new hardware with this driver, the test should now be turned off in the CI to not pollute it with random failures on previous hardware. For reference, the...
```diff diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c index e17b8777d21d..8051123108e5 100644 --- a/drivers/gpu/drm/i915/gt/selftest_lrc.c +++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c @@ -7,6 +7,7 @@ #include "gem/i915_gem_internal.h" +#include "i915_drv.h" #include ...
b3c221e752c4e46fd86d6e15153fa8c38bc3f250
Analyze and fix the following issue in the Linux kernel code: clk: amlogic: a1: fix a typo
Problem Details: Fix a typo in MODULE_DESCRIPTION for a1 PLL driver, S4 should be A1. Signed-off-by: Jian Hu <jian.hu@amlogic.com> Reviewed-by: Dmitry Rokosov <ddrokosov@salutedevices.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241231062552.2982266-1-jian.hu@amlogic.c...
```diff diff --git a/drivers/clk/meson/a1-pll.c b/drivers/clk/meson/a1-pll.c index 8d7c7b4493c4..86d8159f3319 100644 --- a/drivers/clk/meson/a1-pll.c +++ b/drivers/clk/meson/a1-pll.c @@ -356,7 +356,7 @@ static struct platform_driver a1_pll_clkc_driver = { }; module_platform_driver(a1_pll_clkc_driver); -MODULE_DESCR...
7915d7d5407c026fa9343befb4d3343f7a345f97
Analyze and fix the following issue in the Linux kernel code: clk: amlogic: gxbb: drop non existing 32k clock parent
Problem Details: The 32k clock reference a parent 'cts_slow_oscin' with a fixme note saying that this clock should be provided by AO controller. The HW probably has this clock but it does not exist at the moment in any controller implementation. Furthermore, referencing clock by the global name should be avoided whene...
```diff diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index df9250de51dc..3abb44a2532b 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -1266,14 +1266,13 @@ static struct clk_regmap gxbb_cts_i958 = { }, }; +/* + * This table skips a clock named 'cts_slow_oscin' in the docu...
f38f7fe4830c5cb4eac138249225f119e7939965
Analyze and fix the following issue in the Linux kernel code: clk: amlogic: gxbb: drop incorrect flag on 32k clock
Problem Details: gxbb_32k_clk_div sets CLK_DIVIDER_ROUND_CLOSEST in the init_data flag which is incorrect. This is field is not where the divider flags belong. Thankfully, CLK_DIVIDER_ROUND_CLOSEST maps to bit 4 which is an unused clock flag, so there is no unintended consequence to this error. Effectively, the clock...
```diff diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 8575b8485385..df9250de51dc 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -1306,7 +1306,7 @@ static struct clk_regmap gxbb_32k_clk_div = { &gxbb_32k_clk_sel.hw }, .num_parents = 1, - .flags = CLK_SET_RATE_...
8995f8f108c3ac5ad52b12a6cfbbc7b3b32e9a58
Analyze and fix the following issue in the Linux kernel code: clk: amlogic: g12b: fix cluster A parent data
Problem Details: Several clocks used by both g12a and g12b use the g12a cpu A clock hw pointer as clock parent. This is incorrect on g12b since the parents of cluster A cpu clock are different. Also the hw clock provided as parent to these children is not even registered clock on g12b. Fix the problem by reverting to ...
```diff diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index d978516bba34..ceabebb1863d 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -1137,8 +1137,18 @@ static struct clk_regmap g12a_cpu_clk_div16_en = { .hw.init = &(struct clk_init_data) { .name = "cpu_clk_div16_en", ...
0079e77c08de692cb20b38e408365c830a44b1ef
Analyze and fix the following issue in the Linux kernel code: clk: amlogic: g12a: fix mmc A peripheral clock
Problem Details: The bit index of the peripheral clock for mmc A is wrong This was probably not a problem for mmc A as the peripheral is likely left enabled by the bootloader. No issues has been reported so far but it could be a problem, most likely some form of conflict between the ethernet and mmc A clock, breaking ...
```diff diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index cfffd434e998..d978516bba34 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -4311,7 +4311,7 @@ static MESON_GATE(g12a_spicc_1, HHI_GCLK_MPEG0, 14); static MESON_GATE(g12a_hiu_reg, HHI_GCLK_MPEG0, 19); static MESO...
e3260237aaadc9799107ccb940c6688195c4518d
Analyze and fix the following issue in the Linux kernel code: PCI: pciehp: Avoid unnecessary device replacement check
Problem Details: Hot-removal of nested PCI hotplug ports suffers from a long-standing race condition which can lead to a deadlock: A parent hotplug port acquires pci_lock_rescan_remove(), then waits for pciehp to unbind from a child hotplug port. Meanwhile that child hotplug port tries to acquire pci_lock_rescan_remo...
```diff diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index ff458e692fed..997841c69893 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c @@ -286,9 +286,12 @@ static int pciehp_suspend(struct pcie_device *dev) static bool pciehp_device_replaced...
d8dfda5af0be6e48178b6f4b46c6af30b06335b2
Analyze and fix the following issue in the Linux kernel code: KVM: s390: pv: fix race when making a page secure
Problem Details: Holding the pte lock for the page that is being converted to secure is needed to avoid races. A previous commit removed the locking, which caused issues. Fix by locking the pte again. Fixes: 5cbe24350b7d ("KVM: s390: move pv gmap functions into kvm") Reported-by: David Hildenbrand <david@redhat.com> T...
```diff diff --git a/arch/s390/include/asm/gmap.h b/arch/s390/include/asm/gmap.h index 4e73ef46d4b2..9f2814d0e1e9 100644 --- a/arch/s390/include/asm/gmap.h +++ b/arch/s390/include/asm/gmap.h @@ -139,7 +139,6 @@ int s390_replace_asce(struct gmap *gmap); void s390_uv_destroy_pfns(unsigned long count, unsigned long *pfns...
ee20c69c789b6cb2179a535cf440d72b98f4a134
Analyze and fix the following issue in the Linux kernel code: drm: adp: Fix NULL vs IS_ERR() check in adp_plane_new()
Problem Details: The __drmm_universal_plane_alloc() function doesn't return NULL, it returns error pointers. Update the check to match. Fixes: 332122eba628 ("drm: adp: Add Apple Display Pipe driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Sasha Finkelstein <fnkl.kernel@gmail.com> Link: http...
```diff diff --git a/drivers/gpu/drm/adp/adp_drv.c b/drivers/gpu/drm/adp/adp_drv.c index 0eeb9e5fab26..c98c647f981d 100644 --- a/drivers/gpu/drm/adp/adp_drv.c +++ b/drivers/gpu/drm/adp/adp_drv.c @@ -232,9 +232,9 @@ static struct drm_plane *adp_plane_new(struct adp_drv_private *adp) ALL_CRTCS, &adp_plane_func...
03f1444016b71feffa1dfb8a51f15ba592f94b13
Analyze and fix the following issue in the Linux kernel code: PM: sleep: Fix handling devices with direct_complete set on errors
Problem Details: When dpm_suspend() fails, some devices with power.direct_complete set may not have been handled by device_suspend() yet, so runtime PM has not been disabled for them yet even though power.direct_complete is set. Since device_resume() expects that runtime PM has been disabled for all devices with power...
```diff diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 1b0eb83f7061..ad50018b8047 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -938,6 +938,9 @@ static void device_resume(struct device *dev, pm_message_t state, bool async) if (dev->power.syscore) goto Complete;...
5442d22da7dbff3ba8c6720fc6f23ea4934d402d
Analyze and fix the following issue in the Linux kernel code: Coresight: Fix a NULL vs IS_ERR() bug in probe
Problem Details: The devm_platform_get_and_ioremap_resource() function doesn't return NULL, it returns error pointers. Update the checking to match. Fixes: f78d206f3d73 ("Coresight: Add Coresight TMC Control Unit driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki....
```diff diff --git a/drivers/hwtracing/coresight/coresight-ctcu-core.c b/drivers/hwtracing/coresight/coresight-ctcu-core.c index da35d8b4d579..c6bafc96db96 100644 --- a/drivers/hwtracing/coresight/coresight-ctcu-core.c +++ b/drivers/hwtracing/coresight/coresight-ctcu-core.c @@ -204,8 +204,8 @@ static int ctcu_probe(str...
0b4ffbe4888a2c71185eaf5c1a02dd3586a9bc04
Analyze and fix the following issue in the Linux kernel code: tracing: Correct the refcount if the hist/hist_debug file fails to open
Problem Details: The function event_{hist,hist_debug}_open() maintains the refcount of 'file->tr' and 'file' through tracing_open_file_tr(). However, it does not roll back these counts on subsequent failure paths, resulting in a refcount leak. A very obvious case is that if the hist/hist_debug file belongs to a specif...
```diff diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index ad7419e24055..53dc6719181e 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -5689,12 +5689,16 @@ static int event_hist_open(struct inode *inode, struct file *file) guard(mutex)(&event_...
5a19143124be42900b3fbc9ada3c919632eb45eb
Analyze and fix the following issue in the Linux kernel code: can: flexcan: disable transceiver during system PM
Problem Details: During system PM, if no wakeup requirement, disable transceiver to save power. Fixes: 4de349e786a3 ("can: flexcan: fix resume function") Cc: stable@vger.kernel.org Reviewed-by: Frank Li <frank.li@nxp.com> Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Link: https://patch.msgid.link/20250314110145.8991...
```diff diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c index 3a71fd235722..b080740bcb10 100644 --- a/drivers/net/can/flexcan/flexcan-core.c +++ b/drivers/net/can/flexcan/flexcan-core.c @@ -2260,6 +2260,10 @@ static int __maybe_unused flexcan_suspend(struct device *device) ...
fd99d6ed20234b83d65b9c5417794343577cf3e5
Analyze and fix the following issue in the Linux kernel code: can: flexcan: only change CAN state when link up in system PM
Problem Details: After a suspend/resume cycle on a down interface, it will come up as ERROR-ACTIVE. $ ip -details -s -s a s dev flexcan0 3: flexcan0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN group default qlen 10 link/can promiscuity 0 allmulti 0 minmtu 0 maxmtu 0 can state STOPPED (berr-counter tx 0 r...
```diff diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c index ac1a860986df..3a71fd235722 100644 --- a/drivers/net/can/flexcan/flexcan-core.c +++ b/drivers/net/can/flexcan/flexcan-core.c @@ -2266,8 +2266,9 @@ static int __maybe_unused flexcan_suspend(struct device *device) ...
f82718251e302fd6321224d6c3be969245d5a2d2
Analyze and fix the following issue in the Linux kernel code: mfd: qnap-mcu: Convert commas to semicolons in qnap_mcu_exec()
Problem Details: Replace comma between expressions with semicolons. Using a ',' in place of a ';' can have unintended side effects. Although that is not the case here, it is seems best to use ';' unless ',' is intended. Found by inspection. No functional change intended. Compile tested only. Fixes: 998f70d1806b ("mf...
```diff diff --git a/drivers/mfd/qnap-mcu.c b/drivers/mfd/qnap-mcu.c index 4be39d8b2905..89a8a1913d42 100644 --- a/drivers/mfd/qnap-mcu.c +++ b/drivers/mfd/qnap-mcu.c @@ -158,9 +158,9 @@ int qnap_mcu_exec(struct qnap_mcu *mcu, mutex_lock(&mcu->bus_lock); - reply->data = rx, - reply->length = length, - reply->rece...
5c4e79e29a9fe4ea132118ac40c2bc97cfe23077
Analyze and fix the following issue in the Linux kernel code: xenfs/xensyms: respect hypervisor's "next" indication
Problem Details: The interface specifies the symnum field as an input and output; the hypervisor sets it to the next sequential symbol's index. xensyms_next() incrementing the position explicitly (and xensyms_next_sym() decrementing it to "rewind") is only correct as long as the sequence of symbol indexes is non-sparse...
```diff diff --git a/drivers/xen/xenfs/xensyms.c b/drivers/xen/xenfs/xensyms.c index b799bc759c15..088b7f02c358 100644 --- a/drivers/xen/xenfs/xensyms.c +++ b/drivers/xen/xenfs/xensyms.c @@ -48,7 +48,7 @@ static int xensyms_next_sym(struct xensyms *xs) return -ENOMEM; set_xen_guest_handle(symdata->name, xs->na...
c2820405ba55a38932aa2177f026b70064296663
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Fix CME quirk for UF series keyboards
Problem Details: Fix quirk for CME master keyboards so it not only handles sysex but also song position pointer, MIDI timing clock, start and stop messages, and active sensing. All of these can be output by the CME UF series master keyboards. Tested with a CME UF6 in a desktop Linux environment as well as on the Zynth...
```diff diff --git a/sound/usb/midi.c b/sound/usb/midi.c index 737dd00e97b1..aa2b7c589c01 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c @@ -489,16 +489,84 @@ static void ch345_broken_sysex_input(struct snd_usb_midi_in_endpoint *ep, /* * CME protocol: like the standard protocol, but SysEx commands are sent a...
1c3dfc7c6b0f551fdca3f7c1f1e4c73be8adb17d
Analyze and fix the following issue in the Linux kernel code: xen/mcelog: Add __nonstring annotations for unterminated strings
Problem Details: When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the arrays with __nonstring to and correctly identify the char array as "not a C string" and thereby el...
```diff diff --git a/include/xen/interface/xen-mca.h b/include/xen/interface/xen-mca.h index 464aa6b3a5f9..1c9afbe8cc26 100644 --- a/include/xen/interface/xen-mca.h +++ b/include/xen/interface/xen-mca.h @@ -372,7 +372,7 @@ struct xen_mce { #define XEN_MCE_LOG_LEN 32 struct xen_mce_log { - char signature[12]; /* "MA...
a1e36ec36356e33fd089761021e0de031ae3a06a
Analyze and fix the following issue in the Linux kernel code: selftests: drv-net: fix merge conflicts resolution
Problem Details: After the recent merge between net-next and net, I got some conflicts on my side because the merge resolution was different from Stephen's one [1] I applied on my side in the MPTCP tree. It looks like the code that is now in net-next is using the old way to retrieve the local and remote addresses. Thi...
```diff diff --git a/tools/testing/selftests/drivers/net/ping.py b/tools/testing/selftests/drivers/net/ping.py index 7a1026a07368..79f07e0510ec 100755 --- a/tools/testing/selftests/drivers/net/ping.py +++ b/tools/testing/selftests/drivers/net/ping.py @@ -15,18 +15,18 @@ no_sleep=False def _test_v4(cfg) -> None: c...
f09d3937d400433080d17982bd1a540da53a156d
Analyze and fix the following issue in the Linux kernel code: PCI: Fix wrong length of devres array
Problem Details: The array for the iomapping cookie addresses has a length of PCI_STD_NUM_BARS. This constant, however, only describes standard BARs; while PCI can allow for additional, special BARs. The total number of PCI resources is described by constant PCI_NUM_RESOURCES, which is also used in, e.g., pci_select_b...
```diff diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 3431a7df3e0d..728ed0c7f70a 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -40,7 +40,7 @@ * Legacy struct storing addresses to whole mapped BARs. */ struct pcim_iomap_devres { - void __iomem *table[PCI_STD_NUM_BARS]; + void __io...
4cdf1d2a816a93fa02f7b6b5492dc7f55af2a199
Analyze and fix the following issue in the Linux kernel code: mfd: ene-kb3930: Fix a potential NULL pointer dereference
Problem Details: The off_gpios could be NULL. Add missing check in the kb3930_probe(). This is similar to the issue fixed in commit b1ba8bcb2d1f ("backlight: hx8357: Fix potential NULL pointer dereference"). This was detected by our static analysis tool. Cc: stable@vger.kernel.org Fixes: ede6b2d1dfc0 ("mfd: ene-kb393...
```diff diff --git a/drivers/mfd/ene-kb3930.c b/drivers/mfd/ene-kb3930.c index fa0ad2f14a39..9460a67acb0b 100644 --- a/drivers/mfd/ene-kb3930.c +++ b/drivers/mfd/ene-kb3930.c @@ -162,7 +162,7 @@ static int kb3930_probe(struct i2c_client *client) devm_gpiod_get_array_optional(dev, "off", GPIOD_IN); if (IS_ERR(dda...
2d8cb9ffe18c2f1e5bd07a19cbce85b26c1d0cf0
Analyze and fix the following issue in the Linux kernel code: mfd: sm501: Switch to BIT() to mitigate integer overflows
Problem Details: If offset end up being high enough, right hand expression in functions like sm501_gpio_set() shifted left for that number of bits, may not fit in int type. Just in case, fix that by using BIT() both as an option safe from overflow issues and to make this step look similar to other gpio drivers. Found...
```diff diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c index 0469e85d72cf..7ee293b09f62 100644 --- a/drivers/mfd/sm501.c +++ b/drivers/mfd/sm501.c @@ -920,7 +920,7 @@ static void sm501_gpio_set(struct gpio_chip *chip, unsigned offset, int value) { struct sm501_gpio_chip *smchip = gpiochip_get_data(chip); s...
1dba0a37644ed3022558165bbb5cb9bda540eaf7
Analyze and fix the following issue in the Linux kernel code: can: rcar_canfd: Fix page entries in the AFL list
Problem Details: There are a total of 96 AFL pages and each page has 16 entries with registers CFDGAFLIDr, CFDGAFLMr, CFDGAFLP0r, CFDGAFLP1r holding the rule entries (r = 0..15). Currently, RCANFD_GAFL* macros use a start variable to find AFL entries, which is incorrect as the testing on RZ/G3E shows ch1 and ch4 gets ...
```diff diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c index df1a5d0b37b2..aa3df0d05b85 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -787,22 +787,14 @@ static void rcar_canfd_configure_controller(struct rcar_canfd_global *gpriv) } stat...
51f6fc9eb1d77ae5cacc796fc043dedc1f0f0073
Analyze and fix the following issue in the Linux kernel code: dt-bindings: can: renesas,rcar-canfd: Fix typo in pattern properties for R-Car V4M
Problem Details: The Renesas R-Car V4M(R8A779H0) SoC, supports up to four channels. Fix the typo 5->4 in pattern properties. Fixes: ced52c6ed257 ("dt-bindings: can: renesas,rcar-canfd: Document R-Car V4M support") Cc: stable@vger.kernel.org Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: "Rob Herri...
```diff diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml index 7c5ac5d2e880..f6884f6e59e7 100644 --- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml +++ b/Documentation/devicetree/bindings/net/can/renes...
80b5f90158d1364cbd80ad82852a757fc0692bf2
Analyze and fix the following issue in the Linux kernel code: can: statistics: use atomic access in hot path
Problem Details: In can_send() and can_receive() CAN messages and CAN filter matches are counted to be visible in the CAN procfs files. KCSAN detected a data race within can_send() when two CAN frames have been generated by a timer event writing to the same CAN netdevice at the same time. Use atomic operations to acce...
```diff diff --git a/net/can/af_can.c b/net/can/af_can.c index 01f3fbb3b67d..65230e81fa08 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c @@ -287,8 +287,8 @@ int can_send(struct sk_buff *skb, int loop) netif_rx(newskb); /* update statistics */ - pkg_stats->tx_frames++; - pkg_stats->tx_frames_delta++; + atom...
1d22a122ffb116c3cf78053e812b8b21f8852ee9
Analyze and fix the following issue in the Linux kernel code: can: ucan: fix out of bound read in strscpy() source
Problem Details: Commit 7fdaf8966aae ("can: ucan: use strscpy() to instead of strncpy()") unintentionally introduced a one byte out of bound read on strscpy()'s source argument (which is kind of ironic knowing that strscpy() is meant to be a more secure alternative :)). Let's consider below buffers: dest[len + 1]; ...
```diff diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c index 39a63b7313a4..07406daf7c88 100644 --- a/drivers/net/can/usb/ucan.c +++ b/drivers/net/can/usb/ucan.c @@ -186,7 +186,7 @@ union ucan_ctl_payload { */ struct ucan_ctl_cmd_get_protocol_version cmd_get_protocol_version; - u8 raw[128]; ...
8c75f3e6a433d92084ad4e78b029ae680865420f
Analyze and fix the following issue in the Linux kernel code: usb: gadget: aspeed: Add NULL pointer check in ast_vhub_init_dev()
Problem Details: The variable d->name, returned by devm_kasprintf(), could be NULL. A pointer check is added to prevent potential NULL pointer dereference. This is similar to the fix in commit 3027e7b15b02 ("ice: Fix some null pointer dereference issues in ice_ptp.c"). This issue is found by our static analysis tool ...
```diff diff --git a/drivers/usb/gadget/udc/aspeed-vhub/dev.c b/drivers/usb/gadget/udc/aspeed-vhub/dev.c index 573109ca5b79..a09f72772e6e 100644 --- a/drivers/usb/gadget/udc/aspeed-vhub/dev.c +++ b/drivers/usb/gadget/udc/aspeed-vhub/dev.c @@ -548,6 +548,9 @@ int ast_vhub_init_dev(struct ast_vhub *vhub, unsigned int idx...
440ca0cfdfd0d7cf575e9176c07358a1ed2477ba
Analyze and fix the following issue in the Linux kernel code: dt-bindings: usb: qcom,dwc3: Synchronize minItems for interrupts and -names
Problem Details: It makes sense that ARRAY_SIZE(prop) should == ARRAY_SIZE(prop-names), so allow that to happen with interrupts. Fixes bogus warnings such as: usb@c2f8800: interrupt-names: ['pwr_event', 'qusb2_phy', 'hs_phy_irq'] is too short Fixes: 53c6d854be4e ("dt-bindings: usb: dwc3: Clean up hs_phy_irq in bindin...
```diff diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml index a2b3cf625e5b..64137c1619a6 100644 --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml @@ -404,6 +404,7 @@ allOf: ...
f2865c6300d75a9f187dd7918d248e010970fd44
Analyze and fix the following issue in the Linux kernel code: usb: typec: tcpm: fix state transition for SNK_WAIT_CAPABILITIES state in run_state_machine()
Problem Details: A subtle error got introduced while manually fixing merge conflict in tcpm.c for commit 85c4efbe6088 ("Merge v6.12-rc6 into usb-next"). As a result of this error, the next state is unconditionally set to SNK_WAIT_CAPABILITIES_TIMEOUT while handling SNK_WAIT_CAPABILITIES state in run_state_machine(...)....
```diff diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 6bf1a22c785a..62ca4a0ec55b 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -5117,16 +5117,16 @@ static void run_state_machine(struct tcpm_port *port) */ if (port->vbus_never_low) { port-...
878516a9e62cd220379e511d43dcf58df3a6ca9f
Analyze and fix the following issue in the Linux kernel code: drm/ttm/tests: fix incorrect assert in ttm_bo_unreserve_bulk()
Problem Details: In the ttm_bo_unreserve_bulk() test function, resv is allocated using kunit_kzalloc(), but the subsequent assertion mistakenly verifies the ttm_dev pointer instead of the resv pointer. Fix the assertion to properly verify the resv pointer. Signed-off-by: Qasim Ijaz <qasdev00@gmail.com> Link: https://...
```diff diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c index f8f20d2f6174..e08e5a138420 100644 --- a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c +++ b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c @@ -340,7 +340,7 @@ static void ttm_bo_unreserve_bulk(struct kunit *test) KUNIT_ASS...
0686a818d77a431fc3ba2fab4b46bbb04e8c9380
Analyze and fix the following issue in the Linux kernel code: bus: mhi: host: Fix race between unprepare and queue_buf
Problem Details: A client driver may use mhi_unprepare_from_transfer() to quiesce incoming data during the client driver's tear down. The client driver might also be processing data at the same time, resulting in a call to mhi_queue_buf() which will invoke mhi_gen_tre(). If mhi_gen_tre() runs after mhi_unprepare_from_t...
```diff diff --git a/drivers/bus/mhi/host/main.c b/drivers/bus/mhi/host/main.c index 4c91ffd6ed0e..9bb0df43ceef 100644 --- a/drivers/bus/mhi/host/main.c +++ b/drivers/bus/mhi/host/main.c @@ -1188,11 +1188,16 @@ int mhi_gen_tre(struct mhi_controller *mhi_cntrl, struct mhi_chan *mhi_chan, struct mhi_ring_element *mhi_t...
eb6cdfb807d038d9b9986b5c87188f28a4071eae
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Restore uncached behaviour on GFX12
Problem Details: Always use MTYPE_UC if UNCACHED flag is specified. This makes kernarg region uncached and it restores usermode cache disable debug flag functionality. Do not set MTYPE_UC for COHERENT flag, on GFX12 coherence is handled by shader code. Signed-off-by: David Belanger <david.belanger@amd.com> Reviewed-...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c index bf8d01da8815..05c026d0b0d9 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c @@ -501,9 +501,6 @@ static void gmc_v12_0_get_vm_pte(struct amdgpu_device *adev, ui...
ebdc52607a46cda08972888178c6aa9cd6965141
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/gfx12: correct cleanup of 'me' field with gfx_v12_0_me_fini()
Problem Details: In gfx_v12_0_cp_gfx_load_me_microcode_rs64(), gfx_v12_0_pfp_fini() is incorrectly used to free 'me' field of 'gfx', since gfx_v12_0_pfp_fini() can only release 'pfp' field of 'gfx'. The release function of 'me' field should be gfx_v12_0_me_fini(). Fixes: 52cb80c12e8a ("drm/amdgpu: Add gfx v12_0 ip blo...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c index 87dc4195192c..da364e04f09c 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c @@ -2455,7 +2455,7 @@ static int gfx_v12_0_cp_gfx_load_me_microcode_rs64(struct amdgpu_de...
42d9d7bed270247f134190ba0cb05bbd072f58c2
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: avoid NPD when ASIC does not support DMUB
Problem Details: ctx->dmub_srv will de NULL if the ASIC does not support DMUB, which is tested in dm_dmub_sw_init. However, it will be dereferenced in dmub_hw_lock_mgr_cmd if should_use_dmub_lock returns true. This has been the case since dmub support has been added for PSR1. Fix this by checking for dmub_srv in sho...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c index bf636b28e3e1..a262598aa676 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c @@ -63,6 +63,10 @@ void dmub_...
f81cd793119e7f4b426a825435d49cc10a081c7a
Analyze and fix the following issue in the Linux kernel code: drm/amd/amdgpu: Fix MES init sequence
Problem Details: When MES is been used , the set_hw_resource_1 API is required to initialize MES internal context correctly Signed-off-by: Shaoyun Liu <shaoyun.liu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Signed-off-by: Alex Deucher <a...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h index 68d640aaa2e1..da2c9a8cb3e0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h @@ -143,9 +143,9 @@ struct amdgpu_mes { const struct amdgpu_mes_funcs *funcs; ...
0c7e053448945e5a4379dc4396c762d7422b11ca
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Correct F8_MODE for gfx950
Problem Details: Correct F8_MODE setting for gfx950 that was removed Fixes: 61972cd93af7 ("drm/amdkfd: Set per-process flags only once for gfx9/10/11/12") Signed-off-by: Amber Lin <Amber.Lin@amd.com> Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviwanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd....
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_v9.c index d794c8172b40..9fcc8c6e57b7 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_v9.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_v9.c @@ -71,8 +71,7 @@...
7e0459d453b911435673edd7a86eadc600c63238
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix instruction hazard in gfx12 trap handler
Problem Details: VALU instructions with SGPR source need wait states to avoid hazard with SALU using different SGPR. v2: Eliminate some hazards to reduce code explosion Signed-off-by: Jay Cornwall <jay.cornwall@amd.com> Reviewed-by: Lancelot Six <lancelot.six@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h b/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h index 651660958e5b..0320163b6e74 100644 --- a/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h +++ b/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h @@ -3644,7 +3644,7 @@ static const uint32_t cwsr_trap_gfx...
f844732e3ad9c4b78df7436232949b8d2096d1a6
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix the race condition for draining retry fault
Problem Details: Issue: In the scenario where svm_range_restore_pages is called, but svm->checkpoint_ts has not been set and the retry fault has not been drained, svm_range_unmap_from_cpu is triggered and calls svm_range_free. Meanwhile, svm_range_restore_pages continues execution and reaches svm_range_from_addr. This ...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index 1a38ac75abbd..63eeef2a75ba 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -3009,19 +3009,6 @@ svm_range_restore_pages(struct amdgpu_device *adev, unsigned int pasid, ...
19478f2011f8b53dee401c91423c4e0b73753e4f
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Update SRIOV video codec caps
Problem Details: There have been multiple fixes to the video caps that are missing for SRIOV. Update the SRIOV caps with correct values. Signed-off-by: David Rosca <david.rosca@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: Alex Deucher <alex...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c index 32b824c3658f..50e77d9b30af 100644 --- a/drivers/gpu/drm/amd/amdgpu/nv.c +++ b/drivers/gpu/drm/amd/amdgpu/nv.c @@ -141,23 +141,23 @@ static struct amdgpu_video_codec_info sriov_sc_video_codecs_encode_array[] = { }; static st...
6e0d2fde3ae8fdb5b47e10389f23ed2cb4daec5d
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix JPEG video caps max size for navi1x and raven
Problem Details: 8192x8192 is the maximum supported resolution. Signed-off-by: David Rosca <david.rosca@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c index a18e6fb9fa3f..32b824c3658f 100644 --- a/drivers/gpu/drm/amd/amdgpu/nv.c +++ b/drivers/gpu/drm/amd/amdgpu/nv.c @@ -83,7 +83,7 @@ static const struct amdgpu_video_codec_info nv_video_codecs_decode_array[] = { {codec_info_build(...
1a0807feb97082bff2b1342dbbe55a2a9a8bdb88
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix MPEG2, MPEG4 and VC1 video caps max size
Problem Details: 1920x1088 is the maximum supported resolution. Signed-off-by: David Rosca <david.rosca@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c index 8068f384f56c..a18e6fb9fa3f 100644 --- a/drivers/gpu/drm/amd/amdgpu/nv.c +++ b/drivers/gpu/drm/amd/amdgpu/nv.c @@ -78,10 +78,10 @@ static const struct amdgpu_video_codecs nv_video_codecs_encode = { /* Navi1x */ static const ...
2d52de55f9ee7aaee0e09ac443f77855989c6b68
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix uninitialized size issue in radeon_vce_cs_parse()
Problem Details: On the off chance that command stream passed from userspace via ioctl() call to radeon_vce_cs_parse() is weirdly crafted and first command to execute is to encode (case 0x03000001), the function in question will attempt to call radeon_vce_cs_reloc() with size argument that has not been properly initial...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_vce.c b/drivers/gpu/drm/radeon/radeon_vce.c index d1871af967d4..2355a78e1b69 100644 --- a/drivers/gpu/drm/radeon/radeon_vce.c +++ b/drivers/gpu/drm/radeon/radeon_vce.c @@ -557,7 +557,7 @@ int radeon_vce_cs_parse(struct radeon_cs_parser *p) { int session_idx = -1; ...
9d484eac1ef859957b94437e10a4a6db95a9e427
Analyze and fix the following issue in the Linux kernel code: dt-bindings: reset: fix double id on rk3562-cru reset ids
Problem Details: Id 173 was accidentially used two times for SRST_P_DDR_HWLP and SRST_P_DDR_PHY. This makes both resets ambiguous and also causes build warnings like: drivers/clk/rockchip/rst-rk3562.c:21:57: error: initialized field overwritten [-Werror=override-init] 21 | #define RK3562_DDRCRU_RESET_OFFSET(id, reg...
```diff diff --git a/include/dt-bindings/reset/rockchip,rk3562-cru.h b/include/dt-bindings/reset/rockchip,rk3562-cru.h index a74471d7d2a9..8df95113056e 100644 --- a/include/dt-bindings/reset/rockchip,rk3562-cru.h +++ b/include/dt-bindings/reset/rockchip,rk3562-cru.h @@ -217,7 +217,7 @@ #define SRST_MSCH_BRG_BIU 171 ...
7bda89a2489fb012c4c63f3338827ad1f35c8880
Analyze and fix the following issue in the Linux kernel code: ASoC: dt-bindings: sun4i-a10-codec: add hp-det-gpios
Problem Details: Devices integrating Allwinner SoCs may use line-out or headphone jacks with jack detection circuits attached to a GPIO. Support defining these in DTs. A number of Anbernic devices featuring the H700 SoC use this mechanism to switch between a headphone jack and an internal speaker, so add these to the ...
```diff diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml index ccae64ce3071..b4eca702febc 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml +++ b/Documentation/devicetree/binding...
e9ed0ac3ccba65c17ed0d59c77a340a75abc317b
Analyze and fix the following issue in the Linux kernel code: drivers: clk: qcom: ipq5424: fix the freq table of sdcc1_apps clock
Problem Details: The divider values in the sdcc1_apps frequency table were incorrectly updated, assuming the frequency of gpll2_out_main to be 1152MHz. However, the frequency of the gpll2_out_main clock is actually 576MHz (gpll2/2). Due to these incorrect divider values, the sdcc1_apps clock is running at half of the ...
```diff diff --git a/drivers/clk/qcom/gcc-ipq5424.c b/drivers/clk/qcom/gcc-ipq5424.c index 37b1a3ff8f4e..3d42f3d85c7a 100644 --- a/drivers/clk/qcom/gcc-ipq5424.c +++ b/drivers/clk/qcom/gcc-ipq5424.c @@ -640,11 +640,11 @@ static struct clk_rcg2 gcc_qupv3_uart1_clk_src = { static const struct freq_tbl ftbl_gcc_sdcc1_app...
5f0d2de417166698c8eba433b696037ce04730da
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: add GOcontroll
Problem Details: GOcontroll produces embedded linux systems and IO modules to use in these systems, add its prefix. Acked-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Maud Spierings <maudspierings@gocontroll.com> Link: https://patch.msgid.link/20250226-initial_display-v2-2-23fafa130817@gocontroll.com Signed-...
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 5079ca6ce1d1..b5979832ddce 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -593,6 +593,8 @@ patte...
f0066c8d1d3298e9f9d136a365139bac733e84c5
Analyze and fix the following issue in the Linux kernel code: ASoC: tas2770: Fix and redo I/V sense TDM slot setting logic
Problem Details: The former code sets the V slot from inside set_bitwidth according to the bitwidth of the PCM format. That's wrong, since: * It overrides the V slot parsed from DT binding. * The V slot is set shifted behind the I slot by the length of the PCM bitwidth, but the PCM bitwidth has no assured relati...
```diff diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c index 4a86fcec0c1e..7f219df8be70 100644 --- a/sound/soc/codecs/tas2770.c +++ b/sound/soc/codecs/tas2770.c @@ -224,19 +224,16 @@ static int tas2770_set_bitwidth(struct tas2770_priv *tas2770, int bitwidth) ret = snd_soc_component_update_bits(...
de74ec718e0788e1998eb7289ad07970e27cae27
Analyze and fix the following issue in the Linux kernel code: ASoC: simple-card-utils: Don't use __free(device_node) at graph_util_parse_dai()
Problem Details: commit 419d1918105e ("ASoC: simple-card-utils: use __free(device_node) for device node") uses __free(device_node) for dlc->of_node, but we need to keep it while driver is in use. Don't use __free(device_node) in graph_util_parse_dai(). Fixes: 419d1918105e ("ASoC: simple-card-utils: use __free(device_...
```diff diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index c2445c5ccd84..32efb30c55d6 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -1077,6 +1077,7 @@ static int graph_get_dai_id(struct device_node *ep) int graph_util_par...
f41658cd081ad7697796b3dacd9a717a57919268
Analyze and fix the following issue in the Linux kernel code: bus: qcom-ssc-block-bus: Fix the error handling path of qcom_ssc_block_bus_probe()
Problem Details: If qcom_ssc_block_bus_pds_enable() fails, the previous call to qcom_ssc_block_bus_pds_attach() must be undone, as already done in the remove function. In order to do that, move the code related to the power domains management to the end of the function, in order to avoid many changes in all the error ...
```diff diff --git a/drivers/bus/qcom-ssc-block-bus.c b/drivers/bus/qcom-ssc-block-bus.c index c95a985e3498..7f5fd4e0940d 100644 --- a/drivers/bus/qcom-ssc-block-bus.c +++ b/drivers/bus/qcom-ssc-block-bus.c @@ -264,18 +264,6 @@ static int qcom_ssc_block_bus_probe(struct platform_device *pdev) platform_set_drvdata(p...
a9ac4ba7dcace2b3b91e7b87bf0ba97c47edd94f
Analyze and fix the following issue in the Linux kernel code: bus: qcom-ssc-block-bus: Remove some duplicated iounmap() calls
Problem Details: reg_mpm_sscaon_config[01] are allocated with devm_ioremap_resource(). So, they will be unmapped automatically by the manage resource framework. Remove the incorrect explicit iounmap() calls from the remove function. Fixes: 97d485edc1d9 ("bus: add driver for initializing the SSC bus on (some) qcom SoC...
```diff diff --git a/drivers/bus/qcom-ssc-block-bus.c b/drivers/bus/qcom-ssc-block-bus.c index 85d781a32df4..c95a985e3498 100644 --- a/drivers/bus/qcom-ssc-block-bus.c +++ b/drivers/bus/qcom-ssc-block-bus.c @@ -356,9 +356,6 @@ static void qcom_ssc_block_bus_remove(struct platform_device *pdev) qcom_ssc_block_bus_de...
6b68387cf5ff5d7b86b189135affb0c679e3384a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Remove bluetooth node from rock-3a
Problem Details: The Bluetooth node described in the device tree is actually on an M.2 slot. What module is present depends on what the end user installed, and should be left to an overlay. Remove the existing bluetooth node. This gets rid of bogus timeout errors. Fixes: 8cf890aabd45 ("arm64: dts: rockchip: Add nodes...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts index ac79140a9ecd..44cfdfeed668 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts @@ -778,20 +778,6 @@ pinctrl-0 = <&uart1m0_xfer &ua...
8fbb9376f0c489dfdc7e20d16e90686b29dec8f2
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Move rk356x scmi SHMEM to reserved memory
Problem Details: 0x0 to 0xf0000000 are SDRAM memory areas where 0x10f000 is located. So move the SHMEM memory of arm_scmi to the reserved memory node. Fixes: a3adc0b9071d ("arm64: dts: rockchip: add core dtsi for RK3568 SoC") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Link: https://lore.kernel.org/r/20250308100001...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk356x-base.dtsi b/arch/arm64/boot/dts/rockchip/rk356x-base.dtsi index de5e6c0c3d24..81e635620301 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x-base.dtsi @@ -174,6 +174,18 @@ method = "smc"; }; + reserved-mem...
778dc0f876c70b3d781a49981560ec88e1b7083a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm8750: Fix cluster hierarchy for idle states
Problem Details: SM8750 have two different clusters. cluster0 have CPU 0-5 as child and cluster1 have CPU 6-7 as child. Each cluster requires its own idle state and power domain in order to achieve complete domain sleep state. However only single cluster idle state is added mapping CPU 0-7 to the same power domain. Fi...
```diff diff --git a/arch/arm64/boot/dts/qcom/sm8750.dtsi b/arch/arm64/boot/dts/qcom/sm8750.dtsi index 798e1cf0bc96..735e7628df96 100644 --- a/arch/arm64/boot/dts/qcom/sm8750.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8750.dtsi @@ -236,53 +236,59 @@ cpu_pd0: power-domain-cpu0 { #power-domain-cells = <0>; - power-...
172320f5ead5d1a0eed14472ce84146221c75675
Analyze and fix the following issue in the Linux kernel code: clk: qcom: gdsc: Update the status poll timeout for GDSC
Problem Details: During the GDSC FSM state, the GDSC hardware waits for an ACK from the respective subsystem core. In some scenarios, this ACK can be delayed. To handle such delays, increase the GDSC status poll timeout from 1500us to 2000us as per the design recommendation. Signed-off-by: Taniya Das <quic_tdas@quicin...
```diff diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c index f3f95f4d9313..7deabf8400cf 100644 --- a/drivers/clk/qcom/gdsc.c +++ b/drivers/clk/qcom/gdsc.c @@ -46,7 +46,7 @@ #define RETAIN_MEM BIT(14) #define RETAIN_PERIPH BIT(13) -#define STATUS_POLL_TIMEOUT_US 1500 +#define STATUS_POLL_TIMEOUT_US...
25708f73ff171bb4171950c9f4be5aa8504b8459
Analyze and fix the following issue in the Linux kernel code: clk: qcom: gdsc: Set retain_ff before moving to HW CTRL
Problem Details: Enable the retain_ff_enable bit of GDSCR only if the GDSC is already ON. Once the GDSCR moves to HW control, SW no longer can determine the state of the GDSCR and setting the retain_ff bit could destroy all the register contents we intended to save. Therefore, move the retain_ff configuration before sw...
```diff diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c index 7687661491f1..f3f95f4d9313 100644 --- a/drivers/clk/qcom/gdsc.c +++ b/drivers/clk/qcom/gdsc.c @@ -292,6 +292,9 @@ static int gdsc_enable(struct generic_pm_domain *domain) */ udelay(1); + if (sc->flags & RETAIN_FF_ENABLE) + gdsc_retain_...
c87d58bc7f831bf3d887e6ec846246cb673c2e50
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: ipq9574: fix the msi interrupt numbers of pcie3
Problem Details: The MSI interrupt numbers of the PCIe3 controller are incorrect. Due to this, the functional bring up of the QDSP6 processor on the PCIe endpoint has failed. Correct the MSI interrupt numbers to properly bring up the QDSP6 processor on the PCIe endpoint. Fixes: d80c7fbfa908 ("arm64: dts: qcom: ipq9574...
```diff diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi index 04bfe1f3fa7a..4c5b8ca4812c 100644 --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi @@ -974,14 +974,14 @@ ranges = <0x01000000 0x0 0x00000000 0x18200000 0x0 0x100000>, ...
b4cd966edb2deb5c75fe356191422e127445b830
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: ipq9574: Add missing properties for cryptobam
Problem Details: num-channels and qcom,num-ees are required for BAM nodes without clock, because the driver cannot ensure the hardware is powered on when trying to obtain the information from the hardware registers. Specifying the node without these properties is unsafe and has caused early boot crashes for other SoCs ...
```diff diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi index cac58352182e..04bfe1f3fa7a 100644 --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi @@ -378,6 +378,8 @@ interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>; #dma-cells = <1>;...