Skip to contentSkip to conversation

refactor 32-bit dma limit quirks

PATCH In review Christoph Hellwig 3 participants 21 messages May 25, 2018 – May 28, 2018

Subsystems (9)
lore
Share & tools
lore
#0 lore raw

Hi all,

x86 currently has some quirks to force lower dma masks. They are mostly useful for certain VIA systems that otherwise corrupt data, but otherwise don't make much sense given that the modern DMA APIs do the right thing automatically.

This series dumps a few of these old kernel command lines (including their not really working version on ia64), and moves the VIA quirk to a flag in struct device so that it can be apply generically. This will be needed to support Xylinx root ports with a similar issue that show up in common RISC-V boards.

#1 lore raw

PATCH 1/7 core, dma-direct: add a flag 32-bit dma limits

Various PCI bridges (VIA PCI, Xilinx PCIe) limit DMA to only 32-bits even if the device itself supports more. Add a single bit flag to struct device (to be moved into the dma extension once we around it) to flag such devices and reject larger DMA to them.

---
 include/linux/device.h | 3 +++
 lib/dma-direct.c       | 6 ++++++
 2 files changed, 9 insertions(+)
include/linux/device.h +3 -0
index 477956990f5e..fa317e45f5e6 100644
@@ -904,6 +904,8 @@ struct dev_links_info {
  * @offline:	Set after successful invocation of bus type's .offline().
  * @of_node_reused: Set if the device-tree node is shared with an ancestor
  *              device.
+ * @dma_32bit_limit: bridge limited to 32bit DMA even if the device itself
+ *		indicates support for a higher limit in the dma_mask field.
  *
  * At the lowest level, every device in a Linux system is represented by an
  * instance of struct device. The device structure contains the information
@@ -992,6 +994,7 @@ struct device {
 	bool			offline_disabled:1;
 	bool			offline:1;
 	bool			of_node_reused:1;
+	bool			dma_32bit_limit:1;
 };
 
 static inline struct device *kobj_to_dev(struct kobject *kobj)
lib/dma-direct.c +6 -0
index bbfb229aa067..0151a7b2bc87 100644
@@ -165,6 +165,12 @@ int dma_direct_supported(struct device *dev, u64 mask)
 	if (mask < DMA_BIT_MASK(32))
 		return 0;
 #endif
+	/*
+	 * Various PCI/PCIe bridges have broken support for > 32bit DMA even
+	 * if the device itself might support it.
+	 */
+	if (dev->dma_32bit_limit && mask > DMA_BIT_MASK(32))
+		return 0;
 	return 1;
 }
 
Signature · 1 line
2.17.0
maintainer Reviewed-by on v1 1/7
#2 lore raw

Re: [PATCH 1/7] core, dma-direct: add a flag 32-bit dma limits

Quoted 3 lines · Christoph Hellwig

Various PCI bridges (VIA PCI, Xilinx PCIe) limit DMA to only 32-bits even if the device itself supports more. Add a single bit flag to struct device (to be moved into the dma extension once we around it)

"once we around it"? I don't understand, sorry.

Quoted 7 lines

to flag such devices and reject larger DMA to them.

---
 include/linux/device.h | 3 +++
 lib/dma-direct.c       | 6 ++++++
 2 files changed, 9 insertions(+)

For the patch, no objection from me:

#3 lore raw

Re: [PATCH 1/7] core, dma-direct: add a flag 32-bit dma limits

Quoted 6 lines · Greg Kroah-Hartman
Quoted 3 lines · Christoph Hellwig

Various PCI bridges (VIA PCI, Xilinx PCIe) limit DMA to only 32-bits even if the device itself supports more. Add a single bit flag to struct device (to be moved into the dma extension once we around it)

"once we around it"? I don't understand, sorry.

Should be "once we get around it", which in proper grammar should probably be "once we get to it". Anyway, the point is that right now struct device is bloated with a lot of fields for dma/iommu purposes and we need to clean this up. It's been on my TODO list for a while.

#4 lore raw

Re: [PATCH 1/7] core, dma-direct: add a flag 32-bit dma limits

Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Greg Kroah-Hartman
Quoted 3 lines · Christoph Hellwig

Various PCI bridges (VIA PCI, Xilinx PCIe) limit DMA to only 32-bits even if the device itself supports more. Add a single bit flag to struct device (to be moved into the dma extension once we around it)

Quoted 7 lines
Quoted 1 line

"once we around it"? I don't understand, sorry.

Should be "once we get around it", which in proper grammar should probably be "once we get to it". Anyway, the point is that right now struct device is bloated with a lot of fields for dma/iommu purposes and we need to clean this up. It's been on my TODO list for a while.

Ah, makes sense, that's fine with me, I'd love to see that get cleaned up.

thanks,

greg k-h

#5 lore raw

PATCH 2/7 ia64: remove the dead iommu_sac_force variable

In reply to Christoph Hellwig

Looks like copy and paste from x86 that never actually got used.

---
 arch/ia64/kernel/pci-dma.c | 19 -------------------
 1 file changed, 19 deletions(-)
arch/ia64/kernel/pci-dma.c +0 -19
index b5df084c0af4..50b6ad282a90 100644
@@ -18,8 +18,6 @@
 dma_addr_t bad_dma_address __read_mostly;
 EXPORT_SYMBOL(bad_dma_address);
 
-static int iommu_sac_force __read_mostly;
-
 int no_iommu __read_mostly;
 #ifdef CONFIG_IOMMU_DEBUG
 int force_iommu __read_mostly = 1;
@@ -61,23 +59,6 @@ int iommu_dma_supported(struct device *dev, u64 mask)
 	if (mask < DMA_BIT_MASK(24))
 		return 0;
 
-	/* Tell the device to use SAC when IOMMU force is on.  This
-	   allows the driver to use cheaper accesses in some cases.
-
-	   Problem with this is that if we overflow the IOMMU area and
-	   return DAC as fallback address the device may not handle it
-	   correctly.
-
-	   As a special case some controllers have a 39bit address
-	   mode that is as efficient as 32bit (aic79xx). Don't force
-	   SAC for these.  Assume all masks <= 40 bits are of this
-	   type. Normally this doesn't make any difference, but gives
-	   more gentle handling of IOMMU overflow. */
-	if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
-		dev_info(dev, "Force SAC with mask %llx\n", mask);
-		return 0;
-	}
-
 	return 1;
 }
 EXPORT_SYMBOL(iommu_dma_supported);
Signature · 1 line
2.17.0
#6 lore raw

PATCH 3/7 ia64: remove iommu_dma_supported

In reply to Christoph Hellwig

The generic dma_direct_supported helper already used by intel-iommu on x86 does a better job than the ia64 reimplementation.

---
 arch/ia64/kernel/pci-dma.c  | 13 -------------
 drivers/iommu/intel-iommu.c |  2 --
 2 files changed, 15 deletions(-)
arch/ia64/kernel/pci-dma.c +0 -13
index 50b6ad282a90..3c2884bef3d4 100644
@@ -51,18 +51,6 @@ iommu_dma_init(void)
 	return;
 }
 
