Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'driver-core-6.19-rc7-deferred' into driver-core-next

Driver core fixes deferred from 6.19-rc7

[1, 2] were originally intended for -rc7. Patch [1] uncovered potential
deadlocks that require a few driver fixes; [2] is one such fix.

[1] https://patch.msgid.link/20260113162843.12712-1-hanguidong02@gmail.com
[2] https://patch.msgid.link/20260121141215.29658-1-dakr@kernel.org

Signed-off-by: Danilo Krummrich <dakr@kernel.org>

+63 -7
+9
drivers/base/base.h
··· 182 182 static inline int driver_match_device(const struct device_driver *drv, 183 183 struct device *dev) 184 184 { 185 + device_lock_assert(dev); 186 + 185 187 return drv->bus->match ? drv->bus->match(dev, drv) : 1; 188 + } 189 + 190 + static inline int driver_match_device_locked(const struct device_driver *drv, 191 + struct device *dev) 192 + { 193 + guard(device)(dev); 194 + return driver_match_device(drv, dev); 186 195 } 187 196 188 197 static inline void dev_sync_state(struct device *dev)
+1 -1
drivers/base/bus.c
··· 263 263 int err = -ENODEV; 264 264 265 265 dev = bus_find_device_by_name(bus, NULL, buf); 266 - if (dev && driver_match_device(drv, dev)) { 266 + if (dev && driver_match_device_locked(drv, dev)) { 267 267 err = device_driver_attach(drv, dev); 268 268 if (!err) { 269 269 /* success */
+1 -1
drivers/base/dd.c
··· 1180 1180 * is an error. 1181 1181 */ 1182 1182 1183 - ret = driver_match_device(drv, dev); 1183 + ret = driver_match_device_locked(drv, dev); 1184 1184 if (ret == 0) { 1185 1185 /* no match */ 1186 1186 return 0;
+14
drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
··· 228 228 229 229 return smmu; 230 230 } 231 + 232 + int __init arm_smmu_impl_module_init(void) 233 + { 234 + if (IS_ENABLED(CONFIG_ARM_SMMU_QCOM)) 235 + return qcom_smmu_module_init(); 236 + 237 + return 0; 238 + } 239 + 240 + void __exit arm_smmu_impl_module_exit(void) 241 + { 242 + if (IS_ENABLED(CONFIG_ARM_SMMU_QCOM)) 243 + qcom_smmu_module_exit(); 244 + }
+10 -4
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
··· 774 774 { 775 775 const struct device_node *np = smmu->dev->of_node; 776 776 const struct of_device_id *match; 777 - static u8 tbu_registered; 778 - 779 - if (!tbu_registered++) 780 - platform_driver_register(&qcom_smmu_tbu_driver); 781 777 782 778 #ifdef CONFIG_ACPI 783 779 if (np == NULL) { ··· 797 801 dev_name(smmu->dev)); 798 802 799 803 return smmu; 804 + } 805 + 806 + int __init qcom_smmu_module_init(void) 807 + { 808 + return platform_driver_register(&qcom_smmu_tbu_driver); 809 + } 810 + 811 + void __exit qcom_smmu_module_exit(void) 812 + { 813 + platform_driver_unregister(&qcom_smmu_tbu_driver); 800 814 }
+23 -1
drivers/iommu/arm/arm-smmu/arm-smmu.c
··· 2365 2365 .remove = arm_smmu_device_remove, 2366 2366 .shutdown = arm_smmu_device_shutdown, 2367 2367 }; 2368 - module_platform_driver(arm_smmu_driver); 2368 + 2369 + static int __init arm_smmu_init(void) 2370 + { 2371 + int ret; 2372 + 2373 + ret = platform_driver_register(&arm_smmu_driver); 2374 + if (ret) 2375 + return ret; 2376 + 2377 + ret = arm_smmu_impl_module_init(); 2378 + if (ret) 2379 + platform_driver_unregister(&arm_smmu_driver); 2380 + 2381 + return ret; 2382 + } 2383 + module_init(arm_smmu_init); 2384 + 2385 + static void __exit arm_smmu_exit(void) 2386 + { 2387 + arm_smmu_impl_module_exit(); 2388 + platform_driver_unregister(&arm_smmu_driver); 2389 + } 2390 + module_exit(arm_smmu_exit); 2369 2391 2370 2392 MODULE_DESCRIPTION("IOMMU API for ARM architected SMMU implementations"); 2371 2393 MODULE_AUTHOR("Will Deacon <will@kernel.org>");
+5
drivers/iommu/arm/arm-smmu/arm-smmu.h
··· 540 540 struct arm_smmu_device *nvidia_smmu_impl_init(struct arm_smmu_device *smmu); 541 541 struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu); 542 542 543 + int __init arm_smmu_impl_module_init(void); 544 + void __exit arm_smmu_impl_module_exit(void); 545 + int __init qcom_smmu_module_init(void); 546 + void __exit qcom_smmu_module_exit(void); 547 + 543 548 void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx); 544 549 int arm_mmu500_reset(struct arm_smmu_device *smmu); 545 550