Re: [PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-09-09 Thread Jim Quinlan
/git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-ranges.2 > Tested-by: Jim Quinlan > Note that we'll still need to sort out the arm/keystone warnings from > the original patch. Do we have anyone on the CC list who knows that > platform a little better to figure out if

Re: [PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-09-08 Thread Jim Quinlan
On Mon, Sep 7, 2020 at 11:01 AM Nicolas Saenz Julienne wrote: > > Hi Jim, sorry I'm a little late to the party, but was on vacation. > > On Thu, 2020-09-03 at 13:32 -0400, Jim Quinlan wrote: > > On Wed, Sep 2, 2020 at 8:52 PM Nathan Chancellor > > wrote: > > > O

Re: [PATCH v11 00/11] PCI: brcmstb: enable PCIe for STB chips

2020-09-08 Thread Jim Quinlan
On Mon, Sep 7, 2020 at 5:16 AM Lorenzo Pieralisi wrote: > > On Thu, Aug 27, 2020 at 09:29:59AM -0400, Jim Quinlan wrote: > > On Thu, Aug 27, 2020 at 2:35 AM Christoph Hellwig wrote: > > > > > > On Tue, Aug 25, 2020 at 10:40:27AM -0700, Florian Fainelli wrote: >

Re: [PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-09-04 Thread Jim Quinlan
EBUG by any > > chance? > > Of course. A new log is attached with the debug output from that config. Hi Nicolas, Can you please help us out here? It appears that your commit 3d2cbb644836 "ARM: dts: bcm2711: Move emmc2 into its own bus" added the following line to the bcm27

Re: [PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-09-03 Thread Jim Quinlan
es. A real change is that I changed the > prototype for dma_copy_dma_range_map to require less boilerplate code. > > The result is here: > > > http://git.infradead.org/users/hch/dma-mapping.git/commitdiff/eef520b232c60e74eb8b33a5a7863ad8f2b4a5c7 > > please double check that e

Re: [PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-09-03 Thread Jim Quinlan
On Wed, Sep 2, 2020 at 5:53 PM Nathan Chancellor wrote: > > On Mon, Aug 24, 2020 at 03:30:20PM -0400, Jim Quinlan wrote: > > 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

Re: [PATCH v11 00/11] PCI: brcmstb: enable PCIe for STB chips

2020-08-28 Thread Jim Quinlan
On Thu, Aug 27, 2020 at 2:35 AM Christoph Hellwig wrote: > > On Tue, Aug 25, 2020 at 10:40:27AM -0700, Florian Fainelli wrote: > > Hi, > > > > On 8/24/2020 12:30 PM, Jim Quinlan wrote: > >> > >> Patchset Summary: > >>Enhance a PCIe hos

Re: [PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-08-26 Thread Jim Quinlan
Hi Andy, On Tue, Aug 25, 2020 at 5:54 AM Andy Shevchenko wrote: > > On Mon, Aug 24, 2020 at 03:30:20PM -0400, Jim Quinlan wrote: > > 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

[PATCH v11 00/11] PCI: brcmstb: enable PCIe for STB chips

2020-08-25 Thread Jim Quinlan
g needed for the PCIe driver to work [1]. There have been many changes to the DMA and OF subsystems since that time, making a cleaner and less intrusive patchset possible. This patchset implements a generalization of "dev->dma_pfn_offset", except that instead of a single scalar o

[PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-08-25 Thread Jim Quinlan
, cpu_addr, dma_addr, size). Signed-off-by: Jim Quinlan --- arch/arm/include/asm/dma-mapping.h| 10 +-- arch/arm/mach-keystone/keystone.c | 17 +++-- arch/sh/drivers/pci/pcie-sh7786.c | 9 +-- arch/x86/pci/sta2x11-fixup.c | 7 +-

Re: [PATCH RESEND v10 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-08-21 Thread Jim Quinlan
Hi Anday, On Tue, Aug 18, 2020 at 4:14 AM Andy Shevchenko wrote: > > On Mon, Aug 17, 2020 at 05:53:09PM -0400, Jim Quinlan wrote: > > 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

[PATCH RESEND v10 00/11] PCI: brcmstb: enable PCIe for STB chips

2020-08-18 Thread Jim Quinlan
possible. This patchset implements a generalization of "dev->dma_pfn_offset", except that instead of a single scalar offset it provides for multiple offsets via a function which depends upon the "dma-ranges" property of the PCIe host controller. This is required for pr

[PATCH RESEND v10 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-08-18 Thread Jim Quinlan
, cpu_addr, dma_addr, size). Signed-off-by: Jim Quinlan --- arch/arm/include/asm/dma-mapping.h| 10 +-- arch/arm/mach-keystone/keystone.c | 17 +++-- arch/sh/drivers/pci/pcie-sh7786.c | 9 +-- arch/sh/kernel/dma-coherent.c | 15 ++-- ar

[PATCH v10 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-08-04 Thread Jim Quinlan
, cpu_addr, dma_addr, size). Signed-off-by: Jim Quinlan --- arch/arm/include/asm/dma-mapping.h| 10 +-- arch/arm/mach-keystone/keystone.c | 17 +++-- arch/sh/drivers/pci/pcie-sh7786.c | 9 +-- arch/sh/kernel/dma-coherent.c | 15 ++-- ar

Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-08-04 Thread Jim Quinlan
On Sat, Aug 1, 2020 at 1:17 PM Nicolas Saenz Julienne wrote: > > Hi Jim, here's some comments after testing your series against RPi4. > > On Fri, 2020-07-24 at 16:33 -0400, Jim Quinlan wrote: > > The new field 'dma_range_map' in struct device is used to facilitate the

[PATCH v10 00/11] PCI: brcmstb: enable PCIe for STB chips

2020-08-04 Thread Jim Quinlan
possible. This patchset implements a generalization of "dev->dma_pfn_offset", except that instead of a single scalar offset it provides for multiple offsets via a function which depends upon the "dma-ranges" property of the PCIe host controller. This is required for pr

Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-31 Thread Jim Quinlan
On Thu, Jul 30, 2020 at 1:05 PM Nicolas Saenz Julienne wrote: > > Hi Jim, > > On Fri, 2020-07-24 at 16:33 -0400, Jim Quinlan wrote: > > static void __init of_unittest_pci_dma_ranges(void) > > diff --git a/drivers/pci/controller/pcie-brcmstb.c > > b/drivers

Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-31 Thread Jim Quinlan
On Wed, Jul 29, 2020 at 10:28 AM Rob Herring wrote: > > On Wed, Jul 29, 2020 at 12:19 AM Christoph Hellwig wrote: > > > > On Tue, Jul 28, 2020 at 02:24:51PM -0400, Jim Quinlan wrote: > > > I started using devm_kcalloc() but at least two reviewers convinced m

Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-30 Thread Jim Quinlan
On Wed, Jul 29, 2020 at 2:19 AM Christoph Hellwig wrote: > > On Tue, Jul 28, 2020 at 02:24:51PM -0400, Jim Quinlan wrote: > > I started using devm_kcalloc() but at least two reviewers convinced me > > to just use kcalloc(). In addition, when I was using devm_kcalloc() > >

Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-28 Thread Jim Quinlan
On Tue, Jul 28, 2020 at 11:05 AM Rob Herring wrote: > > On Fri, Jul 24, 2020 at 2:45 PM Jim Quinlan > wrote: > > > > The new field 'dma_range_map' in struct device is used to facilitate the > > use of single or multiple offsets between mapping regions of

Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-28 Thread Jim Quinlan
it to the dma-mapping > tree and just fix up the nitpicks. Whatever you think is best -- I would be quite happy if you could accept at least the "dma_range_map" commit. Of course I'd be most happy if the entire patchset were accepted, but perhaps you can just apply th

[PATCH v9 00/12] PCI: brcmstb: enable PCIe for STB chips

2020-07-26 Thread Jim Quinlan
1]. There have been many changes to the DMA and OF subsystems since that time, making a cleaner and less intrusive patchset possible. This patchset implements a generalization of "dev->dma_pfn_offset", except that instead of a single scalar offset it provides for multiple offsets via a functi

[PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-26 Thread Jim Quinlan
, cpu_addr, dma_addr, size). Signed-off-by: Jim Quinlan --- arch/arm/include/asm/dma-mapping.h| 10 +-- arch/arm/mach-keystone/keystone.c | 17 +++-- arch/sh/drivers/pci/pcie-sh7786.c | 9 +-- arch/sh/kernel/dma-coherent.c | 15 ++-- ar

Re: [PATCH v8 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-23 Thread Jim Quinlan
On Tue, Jul 21, 2020 at 8:51 AM Christoph Hellwig wrote: > > On Wed, Jul 15, 2020 at 10:35:11AM -0400, Jim Quinlan wrote: > > 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

[PATCH v8 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-16 Thread Jim Quinlan
, cpu_addr, dma_addr, size). Signed-off-by: Jim Quinlan --- arch/arm/include/asm/dma-mapping.h| 9 +- arch/arm/mach-keystone/keystone.c | 17 ++-- arch/sh/drivers/pci/pcie-sh7786.c | 9 +- arch/sh/kernel/dma-coherent.c | 16 ++-- ar

[PATCH v8 00/12] PCI: brcmstb: enable PCIe for STB chips

2020-07-16 Thread Jim Quinlan
possible. This patchset implements a generalization of "dev->dma_pfn_offset", except that instead of a single scalar offset it provides for multiple offsets via a function which depends upon the "dma-ranges" property of the PCIe host controller. This is required for proper functio

Re: [PATCH v7 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-10 Thread Jim Quinlan
Hi Christoph, I'm sending all commits to since most of them are PCI related. I don't send all patches to linux-ker...@vger.kernel.org since I've read it is overused. The --cc list is generated by get_maintainer.pl. IIRC, in a previous discussion you said you preferred NOT to get the entire

[PATCH v7 00/12] PCI: brcmstb: enable PCIe for STB chips

2020-07-09 Thread Jim Quinlan
f "dev->dma_pfn_offset", except that instead of a single scalar offset it provides for multiple offsets via a function which depends upon the "dma-ranges" property of the PCIe host controller. This is required for proper functionality of the BrcmSTB PCIe controller and possibly s

[PATCH v7 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-09 Thread Jim Quinlan
, cpu_addr, dma_addr, size). Signed-off-by: Jim Quinlan --- arch/arm/include/asm/dma-mapping.h| 9 +- arch/arm/mach-keystone/keystone.c | 17 ++-- arch/sh/drivers/pci/pcie-sh7786.c | 9 +- arch/sh/kernel/dma-coherent.c | 16 ++-- ar

Re: [PATCH v6 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-07 Thread Jim Quinlan
Hi Andy, Sorry for the delay in response. I will do what you suggest in your email. I do have one response to one of your comments below. On Thu, Jul 2, 2020 at 4:43 AM Andy Shevchenko wrote: > > On Wed, Jul 01, 2020 at 05:21:38PM -0400, Jim Quinlan wrote: > > The new field 'd

[PATCH v6 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-02 Thread Jim Quinlan
, cpu_addr, dma_addr, size). Signed-off-by: Jim Quinlan --- arch/arm/include/asm/dma-mapping.h| 9 +- arch/arm/mach-keystone/keystone.c | 17 ++-- arch/sh/drivers/pci/pcie-sh7786.c | 9 +- arch/sh/kernel/dma-coherent.c | 14 +-- ar

[PATCH v6 00/12] PCI: brcmstb: enable PCIe for STB chips

2020-07-02 Thread Jim Quinlan
d less intrusive patchset possible. This patchset implements a generalization of "dev->dma_pfn_offset", except that instead of a single scalar offset it provides for multiple offsets via a function which depends upon the "dma-ranges" property of the PCIe host controller. This is r

Re: [PATCH v5 08/12] device core: Introduce multiple dma pfn offsets

2020-06-18 Thread Jim Quinlan
On Wed, Jun 17, 2020 at 9:00 AM Robin Murphy wrote: > > Hi Jim, > > Thanks for taking this on! Hi Robin, > > On 2020-06-16 21:55, Jim Quinlan wrote: > > The new field in struct device 'dma_pfn_offset_map' is used to facilitate > > the use of single or multiple

[PATCH v5 08/12] device core: Introduce multiple dma pfn offsets

2020-06-17 Thread Jim Quinlan
he kernel driver code. These cases now invoke the function dma_attach_uniform_pfn_offset(dev, pfn_offset). Signed-off-by: Jim Quinlan --- arch/arm/include/asm/dma-mapping.h| 9 +-- arch/arm/mach-keystone/keystone.c | 8 ++- arch/sh/drivers/pci/pcie-sh7786.c

[PATCH v5 00/12] PCI: brcmstb: enable PCIe for STB chips

2020-06-17 Thread Jim Quinlan
ner and less intrusive patchset possible. This patchset implements a generalization of "dev->dma_pfn_offset", except that instead of a single scalar offset it provides for multiple offsets via a function which depends upon the "dma-ranges" property of the PCIe host controlle

Re: [PATCH v4 08/12] device core: Introduce multiple dma pfn offsets

2020-06-10 Thread Jim Quinlan
Hi Andy, On Tue, Jun 9, 2020 at 7:18 AM Andy Shevchenko wrote: > > On Mon, Jun 08, 2020 at 11:48:51AM -0400, Jim Quinlan wrote: > > On Sun, Jun 7, 2020 at 12:500f9bfe0fb8840b268af1bbcc51f1cd440514e PM > > Andy Shevchenko wrote: > > > On Fri, Jun 05, 2020 at 05:26:48

Re: [PATCH v4 08/12] device core: Introduce multiple dma pfn offsets

2020-06-09 Thread Jim Quinlan
Hi Andy, On Sun, Jun 7, 2020 at 12:500f9bfe0fb8840b268af1bbcc51f1cd440514e PM Andy Shevchenko wrote: > > On Fri, Jun 05, 2020 at 05:26:48PM -0400, Jim Quinlan wrote: > > The new field in struct device 'dma_pfn_offset_map' is used to facilitate > > the use of single or mu

[PATCH v4 00/12] PCI: brcmstb: enable PCIe for STB chips

2020-06-07 Thread Jim Quinlan
which depends upon the "dma-ranges" property of the PCIe host controller. This is required for proper functionality of the BrcmSTB PCIe controller and possibly some other devices. [1] https://lore.kernel.org/linux-arm-kernel/1516058925-46522-5-git-send-email-jim2101...@gmail.com/ Jim

[PATCH v4 08/12] device core: Introduce multiple dma pfn offsets

2020-06-07 Thread Jim Quinlan
he kernel driver code. These cases now invoke the function dma_attach_uniform_pfn_offset(dev, pfn_offset). Signed-off-by: Jim Quinlan --- arch/arm/include/asm/dma-mapping.h| 9 +-- arch/arm/mach-keystone/keystone.c | 9 ++- arch/sh/drivers/pci/pcie-sh7786.c

Re: [PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-07 Thread Jim Quinlan
rwhelming usage of say, > dev->dma_pfn_offset, involves shifting it. > > Hi Jim, > On Thu, 2020-06-04 at 14:01 -0400, Jim Quinlan wrote: > > Hi Nicolas, > > [...] > > > > I understand the need for dev to be around, devm_*() is key. But also it's > > > impo

Re: [PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-05 Thread Jim Quinlan
Hi Andy, On Thu, Jun 4, 2020 at 11:05 AM Andy Shevchenko wrote: > > On Thu, Jun 04, 2020 at 10:35:12AM -0400, Jim Quinlan wrote: > > On Thu, Jun 4, 2020 at 9:53 AM Nicolas Saenz Julienne > > wrote: > > > On Wed, 2020-06-03 at 15:20 -0400, Jim Quinlan wrote: &

Re: [PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-05 Thread Jim Quinlan
Hi Dan, On Thu, Jun 4, 2020 at 7:06 AM Dan Carpenter wrote: > > On Wed, Jun 03, 2020 at 03:20:41PM -0400, Jim Quinlan wrote: > > @@ -786,7 +787,7 @@ static int sun4i_backend_bind(struct device *dev, > > struct device *master, > > const struct sun4i_backend_quirks *

Re: [PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-05 Thread Jim Quinlan
On Thu, Jun 4, 2020 at 9:53 AM Nicolas Saenz Julienne wrote: > > Hi Jim, > > On Wed, 2020-06-03 at 15:20 -0400, Jim Quinlan wrote: > > The new field in struct device 'dma_pfn_offset_map' is used to facilitate > > the use of multiple pfn offsets between cpu addrs and dma

Re: [PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-05 Thread Jim Quinlan
Hi Nicolas, On Thu, Jun 4, 2020 at 12:52 PM Nicolas Saenz Julienne wrote: > > Hi Jim, > > On Thu, 2020-06-04 at 10:35 -0400, Jim Quinlan wrote: > > [...] > > > > > --- a/arch/sh/kernel/dma-coherent.c > > > > +++ b/arch/sh/kernel/dma-coherent.c &

Re: [PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-05 Thread Jim Quinlan
On Thu, Jun 4, 2020 at 10:20 AM Dan Carpenter wrote: > > On Thu, Jun 04, 2020 at 09:48:49AM -0400, Jim Quinlan wrote: > > > > + r = devm_kcalloc(dev, 1, sizeof(struct dma_pfn_offset_region), > > > > + GFP_KERNEL); > > > > &

[PATCH v3 00/13] PCI: brcmstb: enable PCIe for STB chips

2020-06-04 Thread Jim Quinlan
single scalar offset it provides for multiple offsets via a function which depends upon the "dma-ranges" property of the PCIe host controller. This is required for proper functionality of the BrcmSTB PCIe controller and possibly some other devices. [1] https://lore.kernel.org/linu

[PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-04 Thread Jim Quinlan
ner to set pfn offsets but there are a number of ad hoc assignments to dev->dma_pfn_offset in the kernel code. These cases now invoke the function attach_uniform_dma_pfn_offset(dev, pfn_offset). Signed-off-by: Jim Quinlan --- arch/arm/include/asm/dma-mapping.h| 9 +- arch/ar