linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] dma-mapping: Fix filename references
@ 2019-03-20 16:13 Andy Shevchenko
  2019-03-20 21:31 ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2019-03-20 16:13 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	H. Peter Anvin, Tony Luck, Fenghua Yu, Konrad Rzeszutek Wilk,
	Bjorn Helgaas, linux-doc
  Cc: Andy Shevchenko, Christoph Hellwig

After the commit cf65a0f6f6ff

  ("dma-mapping: move all DMA mapping code to kernel/dma")

some of the files are referring to outdated information, i.e. old file names
of DMA mapping sources.

Fix it here.

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 Documentation/x86/x86_64/boot-options.txt | 2 +-
 arch/ia64/kernel/setup.c                  | 2 +-
 arch/x86/kernel/pci-swiotlb.c             | 2 +-
 arch/x86/kernel/setup.c                   | 2 +-
 arch/x86/pci/sta2x11-fixup.c              | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/x86/x86_64/boot-options.txt b/Documentation/x86/x86_64/boot-options.txt
index abc53886655e..26201868ab14 100644
--- a/Documentation/x86/x86_64/boot-options.txt
+++ b/Documentation/x86/x86_64/boot-options.txt
@@ -191,7 +191,7 @@ IOMMU (input/output memory management unit)
 
  Multiple x86-64 PCI-DMA mapping implementations exist, for example:
 
-   1. <lib/dma-direct.c>: use no hardware/software IOMMU at all
+   1. <kernel/dma/direct.c>: use no hardware/software IOMMU at all
       (e.g. because you have < 3 GB memory).
       Kernel boot message: "PCI-DMA: Disabling IOMMU"
 
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 583a3746d70b..b78b29e19681 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -256,7 +256,7 @@ __initcall(register_memory);
  * This function checks if the reserved crashkernel is allowed on the specific
  * IA64 machine flavour. Machines without an IO TLB use swiotlb and require
  * some memory below 4 GB (i.e. in 32 bit area), see the implementation of
- * lib/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that
+ * kernel/dma/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that
  * in kdump case. See the comment in sba_init() in sba_iommu.c.
  *
  * So, the only machvec that really supports loading the kdump kernel
diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
index 5f5302028a9a..7b6dd54018fa 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/* Glue code to lib/swiotlb.c */
+/* Glue code to kernel/dma/swiotlb.c */
 
 #include <linux/pci.h>
 #include <linux/cache.h>
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index fa57de34776d..1e610ce5992c 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -474,7 +474,7 @@ static int __init reserve_crashkernel_low(void)
 	ret = parse_crashkernel_low(boot_command_line, total_low_mem, &low_size, &base);
 	if (ret) {
 		/*
-		 * two parts from lib/swiotlb.c:
+		 * two parts from kernel/dma/swiotlb.c:
 		 * -swiotlb size: user-specified with swiotlb= or default.
 		 *
 		 * -swiotlb overflow buffer: now hardcoded to 32k. We round it
diff --git a/arch/x86/pci/sta2x11-fixup.c b/arch/x86/pci/sta2x11-fixup.c
index 3cdafea55ab6..1d7f606c59d9 100644
--- a/arch/x86/pci/sta2x11-fixup.c
+++ b/arch/x86/pci/sta2x11-fixup.c
@@ -1,6 +1,6 @@
 /*
  * arch/x86/pci/sta2x11-fixup.c
- * glue code for lib/swiotlb.c and DMA translation between STA2x11
+ * glue code for kernel/dma/swiotlb.c and DMA translation between STA2x11
  * AMBA memory mapping and the X86 memory mapping
  *
  * ST Microelectronics ConneXt (STA2X11/STA2X10)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] dma-mapping: Fix filename references
  2019-03-20 16:13 [PATCH v1] dma-mapping: Fix filename references Andy Shevchenko
@ 2019-03-20 21:31 ` Bjorn Helgaas
  2019-06-19 14:13   ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2019-03-20 21:31 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	H. Peter Anvin, Tony Luck, Fenghua Yu, Konrad Rzeszutek Wilk,
	linux-doc, Christoph Hellwig

On Wed, Mar 20, 2019 at 11:13 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> After the commit cf65a0f6f6ff
>
>   ("dma-mapping: move all DMA mapping code to kernel/dma")
>
> some of the files are referring to outdated information, i.e. old file names
> of DMA mapping sources.
>
> Fix it here.
>
> Cc: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> +++ b/arch/ia64/kernel/setup.c
> @@ -256,7 +256,7 @@ __initcall(register_memory);
>   * This function checks if the reserved crashkernel is allowed on the specific
>   * IA64 machine flavour. Machines without an IO TLB use swiotlb and require
>   * some memory below 4 GB (i.e. in 32 bit area), see the implementation of
> - * lib/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that
> + * kernel/dma/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that
>   * in kdump case. See the comment in sba_init() in sba_iommu.c.

Is the point here that just that if you lack an IOTLB and want devices
to be able to reach system memory above 4GB, you need a bounce buffer
below 4GB?  If so, maybe we could just say *that* instead of a
nebulous reference to "the implementation of */swiotlb.c", which
doesn't tell you what part of the implementation is relevant.

> diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
> index 5f5302028a9a..7b6dd54018fa 100644
> --- a/arch/x86/kernel/pci-swiotlb.c
> +++ b/arch/x86/kernel/pci-swiotlb.c
> @@ -1,5 +1,5 @@
>  // SPDX-License-Identifier: GPL-2.0
> -/* Glue code to lib/swiotlb.c */
> +/* Glue code to kernel/dma/swiotlb.c */

I personally don't think there's much value in this line and I'd
remove it entirely.

>  #include <linux/pci.h>
>  #include <linux/cache.h>
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index fa57de34776d..1e610ce5992c 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -474,7 +474,7 @@ static int __init reserve_crashkernel_low(void)
>         ret = parse_crashkernel_low(boot_command_line, total_low_mem, &low_size, &base);
>         if (ret) {
>                 /*
> -                * two parts from lib/swiotlb.c:
> +                * two parts from kernel/dma/swiotlb.c:
>                  * -swiotlb size: user-specified with swiotlb= or default.
>                  *
>                  * -swiotlb overflow buffer: now hardcoded to 32k. We round it

Is there any chance this could be updated to refer to some variable or
function names that grep/ctags/cscope/etc could find?  If we had that,
I think the filename reference would be superfluous.

> diff --git a/arch/x86/pci/sta2x11-fixup.c b/arch/x86/pci/sta2x11-fixup.c
> index 3cdafea55ab6..1d7f606c59d9 100644
> --- a/arch/x86/pci/sta2x11-fixup.c
> +++ b/arch/x86/pci/sta2x11-fixup.c
> @@ -1,6 +1,6 @@
>  /*
>   * arch/x86/pci/sta2x11-fixup.c
> - * glue code for lib/swiotlb.c and DMA translation between STA2x11
> + * glue code for kernel/dma/swiotlb.c and DMA translation between STA2x11

I think both of these lines (the "arch/x86/pci/sta2x11-fixup.c" one
and the "glue code" one) are superfluous.

There's also a superfluous empty line at the end of the GPL license
text, but I guess that should be removed by replacing the whole thing
with an SPDX line.

>   * AMBA memory mapping and the X86 memory mapping
>   *
>   * ST Microelectronics ConneXt (STA2X11/STA2X10)
> --
> 2.20.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] dma-mapping: Fix filename references
  2019-03-20 21:31 ` Bjorn Helgaas
@ 2019-06-19 14:13   ` Andy Shevchenko
  2019-06-19 17:57     ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2019-06-19 14:13 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	H. Peter Anvin, Tony Luck, Fenghua Yu, Konrad Rzeszutek Wilk,
	linux-doc, Christoph Hellwig

On Wed, Mar 20, 2019 at 04:31:17PM -0500, Bjorn Helgaas wrote:
> On Wed, Mar 20, 2019 at 11:13 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > After the commit cf65a0f6f6ff
> >
> >   ("dma-mapping: move all DMA mapping code to kernel/dma")
> >
> > some of the files are referring to outdated information, i.e. old file names
> > of DMA mapping sources.
> >
> > Fix it here.

Bjorn, thanks for review, my answers below.

> >   * This function checks if the reserved crashkernel is allowed on the specific
> >   * IA64 machine flavour. Machines without an IO TLB use swiotlb and require
> >   * some memory below 4 GB (i.e. in 32 bit area), see the implementation of
> > - * lib/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that
> > + * kernel/dma/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that
> >   * in kdump case. See the comment in sba_init() in sba_iommu.c.
> 
> Is the point here that just that if you lack an IOTLB and want devices
> to be able to reach system memory above 4GB, you need a bounce buffer
> below 4GB?  If so, maybe we could just say *that* instead of a
> nebulous reference to "the implementation of */swiotlb.c", which
> doesn't tell you what part of the implementation is relevant.

This patch is about broken links.

> > --- a/arch/x86/kernel/pci-swiotlb.c
> > +++ b/arch/x86/kernel/pci-swiotlb.c
> > @@ -1,5 +1,5 @@
> >  // SPDX-License-Identifier: GPL-2.0
> > -/* Glue code to lib/swiotlb.c */
> > +/* Glue code to kernel/dma/swiotlb.c */
> 
> I personally don't think there's much value in this line and I'd
> remove it entirely.

Will do.

> >                 /*
> > -                * two parts from lib/swiotlb.c:
> > +                * two parts from kernel/dma/swiotlb.c:
> >                  * -swiotlb size: user-specified with swiotlb= or default.
> >                  *
> >                  * -swiotlb overflow buffer: now hardcoded to 32k. We round it
> 
> Is there any chance this could be updated to refer to some variable or
> function names that grep/ctags/cscope/etc could find?  If we had that,
> I think the filename reference would be superfluous.

I'm not sure. Mauro probably the best person to ask what Sphinx can do here.

> >  /*
> >   * arch/x86/pci/sta2x11-fixup.c
> > - * glue code for lib/swiotlb.c and DMA translation between STA2x11
> > + * glue code for kernel/dma/swiotlb.c and DMA translation between STA2x11
> 
> I think both of these lines (the "arch/x86/pci/sta2x11-fixup.c" one
> and the "glue code" one) are superfluous.

Will remove.

> There's also a superfluous empty line at the end of the GPL license
> text, but I guess that should be removed by replacing the whole thing
> with an SPDX line.

Correct.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] dma-mapping: Fix filename references
  2019-06-19 14:13   ` Andy Shevchenko
@ 2019-06-19 17:57     ` Bjorn Helgaas
  0 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2019-06-19 17:57 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	H. Peter Anvin, Tony Luck, Fenghua Yu, Konrad Rzeszutek Wilk,
	Linux Doc Mailing List, Christoph Hellwig

On Wed, Jun 19, 2019 at 9:13 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Wed, Mar 20, 2019 at 04:31:17PM -0500, Bjorn Helgaas wrote:
> > On Wed, Mar 20, 2019 at 11:13 AM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > After the commit cf65a0f6f6ff
> > >
> > >   ("dma-mapping: move all DMA mapping code to kernel/dma")
> > >
> > > some of the files are referring to outdated information, i.e. old file names
> > > of DMA mapping sources.
> > >
> > > Fix it here.
>
> Bjorn, thanks for review, my answers below.
>
> > >   * This function checks if the reserved crashkernel is allowed on the specific
> > >   * IA64 machine flavour. Machines without an IO TLB use swiotlb and require
> > >   * some memory below 4 GB (i.e. in 32 bit area), see the implementation of
> > > - * lib/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that
> > > + * kernel/dma/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that
> > >   * in kdump case. See the comment in sba_init() in sba_iommu.c.
> >
> > Is the point here that just that if you lack an IOTLB and want devices
> > to be able to reach system memory above 4GB, you need a bounce buffer
> > below 4GB?  If so, maybe we could just say *that* instead of a
> > nebulous reference to "the implementation of */swiotlb.c", which
> > doesn't tell you what part of the implementation is relevant.
>
> This patch is about broken links.

Oh, of course!  Sorry, I don't know what I was thinking.  I was
wasting my time (and yours) with comments about things you're not
changing, sorry about that.

Bjorn

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-19 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-20 16:13 [PATCH v1] dma-mapping: Fix filename references Andy Shevchenko
2019-03-20 21:31 ` Bjorn Helgaas
2019-06-19 14:13   ` Andy Shevchenko
2019-06-19 17:57     ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).