Commit 06e9552f authored by Christoph Hellwig's avatar Christoph Hellwig

x86/pci-dma: remove the experimental forcesac boot option

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.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 84564d1c
...@@ -1705,7 +1705,6 @@ ...@@ -1705,7 +1705,6 @@
nopanic nopanic
merge merge
nomerge nomerge
forcesac
soft soft
pt [x86, IA-64] pt [x86, IA-64]
nobypass [PPC/POWERNV] nobypass [PPC/POWERNV]
......
...@@ -208,7 +208,7 @@ IOMMU (input/output memory management unit) ...@@ -208,7 +208,7 @@ IOMMU (input/output memory management unit)
Kernel boot message: "PCI-DMA: Using Calgary IOMMU" Kernel boot message: "PCI-DMA: Using Calgary IOMMU"
iommu=[<size>][,noagp][,off][,force][,noforce][,leak[=<nr_of_leak_pages>] iommu=[<size>][,noagp][,off][,force][,noforce][,leak[=<nr_of_leak_pages>]
[,memaper[=<order>]][,merge][,forcesac][,fullflush][,nomerge] [,memaper[=<order>]][,merge][,fullflush][,nomerge]
[,noaperture][,calgary] [,noaperture][,calgary]
General iommu options: General iommu options:
...@@ -235,8 +235,6 @@ IOMMU (input/output memory management unit) ...@@ -235,8 +235,6 @@ IOMMU (input/output memory management unit)
(experimental). (experimental).
nomerge Don't do scatter-gather (SG) merging. nomerge Don't do scatter-gather (SG) merging.
noaperture Ask the IOMMU not to touch the aperture for AGP. 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. noagp Don't initialize the AGP driver and use full aperture.
allowdac Allow double-address cycle (DAC) mode, i.e. DMA >4GB. 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 DAC is used with 32-bit PCI to push a 64-bit address in
......
...@@ -20,8 +20,6 @@ static int forbid_dac __read_mostly; ...@@ -20,8 +20,6 @@ static int forbid_dac __read_mostly;
const struct dma_map_ops *dma_ops = &dma_direct_ops; const struct dma_map_ops *dma_ops = &dma_direct_ops;
EXPORT_SYMBOL(dma_ops); EXPORT_SYMBOL(dma_ops);
static int iommu_sac_force __read_mostly;
#ifdef CONFIG_IOMMU_DEBUG #ifdef CONFIG_IOMMU_DEBUG
int panic_on_overflow __read_mostly = 1; int panic_on_overflow __read_mostly = 1;
int force_iommu __read_mostly = 1; int force_iommu __read_mostly = 1;
...@@ -122,7 +120,7 @@ static __init int iommu_setup(char *p) ...@@ -122,7 +120,7 @@ static __init int iommu_setup(char *p)
if (!strncmp(p, "nomerge", 7)) if (!strncmp(p, "nomerge", 7))
iommu_merge = 0; iommu_merge = 0;
if (!strncmp(p, "forcesac", 8)) if (!strncmp(p, "forcesac", 8))
iommu_sac_force = 1; pr_warn("forcesac option ignored.\n");
if (!strncmp(p, "allowdac", 8)) if (!strncmp(p, "allowdac", 8))
forbid_dac = 0; forbid_dac = 0;
if (!strncmp(p, "nodac", 5)) if (!strncmp(p, "nodac", 5))
...@@ -162,23 +160,6 @@ int arch_dma_supported(struct device *dev, u64 mask) ...@@ -162,23 +160,6 @@ int arch_dma_supported(struct device *dev, u64 mask)
} }
#endif #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; return 1;
} }
EXPORT_SYMBOL(arch_dma_supported); EXPORT_SYMBOL(arch_dma_supported);
......
...@@ -1289,9 +1289,8 @@ static int efx_init_io(struct efx_nic *efx) ...@@ -1289,9 +1289,8 @@ static int efx_init_io(struct efx_nic *efx)
pci_set_master(pci_dev); pci_set_master(pci_dev);
/* Set the PCI DMA mask. Try all possibilities from our /* Set the PCI DMA mask. Try all possibilities from our genuine mask
* genuine mask down to 32 bits, because some architectures * down to 32 bits, because some architectures will allow 40 bit
* (e.g. x86_64 with iommu_sac_force set) will allow 40 bit
* masks event though they reject 46 bit masks. * masks event though they reject 46 bit masks.
*/ */
while (dma_mask > 0x7fffffffUL) { while (dma_mask > 0x7fffffffUL) {
......
...@@ -1242,9 +1242,8 @@ static int ef4_init_io(struct ef4_nic *efx) ...@@ -1242,9 +1242,8 @@ static int ef4_init_io(struct ef4_nic *efx)
pci_set_master(pci_dev); pci_set_master(pci_dev);
/* Set the PCI DMA mask. Try all possibilities from our /* Set the PCI DMA mask. Try all possibilities from our genuine mask
* genuine mask down to 32 bits, because some architectures * down to 32 bits, because some architectures will allow 40 bit
* (e.g. x86_64 with iommu_sac_force set) will allow 40 bit
* masks event though they reject 46 bit masks. * masks event though they reject 46 bit masks.
*/ */
while (dma_mask > 0x7fffffffUL) { while (dma_mask > 0x7fffffffUL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment