Re: [PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset

2020-10-26 Thread Geert Uytterhoeven
Hi Christoph, Jim, On Wed, Sep 16, 2020 at 8:30 AM Christoph Hellwig wrote: > From: Jim Quinlan > > The new field 'dma_range_map' in struct device is used to facilitate the > use of single or multiple offsets between mapping regions of cpu addrs and > dma addrs. It subsumes the role of "dev->dm

Re: [PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset

2020-09-16 Thread Mathieu Poirier
On Wed, Sep 16, 2020 at 08:14:59AM +0200, Christoph Hellwig wrote: > From: Jim Quinlan > > The new field 'dma_range_map' in struct device is used to facilitate the > use of single or multiple offsets between mapping regions of cpu addrs and > dma addrs. It subsumes the role of "dev->dma_pfn_offs

[PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset

2020-09-15 Thread Christoph Hellwig
From: Jim Quinlan The new field 'dma_range_map' in struct device is used to facilitate the use of single or multiple offsets between mapping regions of cpu addrs and dma addrs. It subsumes the role of "dev->dma_pfn_offset" which was only capable of holding a single uniform offset and had no regi

Re: [PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset

2020-09-15 Thread Christoph Hellwig
On Tue, Sep 15, 2020 at 01:55:01PM -0600, Mathieu Poirier wrote: > That did the trick - the stm32 platform driver's probe() function completes > and > the remote processor is operatinal. > > That being said the value returned by function dma_to_pfn() > is 0x137fff in the original code and 0x

Re: [PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset

2020-09-15 Thread Mathieu Poirier
On Tue, Sep 15, 2020 at 07:41:22AM +0200, Christoph Hellwig wrote: > On Mon, Sep 14, 2020 at 05:01:47PM -0600, Mathieu Poirier wrote: > > [700 lines of the fullquote deleted..] > > > > + for (r = map; r->size; r++) > > > + num_ranges++; > > > + > > > + new_map = kmemdup(map, array_size(nu

Re: [PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset

2020-09-14 Thread Christoph Hellwig
On Mon, Sep 14, 2020 at 05:01:47PM -0600, Mathieu Poirier wrote: [700 lines of the fullquote deleted..] > > + for (r = map; r->size; r++) > > + num_ranges++; > > + > > + new_map = kmemdup(map, array_size(num_ranges + 1, sizeof(*map)), > > + GFP_KERNEL); > > + i

Re: [PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset

2020-09-14 Thread Mathieu Poirier
Hi Christoph, On Mon, Sep 14, 2020 at 09:33:43AM +0200, Christoph Hellwig wrote: > From: Jim Quinlan > > The new field 'dma_range_map' in struct device is used to facilitate the > use of single or multiple offsets between mapping regions of cpu addrs and > dma addrs. It subsumes the role of "de

[PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset

2020-09-14 Thread Christoph Hellwig
From: Jim Quinlan The new field 'dma_range_map' in struct device is used to facilitate the use of single or multiple offsets between mapping regions of cpu addrs and dma addrs. It subsumes the role of "dev->dma_pfn_offset" which was only capable of holding a single uniform offset and had no regi