From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CBB0C4332F for ; Tue, 8 Nov 2022 07:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gYuuywTdAjvZEthWI3+PEv0ArLmGT54rF726ds5HCAc=; b=EQxuLMcUpn9vPG N+1rYWNdozNujBjoa4fMJAN4rwr+VDqqX63tyMLAo4y/rPFp19aYwj0kQ8OSaASskFCB5olHljepq FBOz+2moaohdBkH8Ae7sXOKapPVf8JlyUoNRwrnMBnC2tADJemYVYv5AifzOSBd9MFq1okoWg+CR4 tg9duKz7fPYkSFIRn14AS2jUXxGL5lmrRkuMyeTthCf4NhZzBRG7B4G+8MyRK77ZAaQwJfwDWBYDa NeG2nZMbl/uhV2ij2ntdMc1cwXWFvZ8XJe3QKptwMaPKfA1BiPeKEOkKQ6OAxLyBDY0KhhZIDZuGP DMwZwZph21MRV6XZnciA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osJNF-003TwS-To; Tue, 08 Nov 2022 07:50:22 +0000 Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1osJNC-003TuZ-08 for linux-arm-kernel@lists.infradead.org; Tue, 08 Nov 2022 07:50:19 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id 5820E68AFE; Tue, 8 Nov 2022 08:50:13 +0100 (CET) Date: Tue, 8 Nov 2022 08:50:12 +0100 From: Christoph Hellwig To: Catalin Marinas Cc: Christoph Hellwig , Linus Torvalds , Arnd Bergmann , Greg Kroah-Hartman , Will Deacon , Marc Zyngier , Andrew Morton , Herbert Xu , Ard Biesheuvel , Isaac Manjarres , Saravana Kannan , Alasdair Kergon , Daniel Vetter , Joerg Roedel , Mark Brown , Mike Snitzer , "Rafael J. Wysocki" , Robin Murphy , linux-mm@kvack.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 03/13] iommu/dma: Force bouncing of the size is not cacheline-aligned Message-ID: <20221108075012.GA22830@lst.de> References: <20221106220143.2129263-1-catalin.marinas@arm.com> <20221106220143.2129263-4-catalin.marinas@arm.com> <20221107094603.GB6055@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221107_235018_203978_30C17DBB X-CRM114-Status: GOOD ( 14.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 07, 2022 at 10:54:36AM +0000, Catalin Marinas wrote: > An idea: we could add another member to struct scatterlist to track the > bounced address. We can then do the bouncing in a similar way to > iommu_dma_map_sg_swiotlb() but without the iova allocation. The latter > would be a common path for both the bounced and non-bounced cases. That would be a pretty massive memory overhead for an unusual case, so I'd rather avoid it. In addition to the long term plan of doing DMA mappings without a scatterlist.. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel