[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220402135834.GC10474@jannau.net>
Date: Sat, 2 Apr 2022 15:58:34 +0200
From: Janne Grunau <j@...nau.net>
To: Sven Peter <sven@...npeter.dev>
Cc: Arnd Bergmann <arnd@...db.de>, Keith Busch <kbusch@...nel.org>,
"axboe@...com" <axboe@...com>, "hch@....de" <hch@....de>,
"sagi@...mberg.me" <sagi@...mberg.me>,
Hector Martin <marcan@...can.st>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
Rob Herring <robh+dt@...nel.org>,
Marc Zyngier <maz@...nel.org>,
DTML <devicetree@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-nvme@...ts.infradead.org
Subject: Re: [PATCH 6/9] nvme-apple: Add initial Apple SoC NVMe driver
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 <sven@...npeter.dev> 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
Powered by blists - more mailing lists