diff options
author | Alexander Sverdlin <alexander.sverdlin@nokia.com> | 2015-03-18 09:05:21 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-04-10 09:41:42 -0400 |
commit | 73bf3c2a500b2db8ac966469591196bf55afb409 (patch) | |
tree | 1ca3d97a0cf83fce6287ce201af6acdb2ee60e3f /arch | |
parent | 4d46a67a3eb827ccf1125959936fd51ba318dabc (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/include/asm/octeon/pci-octeon.h | 3 | ||||
-rw-r--r-- | arch/mips/pci/pci-octeon.c | 6 | ||||
-rw-r--r-- | arch/mips/pci/pcie-octeon.c | 8 |
3 files changed, 0 insertions, 17 deletions
diff --git a/arch/mips/include/asm/octeon/pci-octeon.h b/arch/mips/include/asm/octeon/pci-octeon.h index 64ba56a02843..1884609741a8 100644 --- a/arch/mips/include/asm/octeon/pci-octeon.h +++ b/arch/mips/include/asm/octeon/pci-octeon.h | |||
@@ -11,9 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | 13 | ||
14 | /* Some PCI cards require delays when accessing config space. */ | ||
15 | #define PCI_CONFIG_SPACE_DELAY 10000 | ||
16 | |||
17 | /* | 14 | /* |
18 | * The physical memory base mapped by BAR1. 256MB at the end of the | 15 | * The physical memory base mapped by BAR1. 256MB at the end of the |
19 | * first 4GB. | 16 | * first 4GB. |
diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c index a04af55d89f1..01c604a5ac36 100644 --- a/arch/mips/pci/pci-octeon.c +++ b/arch/mips/pci/pci-octeon.c | |||
@@ -271,9 +271,6 @@ static int octeon_read_config(struct pci_bus *bus, unsigned int devfn, | |||
271 | pci_addr.s.func = devfn & 0x7; | 271 | pci_addr.s.func = devfn & 0x7; |
272 | pci_addr.s.reg = reg; | 272 | pci_addr.s.reg = reg; |
273 | 273 | ||
274 | #if PCI_CONFIG_SPACE_DELAY | ||
275 | udelay(PCI_CONFIG_SPACE_DELAY); | ||
276 | #endif | ||
277 | switch (size) { | 274 | switch (size) { |
278 | case 4: | 275 | case 4: |
279 | *val = le32_to_cpu(cvmx_read64_uint32(pci_addr.u64)); | 276 | *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, | |||
308 | pci_addr.s.func = devfn & 0x7; | 305 | pci_addr.s.func = devfn & 0x7; |
309 | pci_addr.s.reg = reg; | 306 | pci_addr.s.reg = reg; |
310 | 307 | ||
311 | #if PCI_CONFIG_SPACE_DELAY | ||
312 | udelay(PCI_CONFIG_SPACE_DELAY); | ||
313 | #endif | ||
314 | switch (size) { | 308 | switch (size) { |
315 | case 4: | 309 | case 4: |
316 | cvmx_write64_uint32(pci_addr.u64, cpu_to_le32(val)); | 310 | cvmx_write64_uint32(pci_addr.u64, cpu_to_le32(val)); |
diff --git a/arch/mips/pci/pcie-octeon.c b/arch/mips/pci/pcie-octeon.c index 1bb0b2bf8d6e..99f3db4f0a9b 100644 --- a/arch/mips/pci/pcie-octeon.c +++ b/arch/mips/pci/pcie-octeon.c | |||
@@ -1762,14 +1762,6 @@ static int octeon_pcie_write_config(unsigned int pcie_port, struct pci_bus *bus, | |||
1762 | default: | 1762 | default: |
1763 | return PCIBIOS_FUNC_NOT_SUPPORTED; | 1763 | return PCIBIOS_FUNC_NOT_SUPPORTED; |
1764 | } | 1764 | } |
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 | ||
1773 | return PCIBIOS_SUCCESSFUL; | 1765 | return PCIBIOS_SUCCESSFUL; |
1774 | } | 1766 | } |
1775 | 1767 | ||