From: Joerg Roedel Date: Fri, 23 May 2025 15:14:32 +0000 (+0200) Subject: Merge branches 'fixes', 'apple/dart', 'arm/smmu/updates', 'arm/smmu/bindings', 'fsl... X-Git-Tag: v6.16-rc1~110^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=879b141b7cfa09763f932f15f19e9bc0bcb020d5;p=thirdparty%2Fkernel%2Flinux.git Merge branches 'fixes', 'apple/dart', 'arm/smmu/updates', 'arm/smmu/bindings', 'fsl/pamu', 'mediatek', 'renesas/ipmmu', 's390', 'intel/vt-d', 'amd/amd-vi' and 'core' into next --- 879b141b7cfa09763f932f15f19e9bc0bcb020d5 diff --cc drivers/dma/idxd/init.c index 760b7d81fcd84,fca1d29249998,fca1d29249998,fca1d29249998,fca1d29249998,fca1d29249998,fca1d29249998,fca1d29249998,fca1d29249998,fca1d29249998,fca1d29249998,9e739a4d1ecd5..80355d03004db --- a/drivers/dma/idxd/init.c +++ b/drivers/dma/idxd/init.c @@@@@@@@@@@@@ -1320,12 -1245,20 -1245,20 -1245,20 -1245,20 -1245,20 -1245,20 -1245,20 -1245,20 -1245,20 -1245,20 -1216,18 +1291,12 @@@@@@@@@@@@@ static void idxd_remove(struct pci_dev get_device(idxd_confdev(idxd)); device_unregister(idxd_confdev(idxd)); idxd_shutdown(pdev); ----------- if (device_pasid_enabled(idxd)) ----------- idxd_disable_system_pasid(idxd); idxd_device_remove_debugfs(idxd); ----------- ----------- irq_entry = idxd_get_ie(idxd, 0); ----------- free_irq(irq_entry->vector, irq_entry); ----------- pci_free_irq_vectors(pdev); +++++++++++ idxd_cleanup(idxd); pci_iounmap(pdev, idxd->reg_base); ---------- if (device_user_pasid_enabled(idxd)) ---------- idxd_disable_sva(pdev); ----------- pci_disable_device(pdev); ----------- destroy_workqueue(idxd->wq); ----------- perfmon_pmu_remove(idxd); put_device(idxd_confdev(idxd)); +++++++++++ idxd_free(idxd); +++++++++++ pci_disable_device(pdev); } static struct pci_driver idxd_pci_driver = { diff --cc drivers/iommu/amd/init.c index 14aa0d77df26d,14aa0d77df26d,dd9e26b7b7184,dd9e26b7b7184,dd9e26b7b7184,dd9e26b7b7184,dd9e26b7b7184,dd9e26b7b7184,dd9e26b7b7184,dd9e26b7b7184,acf8941e1ed3d,df1094893eb0d..c06b62f87b9bc --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@@@@@@@@@@@@ -243,19 -243,19 -243,19 -243,19 -243,19 -243,19 -243,19 -243,19 -243,19 -243,19 -243,24 -243,11 +243,16 @@@@@@@@@@@@@ static void init_translation_status(str iommu->flags |= AMD_IOMMU_FLAG_TRANS_PRE_ENABLED; } ----------- static inline unsigned long tbl_size(int entry_size, int last_bdf) - { - unsigned shift = PAGE_SHIFT + - get_order((last_bdf + 1) * entry_size); - - return 1UL << shift; - } - ++++++++++ int amd_iommu_get_num_iommus(void) { ---------- unsigned shift = PAGE_SHIFT + ---------- get_order((last_bdf + 1) * entry_size); ---------- ---------- return 1UL << shift; ++++++++++ return amd_iommus_present; } ---------- int amd_iommu_get_num_iommus(void) ++++++++++ +bool amd_iommu_ht_range_ignore(void) +{ ---------- return amd_iommus_present; ++++++++++ + return check_feature2(FEATURE_HT_RANGE_IGNORE); +} + /* * Iterate through all the IOMMUs to get common EFR * masks among all IOMMUs and warn if found inconsistency. diff --cc drivers/iommu/intel/nested.c index 6ac5c534bef43,6ac5c534bef43,6ac5c534bef43,6ac5c534bef43,6ac5c534bef43,6ac5c534bef43,6ac5c534bef43,6ac5c534bef43,6ac5c534bef43,1e149169ee77b,6ac5c534bef43,d2a94025d0a00..fc312f649f9ef --- a/drivers/iommu/intel/nested.c +++ b/drivers/iommu/intel/nested.c @@@@@@@@@@@@@ -59,9 -59,9 -59,9 -59,9 -59,9 -59,9 -59,9 -59,9 -59,9 -58,10 -59,9 -63,9 +62,10 @@@@@@@@@@@@@ static int intel_nested_attach_dev(stru ret = intel_pasid_setup_nested(iommu, dev, IOMMU_NO_PASID, dmar_domain); if (ret) ----------- goto unassign_tag; +++++++++++ goto disable_iopf; info->domain = dmar_domain; +++++++++ ++ info->domain_attached = true; spin_lock_irqsave(&dmar_domain->lock, flags); list_add(&info->link, &dmar_domain->devices); spin_unlock_irqrestore(&dmar_domain->lock, flags); diff --cc drivers/iommu/io-pgtable-arm.c index 7632c80edea63,7632c80edea63,7632c80edea63,64db457371ece,7632c80edea63,7632c80edea63,7632c80edea63,7632c80edea63,7632c80edea63,7632c80edea63,7632c80edea63,bbd42323c0290..96425e92f3135 --- a/drivers/iommu/io-pgtable-arm.c +++ b/drivers/iommu/io-pgtable-arm.c @@@@@@@@@@@@@ -1437,11 -1437,11 -1437,11 -1437,12 -1437,11 -1437,11 -1437,11 -1437,11 -1437,11 -1437,11 -1437,11 -1442,13 +1442,14 @@@@@@@@@@@@@ static int __init arm_lpae_do_selftests struct io_pgtable_cfg cfg = { .tlb = &dummy_tlb_ops, .coherent_walk = true, ----------- .iommu_dev = &dev, +++ ++++++++ .quirks = IO_PGTABLE_QUIRK_NO_WARN, }; ----------- /* __arm_lpae_alloc_pages() merely needs dev_to_node() to work */ ----------- set_dev_node(&dev, NUMA_NO_NODE); +++++++++++ dev = faux_device_create("io-pgtable-test", NULL, 0); +++++++++++ if (!dev) +++++++++++ return -ENOMEM; +++++++++++ +++++++++++ cfg.iommu_dev = &dev->dev; for (i = 0; i < ARRAY_SIZE(pgsize); ++i) { for (j = 0; j < ARRAY_SIZE(address_size); ++j) {