Skip to content

Commit 73bf3c2

Browse files
asverdlinralfbaechle
authored andcommitted
MIPS: Octeon: Remove udelay() causing huge IRQ latency
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: Alexander 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: Ralf Baechle <ralf@linux-mips.org>
1 parent 4d46a67 commit 73bf3c2

3 files changed

Lines changed: 0 additions & 17 deletions

File tree

‎arch/mips/include/asm/octeon/pci-octeon.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
#include <linux/pci.h>
1313

14-
/* Some PCI cards require delays when accessing config space. */
15-
#define PCI_CONFIG_SPACE_DELAY 10000
16-
1714
/*
1815
* The physical memory base mapped by BAR1. 256MB at the end of the
1916
* first 4GB.

‎arch/mips/pci/pci-octeon.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,6 @@ static int octeon_read_config(struct pci_bus *bus, unsigned int devfn,
271271
pci_addr.s.func = devfn & 0x7;
272272
pci_addr.s.reg = reg;
273273

274-
#if PCI_CONFIG_SPACE_DELAY
275-
udelay(PCI_CONFIG_SPACE_DELAY);
276-
#endif
277274
switch (size) {
278275
case 4:
279276
*val = le32_to_cpu(cvmx_read64_uint32(pci_addr.u64));
@@ -308,9 +305,6 @@ static int octeon_write_config(struct pci_bus *bus, unsigned int devfn,
308305
pci_addr.s.func = devfn & 0x7;
309306
pci_addr.s.reg = reg;
310307

311-
#if PCI_CONFIG_SPACE_DELAY
312-
udelay(PCI_CONFIG_SPACE_DELAY);
313-
#endif
314308
switch (size) {
315309
case 4:
316310
cvmx_write64_uint32(pci_addr.u64, cpu_to_le32(val));

‎arch/mips/pci/pcie-octeon.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,14 +1762,6 @@ static int octeon_pcie_write_config(unsigned int pcie_port, struct pci_bus *bus,
17621762
default:
17631763
return PCIBIOS_FUNC_NOT_SUPPORTED;
17641764
}
1765-
#if PCI_CONFIG_SPACE_DELAY
1766-
/*
1767-
* Delay on writes so that devices have time to come up. Some
1768-
* bridges need this to allow time for the secondary busses to
1769-
* work
1770-
*/
1771-
udelay(PCI_CONFIG_SPACE_DELAY);
1772-
#endif
17731765
return PCIBIOS_SUCCESSFUL;
17741766
}
17751767

0 commit comments

Comments
 (0)