Skip to contentSkip to conversation

dma-mapping: Fix filename references

PATCH Superseded Andy Shevchenko 2 participants 4 messages Mar 20, 2019 – Jun 19, 2019

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dma-mapping: Fix filename references

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 <[email protected]>
---
 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(-)
Documentation/x86/x86_64/boot-options.txt +1 -1
index abc53886655e..26201868ab14 100644
@@ -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"
 
arch/ia64/kernel/setup.c +1 -1
index 583a3746d70b..b78b29e19681 100644
@@ -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
arch/x86/kernel/pci-swiotlb.c +1 -1
index 5f5302028a9a..7b6dd54018fa 100644
@@ -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>
arch/x86/kernel/setup.c +1 -1
index fa57de34776d..1e610ce5992c 100644
@@ -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
arch/x86/pci/sta2x11-fixup.c +1 -1
index 3cdafea55ab6..1d7f606c59d9 100644
@@ -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)
Signature · 1 line
2.20.1
maintainer
#1 lore raw
Quoted 15 lines · Andy Shevchenko

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 <[email protected]>

+++ b/arch/ia64/kernel/setup.c

arch/ia64/kernel/setup.c __initcall(register_memory); · line 260

Quoted 6 lines
arch/ia64/kernel/setup.c +1 -1
@@ -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.

arch/x86/kernel/pci-swiotlb.c line 2

Quoted 8 lines
arch/x86/kernel/pci-swiotlb.c +1 -1
index 5f5302028a9a..7b6dd54018fa 100644
@@ -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.

Quoted 7 lines
arch/x86/kernel/pci-swiotlb.c +0 -0
 #include <linux/pci.h>
 #include <linux/cache.h>
arch/x86/kernel/setup.c +0 -0
index fa57de34776d..1e610ce5992c 100644

arch/x86/kernel/setup.c static int __init reserve_crashkernel_low(void) · line 480

Quoted 8 lines
arch/x86/kernel/setup.c +1 -1
@@ -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.

arch/x86/pci/sta2x11-fixup.c line 3

Quoted 9 lines
arch/x86/pci/sta2x11-fixup.c +1 -1
index 3cdafea55ab6..1d7f606c59d9 100644
@@ -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.

Quoted 6 lines
arch/x86/pci/sta2x11-fixup.c +0 -1
  * AMBA memory mapping and the X86 memory mapping
  *
  * ST Microelectronics ConneXt (STA2X11/STA2X10)
--

2.20.1

#2 lore raw
Quoted 11 lines · Bjorn Helgaas
Quoted 9 lines · Andy Shevchenko

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.

Quoted 7 lines
Quoted 6 lines

* 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.

Quoted 5 lines

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.

Quoted 9 lines

arch/x86/kernel/pci-swiotlb.c line 2

Quoted 6 lines
arch/x86/kernel/pci-swiotlb.c +1 -1
@@ -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.

Quoted 10 lines
Quoted 6 lines
arch/x86/kernel/pci-swiotlb.c +1 -1
                /*
-                * 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.

Quoted 7 lines
Quoted 4 lines

/*
* 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.

Quoted 3 lines

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.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#3 lore raw
Quoted 23 lines · Andy Shevchenko
Quoted 11 lines · Bjorn Helgaas
Quoted 9 lines · Andy Shevchenko

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.

Quoted 7 lines
Quoted 6 lines

* 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.

Quoted 7 lines
Quoted 5 lines

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