On Mon, Sep 14, 2026 at 12:31:30PM +0530, Aneesh Kumar K.V (Arm) wrote: > diff --git a/arch/x86/include/asm/iommu.h b/arch/x86/include/asm/iommu.h > index 3be2451e7bc8..22c8190fe34d 100644 > --- a/arch/x86/include/asm/iommu.h > +++ b/arch/x86/include/asm/iommu.h > @@ -14,8 +14,10 @@ extern bool amd_iommu_snp_en; > > #ifdef CONFIG_SWIOTLB > extern bool x86_swiotlb_enable; > +extern unsigned int x86_swiotlb_flags; > #else > #define x86_swiotlb_enable false > +#define x86_swiotlb_flags 0 > #endif > > /* 10 seconds */ > diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c > index b5f1f031d45b..d0fbc0271e43 100644 > --- a/arch/x86/kernel/amd_gart_64.c > +++ b/arch/x86/kernel/amd_gart_64.c > @@ -814,6 +814,7 @@ int __init gart_iommu_init(void) > dma_ops = &gart_dma_ops; > x86_platform.iommu_shutdown = gart_iommu_shutdown; > x86_swiotlb_enable = false; > + x86_swiotlb_flags = 0;
I don't think the flags are still read anywhere after this function. gart_iommu_init() is called long after swiotlb_init(). So you can drop this and make x86_swiotlb_flags static in pci-dma.c. With this: Reviewed-by: Catalin Marinas <[email protected]>
