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 F07FCC433F5 for ; Sat, 2 Apr 2022 14:20:14 +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=YzReZXLK1zXsjipdKw9PSfMmSmo3TVdjQrHG0rG6OfM=; b=WmRvLUnY1mgkJL hub7iskJ47DveI3clCRST2JKZ0dQbdH1GKkojPsE77KiQlZVcrRZIMdUQlJW6qVGc3Q3zcWUdYdfO WRm4/D8e3TwiHani50CjtszwwnVa9seEA19i+aSWWE05zj1Cxrw+rnHuSoMx+bNeOm07h+KNAvtVu hewRcyme9EmOuP4sSeaT4yqSe3JBRvdufJMlQq7hNYaaV/EZQ3TGdZQxUM0q7Dc5Yft65YDVZ82Uc eriN44caZZ71HXZzZd+J+wHWBckLOsKGCCs4zjY0vcaHBIkFLQhiexb0FdYQ0IpZ43umy66SB7O2n IiTzh40DSprnc2XLrVlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1naeaq-009EDf-QI; Sat, 02 Apr 2022 14:19:08 +0000 Received: from soltyk.jannau.net ([144.76.91.90]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1naeH1-00950K-N9; Sat, 02 Apr 2022 13:58:41 +0000 Received: by soltyk.jannau.net (Postfix, from userid 1000) id B92FB26E7A7; Sat, 2 Apr 2022 15:58:34 +0200 (CEST) Date: Sat, 2 Apr 2022 15:58:34 +0200 From: Janne Grunau To: Sven Peter Cc: Arnd Bergmann , Keith Busch , "axboe@fb.com" , "hch@lst.de" , "sagi@grimberg.me" , Hector Martin , Alyssa Rosenzweig , Rob Herring , Marc Zyngier , DTML , Linux ARM , Linux Kernel Mailing List , linux-nvme@lists.infradead.org Subject: Re: [PATCH 6/9] nvme-apple: Add initial Apple SoC NVMe driver Message-ID: <20220402135834.GC10474@jannau.net> References: <20220321165049.35985-1-sven@svenpeter.dev> <20220321165049.35985-7-sven@svenpeter.dev> <7876eb84-9803-48dc-ab6b-27d49858e27a@www.fastmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7876eb84-9803-48dc-ab6b-27d49858e27a@www.fastmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220402_065839_946938_D54027D4 X-CRM114-Status: GOOD ( 14.75 ) 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 2022-04-02 15:34:55 +0200, Sven Peter wrote: > > > On Tue, Mar 22, 2022, at 14:38, Arnd Bergmann wrote: > > On Mon, Mar 21, 2022 at 5:50 PM Sven Peter wrote: > > > >> +static int apple_nvme_sart_dma_setup(void *cookie, struct apple_rtkit_shmem *bfr, > >> + dma_addr_t iova, size_t size) > >> +{ > >> + struct apple_nvme *anv = cookie; > >> + int ret; > >> + > >> + if (iova) > >> + return -EINVAL; > >> + > >> + bfr->buffer = dma_alloc_coherent(anv->dev, size, &iova, GFP_KERNEL); > >> + if (!bfr->buffer) > >> + return -ENOMEM; > > > > You pass 'iova' as an argument, but then replace it with the address > > returned by dma_alloc_coherent(). Can you remove the function > > argument? > > Yup, will remove it. You can remove it but we will have to add it back once we submit the dcp driver (display co-processor). dcp is initialized during boot and uses a single pre-allocated buffer which needs to be mapped instead of allocated. It seemed easier to make apple_rtkit_ops.shmem_setup() omnipotent than adding a different function pointer for this case. Janne _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel