[PARISC] Document that we tolerate "Relaxed Ordering"

This means "DMA Read returns" can bypass "MMIO Writes".
Violating the PCI specs in this case improves outbound DMA "flows"
and is currently not required by any drivers.

This is NOT a new behavior. Previous chipsets did this
already and I believe ZX1 PDC was already setting this
for hpux. I just want to further document the behavior.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>

authored by Grant Grundler and committed by Kyle McMartin b312c33e 67a5a59d

+31 -12
+31 -12
drivers/parisc/sba_iommu.c
··· 178 178 #define ROPE6_CTL 0x230 179 179 #define ROPE7_CTL 0x238 180 180 181 + #define IOC_ROPE0_CFG 0x500 /* pluto only */ 182 + #define IOC_ROPE_AO 0x10 /* Allow "Relaxed Ordering" */ 183 + 184 + 185 + 181 186 #define HF_ENABLE 0x40 182 187 183 188 ··· 1764 1759 1765 1760 sba_dev->num_ioc = num_ioc; 1766 1761 for (i = 0; i < num_ioc; i++) { 1767 - /* 1768 - ** Make sure the box crashes if we get any errors on a rope. 1769 - */ 1770 - WRITE_REG(HF_ENABLE, sba_dev->ioc[i].ioc_hpa + ROPE0_CTL); 1771 - WRITE_REG(HF_ENABLE, sba_dev->ioc[i].ioc_hpa + ROPE1_CTL); 1772 - WRITE_REG(HF_ENABLE, sba_dev->ioc[i].ioc_hpa + ROPE2_CTL); 1773 - WRITE_REG(HF_ENABLE, sba_dev->ioc[i].ioc_hpa + ROPE3_CTL); 1774 - WRITE_REG(HF_ENABLE, sba_dev->ioc[i].ioc_hpa + ROPE4_CTL); 1775 - WRITE_REG(HF_ENABLE, sba_dev->ioc[i].ioc_hpa + ROPE5_CTL); 1776 - WRITE_REG(HF_ENABLE, sba_dev->ioc[i].ioc_hpa + ROPE6_CTL); 1777 - WRITE_REG(HF_ENABLE, sba_dev->ioc[i].ioc_hpa + ROPE7_CTL); 1762 + unsigned long ioc_hpa = sba_dev->ioc[i].ioc_hpa; 1763 + unsigned int j; 1778 1764 1779 - /* flush out the writes */ 1765 + for (j=0; j < sizeof(u64) * ROPES_PER_IOC; j+=sizeof(u64)) { 1766 + 1767 + /* 1768 + * Clear ROPE(N)_CONFIG AO bit. 1769 + * Disables "NT Ordering" (~= !"Relaxed Ordering") 1770 + * Overrides bit 1 in DMA Hint Sets. 1771 + * Improves netperf UDP_STREAM by ~10% for bcm5701. 1772 + */ 1773 + if (IS_PLUTO(sba_dev->iodc)) { 1774 + unsigned long rope_cfg, cfg_val; 1775 + 1776 + rope_cfg = ioc_hpa + IOC_ROPE0_CFG + j; 1777 + cfg_val = READ_REG(rope_cfg); 1778 + cfg_val &= ~IOC_ROPE_AO; 1779 + WRITE_REG(cfg_val, rope_cfg); 1780 + } 1781 + 1782 + /* 1783 + ** Make sure the box crashes on rope errors. 1784 + */ 1785 + WRITE_REG(HF_ENABLE, ioc_hpa + ROPE0_CTL + j); 1786 + } 1787 + 1788 + /* flush out the last writes */ 1780 1789 READ_REG(sba_dev->ioc[i].ioc_hpa + ROPE7_CTL); 1781 1790 1782 1791 DBG_INIT(" ioc[%d] ROPE_CFG 0x%Lx ROPE_DBG 0x%Lx\n",