From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5CF833F8B4; Thu, 17 Sep 2026 14:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789656481; cv=none; b=l1UEtzyRsGvYFs7X3QahOib8dQRq7F040aq2ukyC2tuueDf4/ky7SHRiF2c6E1kSx/wBYCNdo1OGE+J7QyBNaVwE7xbZXZITHSJZyeGk9Juc80mOpPOpAyaaNQ3e2ArsuzU3+ofqAaWJg9UppET0bsN3n96k7h2eB85EhrQW1/0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789656481; c=relaxed/simple; bh=M6L3gDgo7kZ+fxTWrN1ZIsrMlAv/aP6jh31bZohJ0Rs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qDj/zHG7vH2dJmHTN0/wWlErUZoSHlK8GwgAv/bvDQKom3NO7kxQOagQXUQ4LpSm/r829tPV/40m6njmvqWbXbPIH/y5dwE5PeLnZgxRE5nY08ZEIVnKXOz+cE1MxUAni7T5fuP690OqLAB6C07TNHqvPMP53w4Ve4b8VR5i15M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=FfOzLZ+3; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="FfOzLZ+3" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 52F5B1476; Thu, 17 Sep 2026 07:47:42 -0700 (PDT) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 011E03F86F; Thu, 17 Sep 2026 07:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1789656465; bh=M6L3gDgo7kZ+fxTWrN1ZIsrMlAv/aP6jh31bZohJ0Rs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FfOzLZ+3Qia0W7RivVKaHNN7ieAHkjlQ0vn4TRTzuF7z8OiKjJ/k086OfMvanwLe4 ELpOh1p5+42rsPtfbx27NAQlMXC2xMiCbIVs5xTJrXk64zRBISqHGguvSJA4aBz7vA RLAIQplJPf8iM7ccnFiG8UpvaheI8Ih5+YH3OgPE= Date: Thu, 17 Sep 2026 15:47:37 +0100 From: Catalin Marinas To: "Aneesh Kumar K.V (Arm)" Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Robin Murphy , Marek Szyprowski , Will Deacon , Marc Zyngier , Steven Price , Suzuki K Poulose , Jiri Pirko , Jason Gunthorpe , Mostafa Saleh , Petr Tesarik , Alexey Kardashevskiy , Dan Williams , Xu Yilun , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , Russell King , Huacai Chen , Thomas Bogendoerfer , Jiaxun Yang , Paul Walmsley , Palmer Dabbelt , Albert Ou , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v4 1/5] dma: swiotlb: Centralize default pool policy selection Message-ID: References: <20260914070135.313337-1-aneesh.kumar@kernel.org> <20260914070135.313337-2-aneesh.kumar@kernel.org> Precedence: bulk X-Mailing-List: loongarch@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260914070135.313337-2-aneesh.kumar@kernel.org> 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