linux/drivers/iommu/intel
Jason Gunthorpe 9785df3fd6 iommu/vt-d: Simplify calculate_psi_aligned_address()
This is doing far too much math for the simple task of finding a
power of 2 that fully spans the given range. Use fls directly on
the xor which computes the common binary prefix.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/0-v2-895748900b39+5303-iommupt_inv_vtd_jgg@nvidia.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2026-05-19 10:38:19 +02:00
..
cache.c iommu/vt-d: Simplify calculate_psi_aligned_address() 2026-05-19 10:38:19 +02:00
debugfs.c iommu/vt-d: Remove dmar_readl() and dmar_readq() 2026-04-02 09:26:05 +02:00
dmar.c Merge branches 'fixes', 'arm/smmu/updates', 'arm/smmu/bindings', 'riscv', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2026-04-09 13:18:27 +01:00
iommu.c iommu/vt-d: Avoid NULL pointer dereference or refcount corruption 2026-05-11 10:19:37 +02:00
iommu.h iommu/vt-d: Pass size_order to qi_desc_piotlb() not npages 2026-04-02 09:26:08 +02:00
irq_remapping.c iommu/vt-d: Remove dmar_writel() and dmar_writeq() 2026-04-02 09:26:06 +02:00
Kconfig Merge branches 'arm/smmu/updates', 'arm/smmu/bindings', 'mediatek', 'nvidia/tegra', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2025-11-28 08:44:21 +01:00
Makefile iommu: make inclusion of intel directory conditional 2025-05-16 08:46:46 +02:00
nested.c iommu/vt-d: Support dirty tracking on PASID 2026-04-02 09:26:05 +02:00
pasid.c iommu/vt-d: Split piotlb invalidation into range and all 2026-04-02 09:26:07 +02:00
pasid.h Merge branches 'fixes', 'arm/smmu/updates', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2026-02-06 11:10:40 +01:00
perf.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
perf.h iommu/vt-d: Replace snprintf with scnprintf in dmar_latency_snapshot() 2025-09-19 09:43:19 +02:00
perfmon.c iommu/vt-d: Remove dmar_writel() and dmar_writeq() 2026-04-02 09:26:06 +02:00
perfmon.h iommu/vt-d: Add IOMMU perfmon support 2023-02-03 11:06:06 +01:00
prq.c iommu/vt-d: Split piotlb invalidation into range and all 2026-04-02 09:26:07 +02:00
svm.c iommu/vt-d: Only handle IOPF for SVA when PRI is supported 2026-03-17 13:20:06 +01:00
trace.c iommu/vt-d: Move trace/events/intel_iommu.h under iommu 2022-07-15 10:21:28 +02:00
trace.h iommu/vt-d: Remove the remaining pages along the invalidation path 2026-04-02 09:26:08 +02:00