Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp769891pxu; Mon, 23 Nov 2020 03:51:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyShOPzk+1TxS8FpqMmTS+Ryca9k14MO2zDYe1+gnY8t82pOEPEKBac2C+aS6eM3XvqDM/K X-Received: by 2002:a50:8562:: with SMTP id 89mr21938134edr.144.1606132260470; Mon, 23 Nov 2020 03:51:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606132260; cv=none; d=google.com; s=arc-20160816; b=U2lXa8x3n1TfKYkTZUrgVvg61H6T9UnlxR61YxS2e8f8QHG+gEzfxGxfPcPUOd66N7 4O9j1BBwbDcsq90rDhd4PqDvRXtylPC7A1GE3WtRzive41ahFA8u+a4Nl+Ev+M1ECQPA yxPZ+6R1TWgHkvfZ1p5y4bIJ68YKcznAsKllbbMti7e3pbvzThAnzs79j/SvBNkjbGQt bwNaqnM7b3an8Z8oDtTgrmkOh8Knn687EYl/EOIFyarSch69WnWKy1hp46iN7+pY9jOo ekBLGbDw+BXB3A4eTExE5urbTlewrOigfjKO6tzT3YD/N5dIJWGAwvhzQQiH2MIrtwTv p03Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GLCqnLciY8SF+ksraiVSSiR6Kk1n7esNMd5LbK34nMQ=; b=pJxu0jB2hapjyAI8jsROIzDt0YxinlXhV/s3dtcPzazzkf2bEcLbvyCSFWkhw6QXBY mG/NR3FZBEodK+vx7/M9/EMJ6yw31IvN7s8UyqbwNajm3/OYzxsOfmWQZUtSHKSbXAXH R83c4alpFH+fTK7HKA7k4TBeQj6GkhCadp6kdWIqHp52njz9QxyFaB+hV7/sVDUT4vc+ L1GfFUlaFua4CKLJqxXQ9AQpMuWUdBN8IiFdoee+ki7o3KX7CDtULWIdUfVGPYmVMMeH BDPgLOeOshhJZgILCUKs755NN11+tKq6hpRNU3L5O03qj2hhYn2SXWhxrMoAQCOf0rtE YjkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fS2ygnXR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca10si6183902ejb.587.2020.11.23.03.50.36; Mon, 23 Nov 2020 03:51:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fS2ygnXR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728792AbgKWLrM (ORCPT + 99 others); Mon, 23 Nov 2020 06:47:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:54070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726529AbgKWLrM (ORCPT ); Mon, 23 Nov 2020 06:47:12 -0500 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A24C82074B; Mon, 23 Nov 2020 11:47:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606132031; bh=2PtTmOJEIKueGGOEndNNTAvxa8jv28ItaoA+w5cJ7ok=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fS2ygnXRKaVKl4yrUEJ1wu6gxcKFF9B8z1SqnqIBryRZo8H3iMw8c/PuRyGBRVI4s Gkull3LJtsdvMhMitK/U+14Nivs7X3Og57TUZ5utLIEpOuw8cEy4sSibAXSeOSK0BF x9jmfc8UdRdBxKuq4H5+wxRwysi8KA/rB6mtk1ds= Date: Mon, 23 Nov 2020 11:47:06 +0000 From: Will Deacon To: Lu Baolu Cc: Christoph Hellwig , Joerg Roedel , Tom Murphy , David Woodhouse , Ashok Raj , Tvrtko Ursulin , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Logan Gunthorpe Subject: Re: [PATCH v5 3/7] iommu: Allow the dma-iommu api to use bounce buffers Message-ID: <20201123114705.GA10233@willie-the-truck> References: <20201120101719.3172693-1-baolu.lu@linux.intel.com> <20201120101719.3172693-4-baolu.lu@linux.intel.com> <20201123100816.GA26619@infradead.org> <73ac6a6b-ede9-b306-6d8f-c73f22e1e8e3@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <73ac6a6b-ede9-b306-6d8f-c73f22e1e8e3@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 23, 2020 at 07:40:57PM +0800, Lu Baolu wrote: > On 2020/11/23 18:08, Christoph Hellwig wrote: > > > + /* > > > + * If both the physical buffer start address and size are > > > + * page aligned, we don't need to use a bounce page. > > > + */ > > > + if (IS_ENABLED(CONFIG_SWIOTLB) && dev_is_untrusted(dev) && > > > + iova_offset(iovad, phys | org_size)) { > > > + aligned_size = iova_align(iovad, org_size); > > > + phys = swiotlb_tbl_map_single(dev, > > > + phys_to_dma(dev, io_tlb_start), > > > + phys, org_size, aligned_size, dir, attrs); > > > > swiotlb_tbl_map_single takes one less argument in 5.10-rc now. > > > > Yes. But Will's iommu/next branch is based on 5.10-rc3. I synced with > him, we agreed to keep it 5.10-rc3 and resolve this conflict when > merging it. That's right, although I failed to appreciate the conflict was due to a change in function prototype rather than just a context collision. So I've updated the vt-d branch to contain the stuff fron Konrad: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/log/?h=for-next/iommu/vt-d Sorry for messing you around! Will