[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b9f2b425-dde9-f9a1-b8fa-b7710e764b16@nxp.com>
Date: Thu, 25 Apr 2019 11:30:54 +0000
From: Laurentiu Tudor <laurentiu.tudor@....com>
To: Christoph Hellwig <hch@....de>
CC: "robin.murphy@....com" <robin.murphy@....com>,
"m.szyprowski@...sung.com" <m.szyprowski@...sung.com>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
Leo Li <leoyang.li@....com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] dma-mapping: create iommu mapping for newly allocated
dma coherent mem
Hi Christoph,
On 24.04.2019 17:57, Christoph Hellwig wrote:
> I'd be happy to offload all of the mentioned tasks to you if you
> volunteer.
Alright, I think I mostly got it and can start with the two usb drivers
you mentioned. Just need a few clarifications, please see inline.
> I think the first step is to move the two USB controller that can only
> DMA to their own BAR off the existing DMA coherent infrastructure. The
> controllers are already identified using the HCD_LOCAL_MEM flag, so we
> just need to key off that in the hcd_buffer_* routines and call into a
So if HCD_LOCAL_MEM is set I should call into the gen_pool api instead
of existing dma_{alloc,free}_coherent().
> genalloc that has been fed using the bar, replacing the current
> dma_declare_coherent usage. Take a look at drivers/pci/p2pdma.c
> for another example of allocating bits of a BAR using genalloc.
Where should I place the reference to the gen_pool? How does local_pool
in 'struct hcd_usb' sound?
---
Thanks & Best Regards, Laurentiu
Powered by blists - more mailing lists