-int iommu_dma_supported(struct device *dev, u64 mask)
-{
-	/* Copied from i386. Doesn't make much sense, because it will
-	   only work for pci_alloc_coherent.
-	   The caller just has to use GFP_DMA in this case. */
-	if (mask < DMA_BIT_MASK(24))
-		return 0;
-
-	return 1;
-}
-EXPORT_SYMBOL(iommu_dma_supported);
-
 void __init pci_iommu_alloc(void)
 {
 	dma_ops = &intel_dma_ops;
@@ -71,7 +59,6 @@ void __init pci_iommu_alloc(void)
 	intel_dma_ops.sync_sg_for_cpu = machvec_dma_sync_sg;
 	intel_dma_ops.sync_single_for_device = machvec_dma_sync_single;
 	intel_dma_ops.sync_sg_for_device = machvec_dma_sync_sg;
-	intel_dma_ops.dma_supported = iommu_dma_supported;
 
 	/*
 	 * The order of these functions is important for
drivers/iommu/intel-iommu.c +0 -2
index 749d8f235346..5e0bef3754d1 100644
@@ -3841,9 +3841,7 @@ const struct dma_map_ops intel_dma_ops = {
 	.map_page = intel_map_page,
 	.unmap_page = intel_unmap_page,
 	.mapping_error = intel_mapping_error,
-#ifdef CONFIG_X86
 	.dma_supported = dma_direct_supported,
-#endif
 };
 
 static inline int iommu_domain_cache_init(void)
Signature · 1 line
2.17.0
#7 lore raw

PATCH 4/7 x86: remove a stray reference to pci-nommu.c

In reply to Christoph Hellwig

This is just the minimal workaround. The file file is mostly either stale and/or duplicative of Documentation/admin-guide/kernel-parameters.txt, but that is much more work than I'm willing to do right now.

---
 Documentation/x86/x86_64/boot-options.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/x86/x86_64/boot-options.txt +2 -2
index b297c48389b9..153b3a57fba2 100644
@@ -187,9 +187,9 @@ PCI
 
 IOMMU (input/output memory management unit)
 
- Currently four x86-64 PCI-DMA mapping implementations exist:
+ Multiple x86-64 PCI-DMA mapping implementations exist, for example:
 
-   1. <arch/x86_64/kernel/pci-nommu.c>: use no hardware/software IOMMU at all
+   1. <lib/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"
 
Signature · 1 line
2.17.0
Reviewed-by on v1 4/7
#8 lore raw

Re: [PATCH 4/7] x86: remove a stray reference to pci-nommu.c

On Fri, 25 May 2018, Christoph Hellwig wrote:

Subject should be: Documentation/x86: Remove .....

please

Quoted 1 line

This is just the minimal workaround. The file file is mostly either stale

file file?

Quoted 2 lines

and/or duplicative of Documentation/admin-guide/kernel-parameters.txt, but that is much more work than I'm willing to do right now.

Yeah, this thing is on the todo list ...

Quoted 1 line

Other than the above nits:

Quoted 24 lines
---
 Documentation/x86/x86_64/boot-options.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/x86/x86_64/boot-options.txt +2 -2
index b297c48389b9..153b3a57fba2 100644
@@ -187,9 +187,9 @@ PCI
 
 IOMMU (input/output memory management unit)
 
- Currently four x86-64 PCI-DMA mapping implementations exist:
+ Multiple x86-64 PCI-DMA mapping implementations exist, for example:
 
-   1. <arch/x86_64/kernel/pci-nommu.c>: use no hardware/software IOMMU at all
+   1. <lib/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"
 
Signature · 1 line
2.17.0
#9 lore raw

PATCH 5/7 x86: remove the experimental forcesac boot option

In reply to Christoph Hellwig

Limiting the dma mask to avoid PCI (pre-PCIe) DAC cycles while paying the huge overhead of an IOMMU is rather pointless, and this seriously gets in the way of dma mapping work.

---
 .../admin-guide/kernel-parameters.txt         |  1 -
 Documentation/x86/x86_64/boot-options.txt     |  4 +---
 arch/x86/kernel/pci-dma.c                     | 21 +------------------
 drivers/net/ethernet/sfc/efx.c                |  5 ++---
 drivers/net/ethernet/sfc/falcon/efx.c         |  5 ++---
 5 files changed, 6 insertions(+), 30 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +0 -1
index f2040d46f095..cc0ac035b8fe 100644
@@ -1705,7 +1705,6 @@
 		nopanic
 		merge
 		nomerge
-		forcesac
 		soft
 		pt		[x86, IA-64]
 		nobypass	[PPC/POWERNV]
Documentation/x86/x86_64/boot-options.txt +1 -3
index 153b3a57fba2..341588ec4e29 100644
@@ -208,7 +208,7 @@ IOMMU (input/output memory management unit)
       Kernel boot message: "PCI-DMA: Using Calgary IOMMU"
 
  iommu=[<size>][,noagp][,off][,force][,noforce][,leak[=<nr_of_leak_pages>]
-	[,memaper[=<order>]][,merge][,forcesac][,fullflush][,nomerge]
+	[,memaper[=<order>]][,merge][,fullflush][,nomerge]
 	[,noaperture][,calgary]
 
   General iommu options:
@@ -235,8 +235,6 @@ IOMMU (input/output memory management unit)
                        (experimental).
     nomerge            Don't do scatter-gather (SG) merging.
     noaperture         Ask the IOMMU not to touch the aperture for AGP.
-    forcesac           Force single-address cycle (SAC) mode for masks <40bits
-                       (experimental).
     noagp              Don't initialize the AGP driver and use full aperture.
     allowdac           Allow double-address cycle (DAC) mode, i.e. DMA >4GB.
                        DAC is used with 32-bit PCI to push a 64-bit address in
arch/x86/kernel/pci-dma.c +1 -20
index 77625b60a510..91dff954b745 100644
@@ -20,8 +20,6 @@ static int forbid_dac __read_mostly;
 const struct dma_map_ops *dma_ops = &dma_direct_ops;
 EXPORT_SYMBOL(dma_ops);
 
-static int iommu_sac_force __read_mostly;
-
 #ifdef CONFIG_IOMMU_DEBUG
 int panic_on_overflow __read_mostly = 1;
 int force_iommu __read_mostly = 1;
@@ -125,7 +123,7 @@ static __init int iommu_setup(char *p)
 		if (!strncmp(p, "nomerge", 7))
 			iommu_merge = 0;
 		if (!strncmp(p, "forcesac", 8))
-			iommu_sac_force = 1;
+			pr_warn("forcesac option ignored.\n");
 		if (!strncmp(p, "allowdac", 8))
 			forbid_dac = 0;
 		if (!strncmp(p, "nodac", 5))
@@ -165,23 +163,6 @@ int arch_dma_supported(struct device *dev, u64 mask)
 	}
 #endif
 
-	/* Tell the device to use SAC when IOMMU force is on.  This
-	   allows the driver to use cheaper accesses in some cases.
-
-	   Problem with this is that if we overflow the IOMMU area and
-	   return DAC as fallback address the device may not handle it
-	   correctly.
-
-	   As a special case some controllers have a 39bit address
-	   mode that is as efficient as 32bit (aic79xx). Don't force
-	   SAC for these.  Assume all masks <= 40 bits are of this
-	   type. Normally this doesn't make any difference, but gives
-	   more gentle handling of IOMMU overflow. */
-	if (iommu_sac_force && (mask >= DMA_BIT_MASK(40))) {
-		dev_info(dev, "Force SAC with mask %Lx\n", mask);
-		return 0;
-	}
-
 	return 1;
 }
 EXPORT_SYMBOL(arch_dma_supported);
drivers/net/ethernet/sfc/efx.c +2 -3
index a4ebd8715494..661828e8fdcf 100644
@@ -1289,9 +1289,8 @@ static int efx_init_io(struct efx_nic *efx)
 
 	pci_set_master(pci_dev);
 
-	/* Set the PCI DMA mask.  Try all possibilities from our
-	 * genuine mask down to 32 bits, because some architectures
-	 * (e.g. x86_64 with iommu_sac_force set) will allow 40 bit
+	/* Set the PCI DMA mask.  Try all possibilities from our genuine mask
+	 * down to 32 bits, because some architectures will allow 40 bit
 	 * masks event though they reject 46 bit masks.
 	 */
 	while (dma_mask > 0x7fffffffUL) {
drivers/net/ethernet/sfc/falcon/efx.c +2 -3
index 3d6c91e96589..dd5530a4f8c8 100644
@@ -1242,9 +1242,8 @@ static int ef4_init_io(struct ef4_nic *efx)
 
 	pci_set_master(pci_dev);
 
-	/* Set the PCI DMA mask.  Try all possibilities from our
-	 * genuine mask down to 32 bits, because some architectures
-	 * (e.g. x86_64 with iommu_sac_force set) will allow 40 bit
+	/* Set the PCI DMA mask.  Try all possibilities from our genuine mask
+	 * down to 32 bits, because some architectures will allow 40 bit
 	 * masks event though they reject 46 bit masks.
 	 */
 	while (dma_mask > 0x7fffffffUL) {
Signature · 1 line
2.17.0
Reviewed-by on v1 5/7
#10 lore raw

Re: [PATCH 5/7] x86: remove the experimental forcesac boot option

On Fri, 25 May 2018, Christoph Hellwig wrote:

x86/pci-dma: ...

Please

Quoted 5 lines

Limiting the dma mask to avoid PCI (pre-PCIe) DAC cycles while paying the huge overhead of an IOMMU is rather pointless, and this seriously gets in the way of dma mapping work.

#11 lore raw

PATCH 6/7 x86: remove the explicit nodac and allowdac option

In reply to Christoph Hellwig

This is something drivers should decide (modulo chipset quirks like for VIA), which as far as I can tell is how things have been handled for the last 15 years.

Note that we keep the usedac option for now, as it is used in the wild to override the too generic VIA quirk.

---
 Documentation/x86/x86_64/boot-options.txt | 5 -----
 arch/x86/kernel/pci-dma.c                 | 4 ++--
 2 files changed, 2 insertions(+), 7 deletions(-)
Documentation/x86/x86_64/boot-options.txt +0 -5
index 341588ec4e29..8d109ef67ab6 100644
@@ -236,11 +236,6 @@ IOMMU (input/output memory management unit)
     nomerge            Don't do scatter-gather (SG) merging.
     noaperture         Ask the IOMMU not to touch the aperture for AGP.
     noagp              Don't initialize the AGP driver and use full aperture.
-    allowdac           Allow double-address cycle (DAC) mode, i.e. DMA >4GB.
-                       DAC is used with 32-bit PCI to push a 64-bit address in
-                       two cycles. When off all DMA over >4GB is forced through
-                       an IOMMU or software bounce buffering.
-    nodac              Forbid DAC mode, i.e. DMA >4GB.
     panic              Always panic when IOMMU overflows.
     calgary            Use the Calgary IOMMU if it is available
 
arch/x86/kernel/pci-dma.c +2 -2
index 91dff954b745..b5cbef974bd1 100644
@@ -125,9 +125,9 @@ static __init int iommu_setup(char *p)
 		if (!strncmp(p, "forcesac", 8))
 			pr_warn("forcesac option ignored.\n");
 		if (!strncmp(p, "allowdac", 8))
-			forbid_dac = 0;
+			pr_warn("allowdac option ignored.\n");
 		if (!strncmp(p, "nodac", 5))
-			forbid_dac = 1;
+			pr_warn("nodac option ignored.\n");
 		if (!strncmp(p, "usedac", 6)) {
 			forbid_dac = -1;
 			return 1;
Signature · 1 line
2.17.0
Reviewed-by on v1 6/7
#12 lore raw

Re: [PATCH 6/7] x86: remove the explicit nodac and allowdac option

On Fri, 25 May 2018, Christoph Hellwig wrote:

x86/pci-dma: ...

Please

Quoted 8 lines

This is something drivers should decide (modulo chipset quirks like for VIA), which as far as I can tell is how things have been handled for the last 15 years.

Note that we keep the usedac option for now, as it is used in the wild to override the too generic VIA quirk.

#13 lore raw

PATCH 7/7 x86: switch the VIA 32-bit DMA quirk to use the struct device flag

In reply to Christoph Hellwig

Instead of globally disabling > 32bit DMA using the arch_dma_supported hook walk the PCI bus under the actually affected bridge and mark every device with the dma_32bit_limit flag. This also gets rid of the arch_dma_supported hook entirely.

---
 arch/x86/include/asm/dma-mapping.h |  3 ---
 arch/x86/kernel/pci-dma.c          | 27 ++++++++++-----------------
 include/linux/dma-mapping.h        | 11 -----------
 3 files changed, 10 insertions(+), 31 deletions(-)
arch/x86/include/asm/dma-mapping.h +0 -3
index 89ce4bfd241f..eb4e1352e403 100644
@@ -30,9 +30,6 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
 	return dma_ops;
 }
 
-int arch_dma_supported(struct device *dev, u64 mask);
-#define arch_dma_supported arch_dma_supported
-
 bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp);
 #define arch_dma_alloc_attrs arch_dma_alloc_attrs
 
arch/x86/kernel/pci-dma.c +10 -17
index b5cbef974bd1..0d6fd0d1c14f 100644
@@ -15,7 +15,7 @@
 #include <asm/x86_init.h>
 #include <asm/iommu_table.h>
 
-static int forbid_dac __read_mostly;
+static bool disable_dac_quirk __read_mostly;
 
 const struct dma_map_ops *dma_ops = &dma_direct_ops;
 EXPORT_SYMBOL(dma_ops);
@@ -129,7 +129,7 @@ static __init int iommu_setup(char *p)
 		if (!strncmp(p, "nodac", 5))
 			pr_warn("nodac option ignored.\n");
 		if (!strncmp(p, "usedac", 6)) {
-			forbid_dac = -1;
+			disable_dac_quirk = true;
 			return 1;
 		}
 #ifdef CONFIG_SWIOTLB
@@ -154,19 +154,6 @@ static __init int iommu_setup(char *p)
 }
 early_param("iommu", iommu_setup);
 
-int arch_dma_supported(struct device *dev, u64 mask)
-{
-#ifdef CONFIG_PCI
-	if (mask > 0xffffffff && forbid_dac > 0) {
-		dev_info(dev, "PCI: Disallowing DAC for device\n");
-		return 0;
-	}
-#endif
-
-	return 1;
-}
-EXPORT_SYMBOL(arch_dma_supported);
-
 static int __init pci_iommu_init(void)
 {
 	struct iommu_table_entry *p;
@@ -190,11 +177,17 @@ rootfs_initcall(pci_iommu_init);
 #ifdef CONFIG_PCI
 /* Many VIA bridges seem to corrupt data for DAC. Disable it here */
 
+static int via_no_dac_cb(struct pci_dev *pdev, void *data)
+{
+	pdev->dev.dma_32bit_limit = true;
+	return 0;
+}
+
 static void via_no_dac(struct pci_dev *dev)
 {
-	if (forbid_dac = 0) {
+	if (!disable_dac_quirk) {
 		dev_info(&dev->dev, "disabling DAC on VIA PCI bridge\n");
-		forbid_dac = 1;
+		pci_walk_bus(dev->subordinate, via_no_dac_cb, NULL);
 	}
 }
 DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID,
include/linux/dma-mapping.h +0 -11
index f8ab1c0f589e..0249bce7c5e7 100644
@@ -572,14 +572,6 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
 	return 0;
 }
 
-/*
- * This is a hack for the legacy x86 forbid_dac and iommu_sac_force. Please
- * don't use this in new code.
- */
-#ifndef arch_dma_supported
-#define arch_dma_supported(dev, mask)	(1)
-#endif
-
 static inline void dma_check_mask(struct device *dev, u64 mask)
 {
 	if (sme_active() && (mask < (((u64)sme_get_me_mask() << 1) - 1)))
@@ -592,9 +584,6 @@ static inline int dma_supported(struct device *dev, u64 mask)
 
 	if (!ops)
 		return 0;
-	if (!arch_dma_supported(dev, mask))
-		return 0;
-
 	if (!ops->dma_supported)
 		return 1;
 	return ops->dma_supported(dev, mask);
Signature · 1 line
2.17.0
Reviewed-by on v1 7/7
#14 lore raw

Re: [PATCH 7/7] x86: switch the VIA 32-bit DMA quirk to use the struct device flag

n Fri, 25 May 2018, Christoph Hellwig wrote:

x86/pci-dma: ...

Please

Quoted 4 lines

Instead of globally disabling > 32bit DMA using the arch_dma_supported hook walk the PCI bus under the actually affected bridge and mark every device with the dma_32bit_limit flag. This also gets rid of the arch_dma_supported hook entirely.

Shouldn't this go before the other two?

Quoted 1 line
#15 lore raw

Re: [PATCH 7/7] x86: switch the VIA 32-bit DMA quirk to use the struct device flag

Quoted 4 lines · Thomas Gleixner

n Fri, 25 May 2018, Christoph Hellwig wrote:

x86/pci-dma: ...

Quoted 8 lines

Please

Quoted 4 lines

Instead of globally disabling > 32bit DMA using the arch_dma_supported hook walk the PCI bus under the actually affected bridge and mark every device with the dma_32bit_limit flag. This also gets rid of the arch_dma_supported hook entirely.

Shouldn't this go before the other two?

Which other two? The boot optional removal patches? They just remove the visible interface, but keep the implementation which is converted to the better mechanism here, so I think the order makes sense. But I might be missing something..

#16 lore raw

Re: [PATCH 7/7] x86: switch the VIA 32-bit DMA quirk to use the struct device flag

Quoted 12 lines · Christoph Hellwig
Quoted 11 lines · Thomas Gleixner

n Fri, 25 May 2018, Christoph Hellwig wrote:

x86/pci-dma: ...

Please

Quoted 4 lines

Instead of globally disabling > 32bit DMA using the arch_dma_supported hook walk the PCI bus under the actually affected bridge and mark every device with the dma_32bit_limit flag. This also gets rid of the arch_dma_supported hook entirely.

Quoted 6 lines
Quoted 1 line

Shouldn't this go before the other two?

Which other two? The boot optional removal patches? They just remove the visible interface, but keep the implementation which is converted to the better mechanism here, so I think the order makes sense. But I might be missing something..

They remove the commandline switch before having the replacement in place unless I'm misreading something.

Thanks,

tglx

#17 lore raw

Re: [PATCH 7/7] x86: switch the VIA 32-bit DMA quirk to use the struct device flag

Quoted 7 lines · Thomas Gleixner
Quoted 4 lines

Which other two? The boot optional removal patches? They just remove the visible interface, but keep the implementation which is converted to the better mechanism here, so I think the order makes sense. But I might be missing something..

They remove the commandline switch before having the replacement in place unless I'm misreading something.

The command line switch to force 32-bit dma is removed without
replacement. The PCI quirk for force the 32-bit dma for VIA bridges
is kept in place, and switch to a different mechanism in this patch.

#18 lore raw

Re: [PATCH 7/7] x86: switch the VIA 32-bit DMA quirk to use the struct device flag

Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Thomas Gleixner
Quoted 4 lines

Which other two? The boot optional removal patches? They just remove the visible interface, but keep the implementation which is converted to the better mechanism here, so I think the order makes sense. But I might be missing something..

Quoted 6 lines
Quoted 2 lines

They remove the commandline switch before having the replacement in place unless I'm misreading something.

The command line switch to force 32-bit dma is removed without
replacement. The PCI quirk for force the 32-bit dma for VIA bridges
is kept in place, and switch to a different mechanism in this patch.

Fair enough

#19 lore raw

Re: [PATCH 7/7] x86: switch the VIA 32-bit DMA quirk to use the struct device flag

Quoted 8 lines · Thomas Gleixner
Quoted 6 lines
Quoted 2 lines

They remove the commandline switch before having the replacement in place unless I'm misreading something.

The command line switch to force 32-bit dma is removed without
replacement. The PCI quirk for force the 32-bit dma for VIA bridges
is kept in place, and switch to a different mechanism in this patch.

Fair enough

Thanks. Do you want me to repost them for the x86 tree, or should just pull the changes with the commit logs fixed to the dma-mapping tree?

#20 lore raw

Re: [PATCH 7/7] x86: switch the VIA 32-bit DMA quirk to use the struct device flag

Quoted 8 lines · Christoph Hellwig
Quoted 7 lines · Thomas Gleixner
Quoted 6 lines
Quoted 2 lines

They remove the commandline switch before having the replacement in place unless I'm misreading something.

The command line switch to force 32-bit dma is removed without
replacement. The PCI quirk for force the 32-bit dma for VIA bridges
is kept in place, and switch to a different mechanism in this patch.

Quoted 5 lines
Quoted 1 line

Fair enough

Thanks. Do you want me to repost them for the x86 tree, or should just pull the changes with the commit logs fixed to the dma-mapping tree?

Just take them through your tree. There is nothing conflicting in tip.

Thanks,

tglx