Commit 53493d44 authored by Alexander Sverdlin's avatar Alexander Sverdlin Committed by Ben Hutchings

MIPS: Octeon: Remove udelay() causing huge IRQ latency

commit 73bf3c2a upstream.

udelay() in PCI/PCIe read/write callbacks cause 30ms IRQ latency on Octeon
platforms because these operations are called from PCI_OP_READ() and
PCI_OP_WRITE() under raw_spin_lock_irqsave().
Signed-off-by: default avatarAlexander Sverdlin <alexander.sverdlin@nokia.com>
Cc: linux-mips@linux-mips.org
Cc: David Daney <ddaney@cavium.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Masanari Iida <standby24x7@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Mathias <mathias.rulf@nokia.com>
Patchwork: https://patchwork.linux-mips.org/patch/9576/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 6bde6a3d
...@@ -11,9 +11,6 @@ ...@@ -11,9 +11,6 @@
#include <linux/pci.h> #include <linux/pci.h>
/* Some PCI cards require delays when accessing config space. */
#define PCI_CONFIG_SPACE_DELAY 10000
/* /*
* The physical memory base mapped by BAR1. 256MB at the end of the * The physical memory base mapped by BAR1. 256MB at the end of the
* first 4GB. * first 4GB.
......
...@@ -279,9 +279,6 @@ static int octeon_read_config(struct pci_bus *bus, unsigned int devfn, ...@@ -279,9 +279,6 @@ static int octeon_read_config(struct pci_bus *bus, unsigned int devfn,
pci_addr.s.func = devfn & 0x7; pci_addr.s.func = devfn & 0x7;
pci_addr.s.reg = reg; pci_addr.s.reg = reg;
#if PCI_CONFIG_SPACE_DELAY
udelay(PCI_CONFIG_SPACE_DELAY);
#endif
switch (size) { switch (size) {
case 4: case 4:
*val = le32_to_cpu(cvmx_read64_uint32(pci_addr.u64)); *val = le32_to_cpu(cvmx_read64_uint32(pci_addr.u64));
...@@ -316,9 +313,6 @@ static int octeon_write_config(struct pci_bus *bus, unsigned int devfn, ...@@ -316,9 +313,6 @@ static int octeon_write_config(struct pci_bus *bus, unsigned int devfn,
pci_addr.s.func = devfn & 0x7; pci_addr.s.func = devfn & 0x7;
pci_addr.s.reg = reg; pci_addr.s.reg = reg;
#if PCI_CONFIG_SPACE_DELAY
udelay(PCI_CONFIG_SPACE_DELAY);
#endif
switch (size) { switch (size) {
case 4: case 4:
cvmx_write64_uint32(pci_addr.u64, cpu_to_le32(val)); cvmx_write64_uint32(pci_addr.u64, cpu_to_le32(val));
......
...@@ -1219,9 +1219,6 @@ static inline int octeon_pcie_write_config(int pcie_port, struct pci_bus *bus, ...@@ -1219,9 +1219,6 @@ static inline int octeon_pcie_write_config(int pcie_port, struct pci_bus *bus,
devfn & 0x7, reg, val); devfn & 0x7, reg, val);
return PCIBIOS_SUCCESSFUL; return PCIBIOS_SUCCESSFUL;
} }
#if PCI_CONFIG_SPACE_DELAY
udelay(PCI_CONFIG_SPACE_DELAY);
#endif
return PCIBIOS_FUNC_NOT_SUPPORTED; return PCIBIOS_FUNC_NOT_SUPPORTED;
} }
......
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