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 EB39CEB64DA for ; Wed, 28 Jun 2023 11:03:19 +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=Ryb/t4eyYl8Ymc4tOveNEUgYWrXKM9OciZWHAQ/F7xA=; b=352rLFYETRGE0a htQNVMFvMA9gV/sJwTDXx9elBw3mFR+i/SQ1dl7z3B2No15eyH6ozec6lZHRWCo94hh3F2E4PipM8 SC4T8CWxn6+9g7jmvkPKJ2J6qXCL4gytRY+NMmeKi6pfl9rCBRwVcPeTwZm82RpLBziK2QaZXBTRD oNnHg2WMloiq+O3XG9Gx6Um4RWsEqswlHyV/RI+v2llgJ+y22HGERokNphhcgUCMiXaKlk2shxlnf FNnEB4LXmva1xINAHtk3lhjvbvrSCbtYMDjPe197vduDCN3chUg4KmNmL1Dtf7Xhi/XSOE81U+1np F3KGQoyXaPpRy/7ITJog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qESwr-00FXHT-0Q; Wed, 28 Jun 2023 11:02:57 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qESwo-00FXDW-15 for linux-arm-kernel@lists.infradead.org; Wed, 28 Jun 2023 11:02:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=OjshFGISJ/qtJIee/CUzi6GtoPX/MHew0Bsta1Jvsfg=; b=yn0gV3wpaCQWMUh0Fg/AzYfxb8 6CISsIPZMNCkKVee+RyGOVprK1JXROr/VAxH19hDNag82NfTUu+CWo29Lu2glfhOT/W/q0o+wia6e tCTq+4fmjwJttF0lwZx8P7I9TKY9iqvezVEcbGpCWhFr/eACeS+Tlk1xWKnerPmuLbNJrELtnB0dU h7aD1F1EJ0BJmwXcCTrMXXJacDrphakL+79zrUJIDkyRdMe6Fb7eTjsshEHCcGEaRot/84LRsF0Wo wxbgssq+qA1w7D4nKvZ1Yirexug/goORl42ceb7pxCav+hJXhPHNWLjKixAp7YNJBeUeRA4Xx9YJD SmSLPDxQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:57630) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qESwi-0007CA-37; Wed, 28 Jun 2023 12:02:50 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qESwi-0006hD-0w; Wed, 28 Jun 2023 12:02:48 +0100 Date: Wed, 28 Jun 2023 12:02:47 +0100 From: "Russell King (Oracle)" To: Li Chen Cc: dmaengine , linux-arm-kernel , linux-kernel , Arnd Bergmann Subject: Re: Should dma_map_single take the dma controller or its consumer as an argument? Message-ID: References: <18901a6cbf0.c9e3e099688173.4166132371304083225@linux.beauty> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <18901a6cbf0.c9e3e099688173.4166132371304083225@linux.beauty> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230628_040254_374719_2F7D3EEC X-CRM114-Status: GOOD ( 11.55 ) 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 Wed, Jun 28, 2023 at 06:57:35PM +0800, Li Chen wrote: > Hi all, > > I recently encountered an issue where the dma_mask was set in the DMA controller's driver, but the consumer peripheral driver didn't set its own dma_mask. It should always take the device that is *actually* performing the DMA, since that is the device that has restrictions on what addresses can be accessed, etc. Devices that "consume" the data from a DMA controller don't access memory - they are merely the targets, and they can't on their own access host memory. Therefore, their dma mask _should_ be irrelevant. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel